Collection

Metadata

Collection Binding

__bound__

The PyMongo Collection instance this class is bound to, or None if not bound. Primarily meant to be used as a truthy value; utilize .get_collection() to acquire a handle to the PyMongo Collection if intended for use.

None

__collection__

The string name of the collection to bind to. Can be used as a truthy value to identify if a Document class is top-level or not.

None

__projection__

A read-only calculated property generated at class construction time identifying the default projection to utilize. This is derived from the available fields and their project predicates.

Data Access Options

__read_preference__

The default read preference to utilize when binding. Must be an appropriate attribute value of the PyMongo ReadPreference object or customized instance of a read_preferences class.

ReadPreference.PRIMARY

__read_concern__

The read concern (level of isolation) to utilize when binding. Must be a PyMongo ReadConcern instance.

ReadConcern(level=None)

__write_concern__

The default write concern (level of confirmation) to utilize when binding. Must be a PyMongo WriteConcern instance.

WriteConcern(w=1, wtimeout=None, j=None, fsync=None)

Storage Options

__collection__

None

__collection__

None

__collection__

None

__collection__

None

results matching ""

    No results matching ""