FireDAC.Phys.MongoDBWrapper.TMongoDatabase
Delphi
TMongoDatabase = class(TMongoObject)
C++
class PASCALIMPLEMENTATION TMongoDatabase : public TMongoObject
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FireDAC.Phys.MongoDBWrapper.pas FireDAC.Phys.MongoDBWrapper.hpp |
FireDAC.Phys.MongoDBWrapper | FireDAC.Phys.MongoDBWrapper |
Description
Represents a MongoDB database. Use this class to manage the collections and users of the represented database.
You must not create an instance of TMongoDatabase directly. To obtain a database object, use one of the following methods instead:
- TMongoConnection.GetDatabase to get new instance of TMongoDatabase.
- TMongoConnection.Databases to get a shared instance of TMongoDatabase.
TMongoDatabase allows you to:
- Access and manage collections: CreateCollection, ListCollections, HasCollection, Collections, GetCollection, DropCollection.
- User management: AddUser, DropUser, DropAllUsers.
- Execute commands: Command, CommandSimple.
- Access document by DBRef.
- Remove the database from the MpongoDB server.
- Configure the replica set read and write semantics: ReadPreference, WriteConcern.