Crate qm_mongodb
source ·Modules§
- BSON, short for Binary JSON, is a binary-encoded serialization of JSON-like documents. Like JSON, BSON supports the embedding of documents and arrays within other documents and arrays. BSON also contains extensions that allow representation of data types that are not part of the JSON spec. For example, BSON has a datetime type and a binary data type.
- Contains the functionality for change streams.
- Contains the
ErrorandResulttypes thatmongodbuses. - Contains the events and functionality for monitoring internal
Clientbehavior. - Contains the functionality for GridFS operations.
- Contains all of the types needed to specify options to MongoDB operations.
- Contains the types of results returned by CRUD operations.
Macros§
Structs§
- This is the main entry point for the API. A
Clientis used to connect to a MongoDB cluster. By default, it will monitor the topology of the cluster, keeping track of any changes, such as servers being added or removed. - A MongoDB client session. This struct represents a logical session used for ordering sequential operations. To create a
ClientSession, callstart_sessionon aClient. - Struct modeling a cluster time reported by the server.
Collectionis the client-side abstraction of a MongoDB Collection. It can be used to perform collection-level operations such as CRUD operations. ACollectioncan be obtained through aDatabaseby calling eitherDatabase::collectionorDatabase::collection_with_options.- A
Cursorstreams the result of a query. When a query is made, the returnedCursorwill contain the first batch of results from the server; the individual results will then be returned as theCursoris iterated. When the batch is exhausted and if there are more results, theCursorwill fetch the next batch of documents, and so forth until the results are exhausted. Note that because of this batching, additional network I/O may occur on any given call tonext. Because of this, aCursoriterates overResult<T>items rather than simplyTitems. Databaseis the client-side abstraction of a MongoDB database. It can be used to perform database-level operations or to obtain handles to specific collections within the database. ADatabasecan only be obtained through aClientby calling eitherClient::databaseorClient::database_with_options.- A
GridFsBucketprovides the functionality for storing and retrieving binary BSON data that exceeds the 16 MiB size limit of a MongoDB document. Users may upload and download large amounts of data, called files, to the bucket. When a file is uploaded, its contents are divided into chunks and stored in a chunks collection. A correspondingFilesCollectionDocumentis also stored in a files collection. When a user downloads a file, the bucket finds and returns the data stored in its chunks. - A stream from which a file stored in a GridFS bucket can be downloaded.
- A stream to which bytes can be written to be uploaded to a GridFS bucket.
- Specifies the fields and options for an index. For more information, see the documentation.
- A struct modeling the canonical name for a collection in MongoDB.
- Specifies the options for a search index.
- A description of the most up-to-date information known about a server. Further details can be found in the Server Discovery and Monitoring specification.
- A
SessionCursoris a cursor that was created with aClientSessionthat must be iterated using one. To iterate, useSessionCursor::nextor retrieve aSessionCursorStreamusingSessionCursor::stream: - A type that implements
Streamwhich can be used to stream the results of aSessionCursor. Returned fromSessionCursor::stream.
Enums§
- Enum representing the possible types of servers that the driver can connect to.
- The possible types for a topology.