all information about the structure of a database table
More...
|
static string | NiceTableName (string s) |
| change the name from the sql name to a Delphi class name remove underscores, use capitalised letters More...
|
|
static string | NiceFieldName (TTableField tableField) |
| change the name from the sql name to a Delphi variable name remove underscores, remove prefixes and type identifiers, use capitalised letters More...
|
|
static string | NiceFieldName (String tableField) |
| format the name of a column using Camelcase and dropping prefix/postfix More...
|
|
static string | NiceKeyName (TConstraint c) |
| change the name of the constraint from the sql name to a .net name remove underscores, use capitalised letters, prepend FK or call it PrimaryKey More...
|
|
static string | GetNamespace (string AStrGroup) |
| get the namespace for this table, eg. MPersonnel.Units More...
|
|
all information about the structure of a database table
◆ TTable()
Ict.Tools.DBXML.TTable.TTable |
( |
| ) |
|
|
inline |
◆ AddIndex()
Boolean Ict.Tools.DBXML.TTable.AddIndex |
( |
TIndex |
AIndex | ) |
|
|
inline |
only add the index if it does not exist yet
◆ AddReference()
void Ict.Tools.DBXML.TTable.AddReference |
( |
TConstraint |
AForeignKey | ) |
|
|
inline |
add a foreign key from another table, that is referencing this table
- Parameters
-
AForeignKey | foreign key to add |
◆ Assign()
void Ict.Tools.DBXML.TTable.Assign |
( |
TTable |
AOtherTable | ) |
|
|
inline |
copy the values from another table; used for generating datasets by deriving from database tables
- Parameters
-
◆ GetConstraint()
TConstraint Ict.Tools.DBXML.TTable.GetConstraint |
( |
StringCollection |
fields | ) |
|
|
inline |
get the reference to the constraint which is based on the columns that are passed as parameter
- Parameters
-
fields | the fields that are part of the constraint that we look for |
- Returns
- the reference to the constraint
◆ GetField()
TTableField Ict.Tools.DBXML.TTable.GetField |
( |
string |
s, |
|
|
bool |
AShowWarningNonExistingField = true |
|
) |
| |
|
inline |
return the reference to a column, given by name
- Parameters
-
s | name of the column |
AShowWarningNonExistingField | show warning if there is no field with that name; only takes effect if GEnabledLoggingMissingFields is true |
- Returns
- reference to the column
◆ GetFirstUniqueKey()
TConstraint Ict.Tools.DBXML.TTable.GetFirstUniqueKey |
( |
| ) |
|
|
inline |
get a reference to the first unique key
- Returns
- the first unique key of the table
◆ GetNamespace()
static string Ict.Tools.DBXML.TTable.GetNamespace |
( |
string |
AStrGroup | ) |
|
|
inlinestatic |
get the namespace for this table, eg. MPersonnel.Units
◆ GetPrimaryKey()
get a reference to the primary key
- Returns
- the primary key of the table
◆ GetReferences()
ArrayList Ict.Tools.DBXML.TTable.GetReferences |
( |
| ) |
|
|
inline |
get the list of constraints of other tables, that reference this table
- Returns
- the list of constraints of other tables, that reference this table
◆ HasForeignKey()
bool Ict.Tools.DBXML.TTable.HasForeignKey |
( |
| ) |
|
|
inline |
determine whether the table has any foreign key constraints
- Returns
- true if the table has at least one foreign key constraint
◆ HasPrimaryKey()
bool Ict.Tools.DBXML.TTable.HasPrimaryKey |
( |
| ) |
|
|
inline |
determine whether the table has a primary key
- Returns
- true if the table has a primary key constraint
◆ HasUniqueKey()
bool Ict.Tools.DBXML.TTable.HasUniqueKey |
( |
| ) |
|
|
inline |
determine whether the table has a unique key
- Returns
- true if the table has a unique key constraint
◆ IsKey()
Boolean Ict.Tools.DBXML.TTable.IsKey |
( |
String |
AFieldname, |
|
|
String |
AKeyType |
|
) |
| |
|
inline |
determine if a given field is part of a certain type of constraint
- Parameters
-
AFieldname | the field in question |
AKeyType | a type of constraint, eg. unique, primary, foreign key |
- Returns
- true if the field is part of a key of the given type
◆ NiceFieldName() [1/2]
static string Ict.Tools.DBXML.TTable.NiceFieldName |
( |
String |
tableField | ) |
|
|
inlinestatic |
format the name of a column using Camelcase and dropping prefix/postfix
- Parameters
-
tableField | the name to format |
- Returns
- nice name
◆ NiceFieldName() [2/2]
static string Ict.Tools.DBXML.TTable.NiceFieldName |
( |
TTableField |
tableField | ) |
|
|
inlinestatic |
change the name from the sql name to a Delphi variable name remove underscores, remove prefixes and type identifiers, use capitalised letters
- Parameters
-
tableField | the reference to the column which you want the nice name of |
- Returns
- the column name without prefix and postfix
◆ NiceKeyName()
static string Ict.Tools.DBXML.TTable.NiceKeyName |
( |
TConstraint |
c | ) |
|
|
inlinestatic |
change the name of the constraint from the sql name to a .net name remove underscores, use capitalised letters, prepend FK or call it PrimaryKey
- Parameters
-
- Returns
- nice name for the key
◆ NiceTableName()
static string Ict.Tools.DBXML.TTable.NiceTableName |
( |
string |
s | ) |
|
|
inlinestatic |
change the name from the sql name to a Delphi class name remove underscores, use capitalised letters
- Parameters
-
s | turn the table name into CamelCase |
- Returns
◆ PrepareAutoGeneratedFields()
void Ict.Tools.DBXML.TTable.PrepareAutoGeneratedFields |
( |
| ) |
|
|
inline |
create the auto generated fields (eg. createdby, datemodified)
◆ PrepareLinks()
set the references in the tables referenced by the constraints of this table
- Parameters
-
◆ PrepareParametersInsertStatement()
List< OdbcParameter > Ict.Tools.DBXML.TTable.PrepareParametersInsertStatement |
( |
string |
line | ) |
|
|
inline |
prepare the parameters for an INSERT statement, from a CSV line
◆ PrepareSQLInsertStatement()
string Ict.Tools.DBXML.TTable.PrepareSQLInsertStatement |
( |
| ) |
|
|
inline |
prepare an INSERT statement for this table
◆ TestIndex()
Boolean Ict.Tools.DBXML.TTable.TestIndex |
( |
TIndex |
AIndex | ) |
|
|
inline |
checks if all the fields of the index exist in the table
◆ AvailableForCustomReport
Boolean Ict.Tools.DBXML.TTable.AvailableForCustomReport |
is this table available for custom reports
◆ bCatchUpdateException
bool Ict.Tools.DBXML.TTable.bCatchUpdateException |
attempt an insert instead of failed update in SubmitChanges in DataAccess
◆ bWithoutCRMDFields
bool Ict.Tools.DBXML.TTable.bWithoutCRMDFields |
created / modified fields
◆ CustomReportPermission
String Ict.Tools.DBXML.TTable.CustomReportPermission |
which permission is needed to access this table with a custom report
◆ ExistsStrLabel
Boolean Ict.Tools.DBXML.TTable.ExistsStrLabel |
◆ FReferenced
ArrayList Ict.Tools.DBXML.TTable.FReferenced |
references to this table from other tables list of TConstraints
◆ GEnabledLoggingMissingFields
Boolean Ict.Tools.DBXML.TTable.GEnabledLoggingMissingFields = true |
|
static |
this for debugging; it helps to find columns that are missing
◆ grpConstraint
the constraints (foreign, unique, primary) of the table
◆ grpIndex
List<TIndex> Ict.Tools.DBXML.TTable.grpIndex |
◆ grpTableField
◆ iOrder
int Ict.Tools.DBXML.TTable.iOrder |
◆ strArea
string Ict.Tools.DBXML.TTable.strArea |
define which area in the db this table belongs to
◆ strDescription
string Ict.Tools.DBXML.TTable.strDescription |
a description of the table
◆ strDotNetName
string Ict.Tools.DBXML.TTable.strDotNetName |
the name of the table as it should be used in dotnet
◆ strDumpName
string Ict.Tools.DBXML.TTable.strDumpName |
the name used for dumping the table
◆ strGroup
string Ict.Tools.DBXML.TTable.strGroup |
each table belongs to a certain group, which helps with the HTML documentation of the database structure
◆ strLabel
string Ict.Tools.DBXML.TTable.strLabel |
even shorter description than strDescription
◆ strName
string Ict.Tools.DBXML.TTable.strName |
the name of the table (as it is in the database)
◆ strVariableNameInDataset
string Ict.Tools.DBXML.TTable.strVariableNameInDataset = null |
the name of the table when it is used in a dataset; empty otherwise.
The documentation for this class was generated from the following file: