FireDAC.Phys.MongoDBWrapper.TMongoDocument.BeginObject
Delphi
function BeginObject(const AKey: String): TMongoDocument;
C++
TMongoDocument* __fastcall BeginObject(const System::UnicodeString AKey);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FireDAC.Phys.MongoDBWrapper.pas FireDAC.Phys.MongoDBWrapper.hpp |
FireDAC.Phys.MongoDBWrapper | TMongoDocument |
Description
Opens a new nested object, and returns a reference to this object.
NOTE: For parent arrays, the
AKey
value is ignored.
Examples
To clarify, consider the following examples:
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();