Skip to content

checkiz/elixir-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elixir-mongo

Build Status Hex Version Hex Downloads

A MongoDB driver in Elixir.

API entirely reviewed, see CHANGELOG.md

Connecting

Example preparing access to the anycoll collection in the test db :

# Connect the mongo server (by default port 27017 at 127.0.0.1)
mongo = Mongo.connect!
# Select the db to access  
db = mongo |> Mongo.db("test")  
# Select the db to access
anycoll = db |> Mongo.Db.collection("anycoll")  

Wrappers for CRUD operations

Examples accessing the anycoll collection via CRUD operations see Mongo.Find

Wrappers for Aggregate operations

Example of aggregate operation applied to the anycoll collection see Mongo.Collection

Other commands

# Authenticate against the db
db |> Mongo.auth("testuser", "123")`
# Retrieve the last error
db |> Mongo.getLastError

Documentation

Dependencies

About

MongoDB driver for Elixir

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages