TSqlTableSet

Groups tables in a database schema.

Inheritance

LevelAncestorDescription
1TObjectUltimate ancestor in a class hierarchy
2TBaseObjectA base class for objects that can be used instead of TObject.
3TSqlTableSet

Source

Sql.Table.Set_.pas (37)

Description

A table set is identified by a UUID and defines a Prefix that is used in the table name in the database. A table set can be dependent on (tables in) other table sets which should be reflected by correctly setting up Dependencies. It is important that the various members of a table set are initialized in an order that ensures that no member is initialized without its dependencies being initialized first, even across table sets. Because of this one has to implement member initialization in the respective functions CreateTypes, ConnectTypes, CreateTables and CreateViews.

Schema evolution scripts are maintained per table set and are only executed when a database supports actually supports a table set, that is, when a database instance actually has physical tables for the tables defined in a table set. Database scripts should be added to Scripts in RegisterScripts.

Fields

ScopeVisibilityTypeNameDescription
InstanceprivateTList<TSqlTableSet>FDependencies
InstanceprotectedTDocumentNodeFName
InstancepublicTUuidId
InstancepublicTTextPrefix
InstancepublicTList<TSqlTable>Tables
InstancepublicTList<TSqlView>Views
InstancepublicTList<TType>Types
InstancepublicTSortedByKeyList<TInteger,TSqlDatabaseScript>Scripts
InstancepublicTBooleanInitialized

Methods

ScopeVisibilityResultNameDescription
InstanceprivateTList<TSqlTableSet>GetDependencies()
InstanceprotectedSetName(Value: TDocumentNode)
InstanceprotectedAddDependencies(Dependencies: TList<TSqlTableSet>)
InstanceprotectedTTextConstructTableIdentifier(Identifier: TText)
InstanceprotectedTTextOld_ConstructTableIdentifier(Identifier: TText)
InstancepublicCreate(ID: TUuid; Prefix: TText; Name: TDocumentNode)
InstancepublicDestroy()
InstancepublicCreateTypes()
InstancepublicConnectTypes()
InstancepublicCreateTables()
InstancepublicCreateViews()
InstancepublicRegisterScripts()
InstancepublicTTextToText()