FireDAC.Phys.MongoDBWrapper.TMongoDocument.BeginObject

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

function BeginObject(const AKey: String): TMongoDocument;

C++

TMongoDocument* __fastcall BeginObject(const System::UnicodeString AKey);

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public
FireDAC.Phys.MongoDBWrapper.pas
FireDAC.Phys.MongoDBWrapper.hpp
FireDAC.Phys.MongoDBWrapper TMongoDocument


Beschreibung

Öffnet ein neues verschachteltes Objekt und gibt eine Referenz auf dieses Objekt zurück.

HINWEIS: Bei übergeordneten Arrays wird der AKey-Wert ignoriert.

Beispiele

Sehen Sie sich zur Klärung die folgenden Beispiele an:

Delphi:
var
  oDoc: TMongoDocument;
// ....
  oDoc := FEnv.NewDoc;
  oDoc
    .BeginObject('Label1')
      .Add('Top', 30)
      .Add('Left', 30)
      .Add('Caption', 'Enter value:')
    .EndObject
    .BeginObject('Edit1')
      .Add('Top', 30)
      .Add('Left', 100)
      .Add('Text', '123')
    .EndObject;
C++Builder:
TMongoEnv *EnvObj;
// ....
TMongoDocument *oDoc = EnvObj->NewDoc();
  oDoc
	->BeginObject("Label1")
	  ->Add("Top", 30)
	  ->Add("Left", 30)
	  ->Add("Caption", System::UnicodeString("Enter value:"))
	->EndObject()
	->BeginObject("Edit1")
	  ->Add("Top", 30)
	  ->Add("Left", 100)
	  ->Add("Text", System::UnicodeString("123"))
	->EndObject();

Siehe auch