FireDAC.Phys.MongoDBWrapper.TMongoDatabase.Collections

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Collections[const AColName: String]: TMongoCollection read GetCollectionsProp; default;

C++

__property TMongoCollection* Collections[const System::UnicodeString AColName] = {read=GetCollectionsProp/*, default*/};

Properties

Type Visibility Source Unit Parent
property public
FireDAC.Phys.MongoDBWrapper.pas
FireDAC.Phys.MongoDBWrapper.hpp
FireDAC.Phys.MongoDBWrapper TMongoDatabase

Description

Collection with the specified name located in the database.

The database object owns this shared collection object. Use GetCollection to obtain a private collection object that you must destroy.

Every time that you read a collection from Collections, you obtain the same shared object, updated to point to the specified collection. For example:

Delphi:

A := MyDatabase.Collections['a'];
B := MyDatabase.Collections['b'];
// A.Name = 'b'

C++:

TMongoCollection* A = MyDatabase->Collections["a"];
TMongoCollection* B = MyDatabase->Collections["b"];
// A->Name == "b"

See Also