Appearance
ITableInfo Interface
Definition
Represents metadata about a database table, including its primary key and columns.
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Properties
| Name | Description |
|---|---|
Columns | Gets the list of columns defined in the table |
Comment | Comment / Description about the Table |
Constraints | Gets the list of constraints defined for the table (e.g., foreign keys, checks). |
EstimatedRows | Estimated number of rows in the table |
FillFactor | Table storage fill factor (Postgres heap). A value of 0 omits the option (provider default). |
ImmutableRows | When true, rows are not allowed to be modified after INSERT |
Indexes | Gets the list of indexes defined on the table |
NamingStrategy | Naming strategy used for this TableInfo object |
PrimaryKeyColumn | Gets the name of the column designated as the table's primary key |
PrimaryKeyName | Gets the name of the database constraint used as the primary key |
Type | Class Type when generated from a class |
Methods
| Name | Description |
|---|---|
bool AddColumn(IColumnInfo column) | Add a column |
bool AddConstraint(Constraint constraint) | Adds a table-level constraint (for example a foreign key) and attaches it to the matching column when present. |
bool AddIndex(IndexInformation index) | Adds a non-primary-key index and attaches it to matching key columns when present. |
TableInfo Copy() | Ceates a copy of the instance |
IReadOnlyList<string> GetColumnNames() | Returns a readonly list of the Column names (in ordinal order when known) |
byte[] GetHash(HashProvider hash = null) | Get Hash of the current instance |
IReadOnlyList<string> GetMutableColumnNames() | Returns a readonly list of the Column names (in ordinal order when known) that are not marked immutable |
IColumnInfo GetPkColumn() | Returns the IColumnInfo data for the tables Primary Key |
IPredicateNode GetPkPredicate() | Returns a predicate node designed to obtain a row by it's primary key |
string GetSchemaAndName(IConnection connection) | Returns table and schema name delimited by the database connection |
bool TryGetColumnInfo(string columnName, out IColumnInfo column) | Resolves provided column to it's IColumnInfo using a case insensitive comparater |