Data.DB.TFieldDefs

From Appmethod Libraries
Jump to: navigation, search

Data.DB.TDefCollectionSystem.Classes.TOwnedCollectionSystem.Classes.TCollectionSystem.Classes.TPersistentSystem.TObjectTFieldDefs

Object Pascal

TFieldDefs = class(TDefCollection)

C++

class PASCALIMPLEMENTATION TFieldDefs : public TDefCollection

Properties

Type Visibility Source Unit Parent
class public
Data.DB.pas
Data.DB.hpp
Data.DB Data.DB

Description

TFieldDefs holds the field definition (TFieldDef) objects that represent the physical fields underlying a dataset.

Datasets use TFieldDefs to manage the field definitions they use to create field objects that correspond to fields in a database table. Every field definition listed by TFieldDefs has a corresponding TField object, but not all TField objects have a corresponding field definition. For example, calculated fields do not have field definitions.

TTable and TClientDataSet objects also use TFieldDefs when creating a new table.

With object field types, such as TADTField and TArrayField, there are two ways to represent the field definitions: hierarchically or flattened. When represented hierarchically, object field definitions contain a set of child definitions for the constituent subfields. When represented as a flattened set, child field definitions appear as siblings sequentially after the parent field definition.

TFieldDefs stores field definitions hierarchically. This is in contrast to TFieldDefList, which lists the child TFieldDef objects of object fields sequentially after the parent TFieldDef.

Use the properties and methods of TFieldDefs to:

Access a specific field definition.

Add or delete field definitions from the list (when creating new tables).

Find out how many fields are defined.

Copy a set of field definitions to another dataset.

See Also