4 ms·
“The MongoDB Go driver is probably the best MongoDB driver in existence, and complex interaction with MongoDB is core to Parse.” It's also the only one that's
by julien_c 11y ago
“The MongoDB Go driver is probably the best MongoDB driver in existence, and complex interaction with MongoDB is core to Parse.”
It's also the only one that's not maintained by MongoDB Inc. Coincidental? :)
PS: And yes, `mgo` by Gustavo Niemeyer is pretty incredible.
- spimmy 11y agoGustavo is the best. ^_^
- romanovcode 11y agoI think author should see MongoDb C# drivers.
- codygman 11y agoPerhaps unsurprisingly, I'm very fond of the Haskell mongoDB package. Here's an example: import Database.MongoDB import Control.Monad.Trans (liftIO) main = do pipe <- connect (host "127.0.0.1") e <- access pipe master "baseball" run close pipe print e run = do clearTeams insertTeams allTeams >>= printDocs "All Teams" nationalLeagueTeams >>= printDocs "National League Teams" newYorkTeams >>= printDocs "New York Teams" clearTeams = delete (select [] "team") insertTeams = insertMany "team" [ ["name" =: "Yankees", "home" =: ["city" =: "New York", "state" =: "NY"], "league" =: "American"], ["name" =: "Mets", "home" =: ["city" =: "New York", "state" =: "NY"], "league" =: "National"], ["name" =: "Phillies", "home" =: ["city" =: "Philadelphia", "state" =: "PA"], "league" =: "National"], ["name" =: "Red Sox", "home" =: ["city" =: "Boston", "state" =: "MA"], "league" =: "American"] ] allTeams = rest =<< find (select [] "team") {sort = ["home.city" =: 1]} nationalLeagueTeams = rest =<< find (select ["league" =: "National"] "team") newYorkTeams = rest =<< find (select ["home.state" =: "NY"] "team") {project = ["name" =: 1, "league" =: 1]} printDocs title docs = liftIO $ putStrLn title >> mapM_ (print . exclude ["_id"]) docs