A wrapped MongoDB collection with record compression inlined.
A wrapped MongoDB collection with record compression inlined.
Compress a query and pass it to the database, producing a cursor
.
Projection specification document. Compressed before submission.
A convenience method to call find
and then toArray
on the resultant cursor. Optionally project or pass other options
.
DANGER - like toArray, you can run the process out of memory if your query selects tons of
documents. It is highly recommended that you use use the limit
option to control the return
batch.
Compress a query document and query the database for zero or one matching records. Optionally project the result record.
Note that contrary to the native driver documentation, in mingydb
the second argument is
always assumed to be a projection, never an options object.
Search for documents located near a legacy coordinate pair using a Haystack index. Requires that
this collection have exactly one geospatial index of geoHaystack
type.
Search for documents located near a legacy coordinate pair or GeoJSON location document.
Requires that this collection have exactly one geospatial index of either 2d
or 2dsphere
type.
Initialize a new ordered bulk operation. Both documented callbacks in the driver are supported so you may pass one both at instantiation and execution. They will both execute.
Initialize a new unordered bulk operation. Both documented callbacks in the driver are supported so you may pass one both at instantiation and execution. They will both execute.
Compress and insert a record into the database. Unknown paths will be given new minification
keys. Unlike native insertion, the callback is not optional. This is because the record
compression
stage may generate an Error.
Creates a cursor for exploring index information on this collection.
Compress and save a record into the database. If the saved record has an _id field, an upsert is performed. Otherwise a new document is inserted.