FireDAC.Phys.MongoDBWrapper.TMongoConnection.Databases

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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:

Object Pascal:

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