TSqlTableSet
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TBaseObject | A base class for objects that can be used instead of TObject . |
3 | TSqlTableSet |
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
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | private | TList<TSqlTableSet> | FDependencies | |
Instance | protected | TDocumentNode | FName | |
Instance | public | TUuid | Id | |
Instance | public | TText | Prefix | |
Instance | public | TList<TSqlTable> | Tables | |
Instance | public | TList<TSqlView> | Views | |
Instance | public | TList<TType> | Types | |
Instance | public | TSortedByKeyList<TInteger,TSqlDatabaseScript> | Scripts | |
Instance | public | TBoolean | Initialized |
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | private | TList<TSqlTableSet> | GetDependencies() | |
Instance | protected | SetName(Value: TDocumentNode) | ||
Instance | protected | AddDependencies(Dependencies: TList<TSqlTableSet>) | ||
Instance | protected | TText | ConstructTableIdentifier(Identifier: TText) | |
Instance | protected | TText | Old_ConstructTableIdentifier(Identifier: TText) | |
Instance | public | Create(ID: TUuid; Prefix: TText; Name: TDocumentNode) | ||
Instance | public | Destroy() | ||
Instance | public | CreateTypes() | ||
Instance | public | ConnectTypes() | ||
Instance | public | CreateTables() | ||
Instance | public | CreateViews() | ||
Instance | public | RegisterScripts() | ||
Instance | public | TText | ToText() |