Declaration

TnxDataDictionary = class(TnxPersistent)

 
Description

The data dictionary is the heart of every NexusDB table. It describes the files, fields, indices, etc and even how to read/write the records.

If you don't need the fine control that the data dictionary gives you, you can just use TIndexDefs, TFieldDefs and the CreateTable method of TDataset.

 
Methods

AddAutoIncDescriptor

This function sets the AutoInc Descriptor class to the given aAutoIncClass, creates and instance, adds it to the data dictionary and returns the instance.

AddBlobDescriptor

This function sets the Blob Descriptor class to the given aBlobClass, creates and instance, adds it to the data dictionary and returns the instance.

AddCustom

This function adds a new instance of a Custom Descriptor to the data dictionary and returns the newly created Instance.

AddFieldsDescriptor

This function sets the Fields Descriptor class to the given aFieldsClass, creates and instance, adds it to the data dictionary and returns the instance.

AddFile

This function adds a new instance of a File Descriptor to the data dictionary and returns the newly created Instance.

AddIndicesDescriptor

This function sets the Indices Descriptor class to the given aIndicesClass, creates and instance, adds it to the data dictionary and returns the instance.

AddLocaleDescriptor

This function sets the Locale Descriptor class to the given aLocaleClass, creates and instance, adds it to the data dictionary and returns the instance.

AddRecordDescriptor

This function sets the Record Descriptor class to the given aRecordClass, creates and instance, adds it to the data dictionary and returns the instance.

Assign

This methods copies the settings of the given Source to the current Data Dictionary, if Source is of the same type.

CheckReadOnly

Checks if the Data Dictionary is read-only. Raises an exception if true.

CheckValid

Checks if the Data Dictionary is valid. Raises an exception if not.

Clear

This function clears the Data Dictionary.

Create

constructor.

Destroy

destructor.

EnsureFieldsDescriptor

This function ensures a Fields Descriptor exists.

EnsureIndicesDescriptor

This function ensures there is an indices descritor.

GetCustomDescriptorFromName

Return the custom number for a given custom name, or -1 if not found.

GetFieldFromName

Return the field number for a given field name, or -1 if not found.

GetFileFromExt

Return the file number for a given file extension, or -1 if not found.

GetIndexFromName

Return the index number for a given index name, or -1 if not found.

IsEqual

Compares the current Data Dictionary to another. Returns true if they are equal.

IsIndexDescValid

Returns true if an Index Descriptor validates ok.

ReadFromReader

Reads the whole Data Dictionary settings (data) from aReader.

ReadFromStream

Reads the whole Data Dictionary settings (data) from aStream.

RemoveAutoIncDescriptor

This function frees the Instance of the associated AutoInc Descriptor.

RemoveBlobDescriptor

This function frees the Instance of the associated Blob Descriptor.

RemoveCustom

Remove a Custom Descriptor from the Data Dictionary.

RemoveCustom

Remove a Custom Descriptor from the Data Dictionary.

RemoveFieldsDescriptor

This function frees the Instance of the associated Fields Descriptor.

RemoveFile

Remove a File Descriptor from the Data Dictionary.

RemoveIndicesDescriptor

This function frees the Instance of the associated Indices Descriptor.

RemoveLocaleDescriptor

This function frees the Instance of the associated Locale Descriptor.

RemoveRecordDescriptor

This function frees the Instance of the associated Record Descriptor.

SetBaseName

Set the internal table base name - used for error messages

UsableBlockSize

This function calculates the number of bytes that can be used for storing data per block by subtracting the header size from the block size in bytes

WriteToStream

Writes the whole Data Dictionary settings (data) to aStream.

WriteToWriter

Writes the whole Data Dictionary settings (data) to aWriter.

 
Properties

AutoIncDescriptor

This property returns the associated AutoInc Descriptor.

BlobDescriptor

This property returns the associated Blob Descriptor.

BookmarkSize

The length of a bookmark for the given index.

FieldsDescriptor

This property returns the associated Fields Descriptor.

IndicesDescriptor

This property returns the associated Indices Descriptor.

KeyLen

The length of the key for the given index.

LocaleDescriptor

This property returns the associated Locale Descriptor.

RecordDescriptor

This property returns the associated Record Descriptor.

Version

Returns the Version of the Data Dictionary implementation and thus the table.

 
File

 
nxsdDataDictionary

Home | Site Contents | Documentation | NexusDB Manual V4 | Class Reference | Symbol Reference | Classes