FireDAC.Phys.MongoDBWrapper.TMongoDocument.EndObject

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EndObject: TMongoDocument;

C++

TMongoDocument* __fastcall EndObject(void);

Properties

Type Visibility Source Unit Parent
function public
FireDAC.Phys.MongoDBWrapper.pas
FireDAC.Phys.MongoDBWrapper.hpp
FireDAC.Phys.MongoDBWrapper TMongoDocument

Description

Closes a nested object, and returns a reference to this object.

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();

See Also