FireDAC.Phys.MongoDBWrapper.TMongoConnection.Collections

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

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

C++

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

プロパティ

種類 可視性 ソース ユニット
property public
FireDAC.Phys.MongoDBWrapper.pas
FireDAC.Phys.MongoDBWrapper.hpp
FireDAC.Phys.MongoDBWrapper TMongoConnection


説明

MongoDB サーバーの指定されたデータベースにある、指定された名前コレクション

接続オブジェクトは、この共有コレクション オブジェクトを所有します。GetCollection を使用すると、自分で破壊しなければならない、プライベートのコレクション オブジェクトを取得することができます。

Collections からコレクションを読み込むたびに、同じ共有オブジェクトを取得し、指定されたコレクションを指すために更新されます。 例:

Delphi:

A := MyConnection.Collections['test', 'a'];
B := MyConnection.Collections['test', 'b'];
// A.Name = 'b'

C++:

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

関連項目