FSharpCouch和MongoFS——NoSQL的輔助庫介紹

jieforest發表於2012-07-14
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章