The Marrow Mongo Document Mapper
  • Introduction
  • Installation
  • Contributing
  • Guide
    • Introduction
    • Modelling
    • Management
    • Interaction
    • Fields
    • Indexes
    • Trait Mix-Ins
    • Plugin Namespaces
  • Reference
    • Decimal
    • Field
    • Index
    • Fields
      • Alias
      • Array
      • Binary
      • Boolean
      • Date
      • Double
      • Embed
      • Integer
      • Link
      • Long
      • Mapping
      • Markdown
      • Number
      • ObjectId
      • Path
      • Period
      • Plugin
      • Reference
      • Regex
      • Set
      • String
      • TTL
      • Timestamp
    • Parametric
      • F (Filter)
      • P (Project)
      • S (Sort)
      • U (Update)
    • Query
      • Ops
      • Q
    • Traits
      • Collection
      • Derived
      • Expires
      • Heirarchical
      • Identified
      • Localized
      • Lockable
      • Published
      • Stateful
      • Queryable
    • Utilities
      • Capped Collections
      • Geospatial
      • Logging
  • End Matter
    • Colophon
    • License
    • History
Powered by GitBook
On this page
  • Metadata
  • Collection Binding
  • Data Access Options
  • Storage Options

Was this helpful?

Edit on Git
  1. Reference
  2. Traits

Collection

PreviousTraitsNextDerived

Last updated 6 years ago

Was this helpful?

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.

DefaultNone

__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.

DefaultNone

__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 object or customized instance of a class.

DefaultReadPreference.PRIMARY

__read_concern__

DefaultReadConcern(level=None)

__write_concern__

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

Storage Options

__collection__

DefaultNone

__collection__

DefaultNone

__collection__

DefaultNone

__collection__

DefaultNone

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

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

ReadPreference
read_preferences
ReadConcern
WriteConcern