ThDB_Object

Represents a runtime instance of a database-aware object linked to a schema table.
This class provides access to record-level data, schema metadata, and navigation within structured datasets.
It serves as the in-memory representation of a single record, supporting reading, writing, validation, and translation of field values.
Used as the base class for data-bound editors, runtime serializers, or schema-based record handlers.

Developer_Selection

Marks the object as selected by the developer for special handling, debugging, or visual filtering.
This flag is typically used in development tools or design-time editors to isolate specific records.
Developer_Selection: Boolean;

FolderName

Specifies the folder name associated with the object’s data storage location. Used when saving or loading records from file-based storage systems.
property FolderName: String;

Group_Files_By_Char

Defines the character used to group files within subdirectories. This enables segmented file organization, often based on a prefix or initial letter.
property Group_Files_By_Char: WideChar;

StorageType

Specifies the storage model used for saving the object’s data.
Controls whether records are stored in individual files, grouped structures, or binary formats.
property StorageType: ThDBO_Storage;

    ThDBO_Storage

    Defines the storage mode used by a ThDB_Object instance. This determines how the object's records are stored, compressed, and organized on disk.
    All container-based options use compression internally.
    TypeDescription
    he_Separated_FilesEach record is saved as an individual file.
    he_HDD_ContainerRecords are grouped into a compressed container optimized for HDD performance.
    he_SSD_ContainerRecords are grouped into a compressed container optimized for SSD performance.

Notes

Stores internal notes or metadata related to the object. Used for documentation, logging, or informational purposes only.
property Notes: String;

ThDB_Objects

Manages a collection of ThDB_Object instances, each representing a single schema-based record.
Provides methods for adding, accessing, and managing records stored in memory or files.
Supports schema-aware operations such as lookup, filtering, sorting, and bulk loading.
Used as the runtime container for working with datasets in applications using schema definitions.

Add

Creates and adds a new ThDB_Object to the collection.
The new object can then be configured with schema and storage settings.
function Add: ThDB_Object;

Return Value

Returns the newly created ThDB_Object instance.

Find

Searches the collection for a database object matching the specified folder name.
Used to locate existing records by their storage folder.
function Find(CONST FolderName: String): ThDB_Object;

Parameters

  • FolderName: String; The folder name of the object to locate.

Return Value

Returns the matching ThDB_Object if found; otherwise returns nil or an uninitialized instance.

Items

Provides indexed access to ThDB_Object instances in the collection.
Used to iterate or access individual objects by position.
property Items[Index: Integer]: ThDB_Object read GetItem write SetItem; default;

Parameters

  • Index: Integer; The zero-based index of the object in the collection.

Return Value

Returns the ThDB_Object at the specified index.