FireDAC.Phys.MongoDBWrapper.TMongoCollection.Create
Delphi
constructor Create(AEnv: TMongoEnv; AOwningObj: TObject; AHandle: Pmongoc_collection_t);
C++
__fastcall TMongoCollection(TMongoEnv* AEnv, System::TObject* AOwningObj, void * AHandle);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | protected | FireDAC.Phys.MongoDBWrapper.pas FireDAC.Phys.MongoDBWrapper.hpp |
FireDAC.Phys.MongoDBWrapper | TMongoCollection |
Description
Creates an instance of TMongoCollection.
You cannot create an instance of TMongoCollection directly. Instead, you must use one of the following members of TMongoConnection and TMongoDatabase:
- TMongoConnection.GetCollection to get a new instance of
TMongoCollection
. - TMongoConnection.Collections to get a shared instance of
TMongoCollection
. - TMongoDatabase.GetCollection to get a new instance of
TMongoCollection
. - TMongoDatabase.Collections to get a shared instance of
TMongoCollection
.
Create receives the following parameters:
AEnv
is the environment to use for the collection.AOwningObj
is the owner of the collection.AHandle
is a pointer to a mongoc_collection_t structure.