FireDAC.Phys.MongoDBWrapper.TMongoConnection.Databases

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Databases[const ADBName: String]: TMongoDatabase read GetDatabasesProp; default;

C++

__property TMongoDatabase* Databases[const System::UnicodeString ADBName] = {read=GetDatabasesProp/*, default*/};

Properties

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

Description

Database of the MongoDB server that has the specified name.

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

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

Delphi:

A := MyConnection.Databases['a'];
B := MyConnection.Databases['b'];
// A.Name = 'b'

C++:

TMongoDatabase* A = MyConnection->Databases["a"];
TMongoDatabase* B = MyConnection->Databases["b"];
// A->Name == "b"

See Also