View Source API Reference mongodb-driver v1.4.1
Modules
Functions for encoding and decoding BSON documents.
Represents BSON binary type
Represents BSON JavaScript (with and without scope) types
Represents BSON long type
Represents BSON ObjectId type
Represents BSON Regex type
Represents BSON Timestamp type
The main entry point for doing queries. All functions take a topology to run the query on.
This module defines bulk operation for insert, update and delete. A bulk operation is a tuple of two elements
The driver supports the so-called bulk writes (Specification)
The successful result struct of Mongo.BulkWrite.write
. Its fields are
This module provides some boilerplate code for a better support of structs while using the MongoDB driver
The successful result struct of Mongo.delete_one/4
and Mongo.delete_many/4
.
Its fields are
The successful result struct of Mongo.find_one_and_*
functions, which under
the hood use Mongo's findAndModify
API.
This is the MongoDB Bucket struct, which specifies the underlying collections to support GridFS. There are always
two kind of collections used for storing files by GridFS. The fs.files
collection contains the meta information about
the file and the fs.chunks
collection contains the data of the file chunked into blocks of bytes. The names of the
collection and the size of the block is defined by the following options
The main entry point for downloading files from the grid-fs specified by the bucket struct.
The main entry point for uploading files into the grid-fs specified by the bucket struct.
This is the upload stream for save streams into the grid fs.
The successful result struct of Mongo.insert_many/4
. Its fields are
The successful result struct of Mongo.insert_one/4
. Its fields are
This module encodes and decodes the data from and to the mongodb server. We only support MongoDB >= 3.2 and use op_query with the hack collection "$cmd" Other op codes are deprecated. Therefore only op_reply and op_query are supported.
Implementation of the DBConnection behaviour module.
Each server has a monitor process. The monitor process is created by the topology process.
An ordered bulk is filled in the memory with the bulk operations. If the ordered bulk is written to the database, the order is preserved. Only same types of operation are grouped and only if they have been inserted one after the other.
PBKDF2
implements PBKDF2 (Password-Based Key Derivation Function 2),
part of PKCS #5 v2.0 (Password-Based Cryptography Specification).
It can be used to derive a number of keys for various purposes from a given
secret. This lets applications have a single secure secret, but avoid reusing
that key in multiple incompatible contexts.
see http://tools.ietf.org/html/rfc2898#section-5.2
The password safe stores the password while parsing the url and/or the options to avoid it from logging while the sasl logger is activated.
This is the query implementation for the Query Protocol
Determines which servers are considered suitable for read operations
Defines a repository.
This module implements the details of the transactions api (see specs).
This module represents the server-side session. There are three fields
A FIFO cache for sessions. To get a new session, call checkout
. This returns a new session or a cached session.
After running the operation call checkin(session)
to put the session into the FIFO cache for reuse.
An unordered bulk is filled in the memory with the bulk operations. These are divided into three lists (inserts, updates, deletes) added. If the unordered bulk is written to the database, the groups are written in the following order
The successful result struct of Mongo.update_one/5
, Mongo.update_many/5
and Mongo.replace_one/5
. Its fields are
Mongo connection URL parsing util
This module contains the constant of all wire versions.
Mix Tasks
Migrations are used to modify your database collection over time.
Drop the migrations when calling mix mongo.drop
Runs the migrations when calling mix mongo.migrate
Resets the database when calling mix mongo.reset
Unlocks the migration lock