MongoDB java driver adapter
MongoDB java driver adapter
(admin-command! client & command)
Runs a command on the admin database.
Runs a command on the admin database.
(cas! coll doc doc')
Atomically replace doc with doc' in coll.
Atomically replace doc with doc' in coll.
(client node)
(client node port)
Creates a new Mongo client.
Creates a new Mongo client.
(cluster-client test)
Returns a mongoDB connection for all nodes in a test.
Returns a mongoDB connection for all nodes in a test.
(collection db collection-name)
Gets a Mongo collection from a DB.
Gets a Mongo collection from a DB.
(create-collection! db collection-name)
Create a collection in a database.
Create a collection in a database.
(db client db)
Gets a Mongo database from a client.
Gets a Mongo database from a client.
(default-client-options)
MongoDB client options.
MongoDB client options.
(document m)
Creates a Mongo document from a map.
Creates a Mongo document from a map.
(document->map doc)
Converts a document back into a map.
Converts a document back into a map.
(drop-collection! collection)
Drops a collection.
Drops a collection.
(find-all coll)
Finds all docs in a collection.
Finds all docs in a collection.
(find-one coll id)
(find-one session coll id)
Find a document by ID. If a session is provided first, will use that session for a causally consistent read
Find a document by ID. If a session is provided first, will use that session for a causally consistent read
(iterable-seq i)
Turns a MongoIterable into a seq.
Turns a MongoIterable into a seq.
(parse-result doc)
Parses a command's result into a Clojure data structure.
Parses a command's result into a Clojure data structure.
A map of read concern keywords to java driver constants.
A map of read concern keywords to java driver constants.
(read-with-find-and-modify coll id)
Perform a read of a document by ID with findAndModify.
Perform a read of a document by ID with findAndModify.
(replace! coll doc)
Replace a document by a document's :_id.
Replace a document by a document's :_id.
(run-command! db & command)
Runs an arbitrary command on a database. Command is a flat list of kv pairs, with the first pair being the command name, which will be transformed into a document. Includes a hardcoded 10 second timeout.
Runs an arbitrary command on a database. Command is a flat list of kv pairs, with the first pair being the command name, which will be transformed into a document. Includes a hardcoded 10 second timeout.
(update-result->map r)
Converts an update result to a clojure map.
Converts an update result to a clojure map.
(upsert! coll doc)
(upsert! session coll doc)
Ensures the existence of the given document, a map with at minimum an :_id key.
Ensures the existence of the given document, a map with at minimum an :_id key.
(with-read-concern coll read-concern)
Returns a copy of the given collection, using the given read concern keyword.
Returns a copy of the given collection, using the given read concern keyword.
(with-write-concern coll write-concern)
Returns a copy of the given collection, using the given write concern keyword.
Returns a copy of the given collection, using the given write concern keyword.
A map of write concern keywords to java driver constants.
A map of write concern keywords to java driver constants.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close