Kitto.Metadata.ModelImplementation
The default model implementation. Provides TKDefaultModel, which performs record I/O against a database through SQL, plus class helpers that let code build models dynamically (add/delete fields and detail references).
TKModelFieldHelper class
Class helper exposing mutation operations on a model field (used to build models dynamically).
procedure SetFieldSpec(const ADataType: string;Sets the field's YAML spec string from the individual attributes (data type, size, scale, required, key, referenced model).
procedure SetIsKey(const AValue: Boolean);Sets or clears the primary-key flag in the field's spec.
procedure AddField(const AField: TKModelField);Adds AField as a sub-field of this field.
procedure DeleteField(const AField: TKModelField);Removes and frees the given sub-field of this field.
TKModelDetailReferencesHelper class
Class helper exposing add/delete operations on a model's detail references (used to build models dynamically).
procedure AddDetailReference(const ADetailReference: TKModelDetailReference);Adds a detail reference to the collection.
procedure DeleteDetailReference(const ADetailReference: TKModelDetailReference);Removes and frees the given detail reference.
TKDefaultModel class
function LoadRecords(const AStore: TEFTree;Requires that AStore is a TKViewTableStore and calls InternalLoadRecords.
procedure SaveRecords(const AStore: TEFTree;Requires that AStore is a TKViewTableStore and calls InternalSaveRecords.
procedure SaveRecord(const ARecord: TEFNode;Persists the specified record. Calls various protected virtual methods.
