Craig's Utility Library
4.0 Beta
|
Table base class More...
Public Member Functions | |
abstract IColumn | AddColumn< T > (string ColumnName, DbType ColumnType, int Length=0, bool Nullable=true, bool Identity=false, bool Index=false, bool PrimaryKey=false, bool Unique=false, string ForeignKeyTable="", string ForeignKeyColumn="", T DefaultValue=default(T), bool OnDeleteCascade=false, bool OnUpdateCascade=false, bool OnDeleteSetNull=false) |
Adds a column More... | |
abstract void | AddForeignKey (string ColumnName, string ForeignKeyTable, string ForeignKeyColumn) |
Adds a foreign key More... | |
abstract ITrigger | AddTrigger (string Name, string Definition, Enums.TriggerType Type) |
Adds a trigger to the table More... | |
bool | ContainsColumn (string ColumnName) |
Determines if a column exists in the table More... | |
void | SetupForeignKeys () |
Sets up foreign keys More... | |
Public Member Functions inherited from Utilities.ORM.Manager.Schema.Interfaces.ITable | |
ITrigger | AddTrigger (string Name, string Definition, TriggerType Type) |
Adds a trigger to the table More... | |
Protected Member Functions | |
TableBase (string Name, ISource Source) | |
Constructor More... | |
Properties | |
ICollection< IColumn > | Columns [get] |
Columns More... | |
string | Name [get, set] |
Name of the table More... | |
ISource | Source [get] |
Source/Parent More... | |
ICollection< ITrigger > | Triggers [get] |
List of triggers associated with the table More... | |
IColumn | this[string Name] [get] |
The column specified More... | |
Properties inherited from Utilities.ORM.Manager.Schema.Interfaces.ITable | |
ICollection< IColumn > | Columns [get] |
Columns More... | |
string | Name [get, set] |
Name More... | |
ISource | Source [get] |
Parent of the table structure More... | |
ICollection< ITrigger > | Triggers [get] |
Triggers associated with the table (if source supports them) More... | |
IColumn | this[string Name] [get] |
Returns the specified column More... | |
Table base class
Definition at line 33 of file TableBase.cs.
|
protected |
Constructor
Name | Name of the table |
Source | Source that the table is from |
Definition at line 40 of file TableBase.cs.
|
pure virtual |
Adds a column
ColumnName | Column Name |
ColumnType | Data type |
Length | Data length |
Nullable | Nullable? |
Identity | Identity? |
Index | Index? |
PrimaryKey | Primary key? |
Unique | Unique? |
ForeignKeyTable | Foreign key table |
ForeignKeyColumn | Foreign key column |
DefaultValue | Default value |
OnDeleteCascade | On Delete Cascade |
OnUpdateCascade | On Update Cascade |
OnDeleteSetNull | On Delete Set Null |
T | Column type |
Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.
Implemented in Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.
|
pure virtual |
Adds a foreign key
ColumnName | Column name |
ForeignKeyTable | Foreign key table |
ForeignKeyColumn | Foreign key column |
Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.
Implemented in Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.
|
pure virtual |
Adds a trigger to the table
Name | Name of the trigger |
Definition | Definition of the trigger |
Type | Trigger type |
bool Utilities.ORM.Manager.Schema.BaseClasses.TableBase.ContainsColumn | ( | string | ColumnName | ) |
Determines if a column exists in the table
ColumnName | Column name |
Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.
Definition at line 113 of file TableBase.cs.
void Utilities.ORM.Manager.Schema.BaseClasses.TableBase.SetupForeignKeys | ( | ) |
Sets up foreign keys
Implements Utilities.ORM.Manager.Schema.Interfaces.ITable.
Definition at line 121 of file TableBase.cs.
|
get |
Columns
Definition at line 51 of file TableBase.cs.
|
getset |
Name of the table
Definition at line 56 of file TableBase.cs.
|
get |
Source/Parent
Definition at line 61 of file TableBase.cs.
The column specified
Name | Name of the column |
Definition at line 131 of file TableBase.cs.
|
get |
List of triggers associated with the table
Definition at line 66 of file TableBase.cs.