ITPub博客

首页 > Linux操作系统 > Linux操作系统 > FSharpCouch和MongoFS——NoSQL的辅助库介绍

FSharpCouch和MongoFS——NoSQL的辅助库介绍

原创 Linux操作系统 作者:jieforest 时间:2012-07-14 08:39:36 0 删除 编辑
I've been working on a few new libraries lately that focus on providing functional wrappers around various NoSQL options.

FSharpCouch

FSharpCouch is something that I wrote about a little over two years ago. At the time, it was more of an educational exercise, but I have since revised it and found aspects of it to be useful. This is now available on NuGet as package ID FSharpCouch. Here's an example:

CODE:

type Person = {
    FirstName : string
    LastName : string
}

let couchUrl = "http://localhost:5984"
let databaseName = "people"

let result = { FirstName = "John"; LastName = "Doe" }
             |> createDocument couchUrl databaseName

let createdPerson = getDocument couchUrl databaseName result.idYou can find additional examples and the full source at https://github.com/dmohl/FSharpCouch.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-735444/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-23

  • 博文量
    442
  • 访问量
    523730