API:FireDAC.Phys.MongoDBWrapper.TMongoOID

From RAD Studio API Documentation
Jump to: navigation, search

FireDAC.Phys.MongoDBWrapper.TMongoObjectSystem.TObjectTMongoOID

Delphi

TMongoOID = class(TMongoObject)

C++

class PASCALIMPLEMENTATION TMongoOID : public TMongoObject

Properties

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

Description

A base class for all MongoDB API wrapping classes.

FireDAC.Phys.MongoDBWrapper.TMongoOID inherits from FireDAC.Phys.MongoDBWrapper.TMongoObject. All content below this line refers to FireDAC.Phys.MongoDBWrapper.TMongoObject.

A base class for all MongoDB API wrapping classes.

TMongoObject is an abstract class that is responsible for the life cycle of a MongoDB API handle. This class provides references to client libraries, the environment and error objects.

The MongoDB API handle may be assigned to this object:

  • by derived classes, which directly assign the handle to the private variable FHandle;
  • by the Create constructor: in this case, this object will own the handle;
  • by assigning a handle to the Handle property: in this case, the caller owns the handle.

When this object owns the handle, the MongoDB API handle will be automatically destroyed in the following cases:

  • when you call the object destructor;
  • by assigning any appropriate value to the Handle property, when this object owns the handle.

Otherwise, the handle must be destroyed manually.

See Also