TBranchingSqlDatabase
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TSqlStatementExecutor | Abstract base class for a facility that executes a TSqlStatement |
3 | TSqlDatabase | Abstract base class for connections to databases that can be queried using SQL statements. |
4 | TLogicalSqlDatabase |
Abstract base class for TSqlDatabase implementations that manipulate or translate queries before they sent to an
actual physical TSqlDatabase .
|
5 | TAnnotatingSqlDatabase | A base class for databases that provide tables of an annotation. |
6 | TBranchingSqlDatabase |
Source
Sql.Database.Logical.Branching.pas (57)
Description
The branching database adds branch support to the database stack. Rows with the same values are grouped in the database, referring to the branch set to indicate in which branches the row is present.
In order to support this capability, a table should set the TSqlTable.BranchSet
inherited from the TSqlTable
class, and override the TSqlTable.IsBranching
function to return True
. A base class is available which provides all functionality: TSqlBranchedPhysicalTable
.
When branched tables are used in queries through a TBranchingSqlDatabase
,
the statements are modified to include restrictions on or values of the TBranchSet
.
Single queries send to the database may result in multiple queries being send to the decorated database for administrative purposes.
When the CurrentBranchSet
consists of a single TBranch
, database behavior resembles that of a non-branching database,
allowing branching capabilities to be added to existing tables with minimal effort on the side of queries.
Fields
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | private | TBranchSet | FCurrentBranchSet | |
Instance | private | TList<TSqlTable> | FBranchedTables | |
Instance | private | TBranchSetManager | BranchSetManager |