monger.conversion

Provides functions that convert between MongoDB Java driver classes (DBObject, DBList) and Clojure
data structures (maps, collections). Most of the time, application developers won't need to use these
functions directly because Monger Query DSL and many other functions convert documents to Clojure sequences and
maps automatically. However, this namespace is part of the public API and guaranteed to be stable between minor releases.

Related documentation guides:

* http://clojuremongodb.info/articles/inserting.html
* http://clojuremongodb.info/articles/querying.html

ConvertFromDBObject

protocol

members

from-db-object

(from-db-object input keywordize)
Converts given DBObject instance to a piece of Clojure data

ConvertToDBObject

protocol

members

to-db-object

(to-db-object input)
Converts given piece of Clojure data to BasicDBObject MongoDB Java driver uses

ConvertToObjectId

protocol

members

to-object-id

(to-object-id input)
Instantiates ObjectId from input unless the input itself is an ObjectId instance. In that case, returns input as is.

FieldSelector

protocol

members

as-field-selector

(as-field-selector input)
Converts values to DBObject that can be used to specify a list of document fields (including negation support)