Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Schema.Interfaces.ITable Interface Reference

Interface for table like structures More...

Inheritance diagram for Utilities.ORM.Manager.Schema.Interfaces.ITable:
Utilities.ORM.Manager.Schema.BaseClasses.TableBase Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure Utilities.ORM.Manager.Schema.Default.Database.Table Utilities.ORM.Manager.Schema.Default.Database.View

Public Member Functions

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...
 
void AddForeignKey (string ColumnName, string ForeignKeyTable, string ForeignKeyColumn)
 Adds a foreign key More...
 
ITrigger AddTrigger (string Name, string Definition, 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...
 

Properties

ICollection< IColumnColumns [get]
 Columns More...
 
string Name [get, set]
 Name More...
 
ISource Source [get]
 Parent of the table structure More...
 
ICollection< ITriggerTriggers [get]
 Triggers associated with the table (if source supports them) More...
 
IColumn this[string Name] [get]
 Returns the specified column More...
 

Detailed Description

Interface for table like structures

Definition at line 31 of file ITable.cs.

Member Function Documentation

IColumn Utilities.ORM.Manager.Schema.Interfaces.ITable.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 = "",
DefaultValue = default(T),
bool  OnDeleteCascade = false,
bool  OnUpdateCascade = false,
bool  OnDeleteSetNull = false 
)

Adds a column

Parameters
ColumnNameColumn Name
ColumnTypeData type
LengthData length
NullableNullable?
IdentityIdentity?
IndexIndex?
PrimaryKeyPrimary key?
UniqueUnique?
ForeignKeyTableForeign key table
ForeignKeyColumnForeign key column
DefaultValueDefault value
OnDeleteCascadeOn Delete Cascade
OnUpdateCascadeOn Update Cascade
OnDeleteSetNullOn Delete Set Null
Template Parameters
TColumn type

Implemented in Utilities.ORM.Manager.Schema.BaseClasses.TableBase, Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.

void Utilities.ORM.Manager.Schema.Interfaces.ITable.AddForeignKey ( string  ColumnName,
string  ForeignKeyTable,
string  ForeignKeyColumn 
)

Adds a foreign key

Parameters
ColumnNameColumn name
ForeignKeyTableForeign key table
ForeignKeyColumnForeign key column

Implemented in Utilities.ORM.Manager.Schema.BaseClasses.TableBase, Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.

ITrigger Utilities.ORM.Manager.Schema.Interfaces.ITable.AddTrigger ( string  Name,
string  Definition,
TriggerType  Type 
)

Adds a trigger to the table

Parameters
NameName of the trigger
DefinitionTrigger definition
TypeTrigger type
Returns
Trigger added to the table

Implemented in Utilities.ORM.Manager.Schema.Default.Database.StoredProcedure, Utilities.ORM.Manager.Schema.Default.Database.View, and Utilities.ORM.Manager.Schema.Default.Database.Table.

bool Utilities.ORM.Manager.Schema.Interfaces.ITable.ContainsColumn ( string  ColumnName)

Determines if a column exists in the table

Parameters
ColumnNameColumn name
Returns
True if it exists, false otherwise

Implemented in Utilities.ORM.Manager.Schema.BaseClasses.TableBase.

void Utilities.ORM.Manager.Schema.Interfaces.ITable.SetupForeignKeys ( )

Sets up foreign keys

Implemented in Utilities.ORM.Manager.Schema.BaseClasses.TableBase.

Property Documentation

ICollection<IColumn> Utilities.ORM.Manager.Schema.Interfaces.ITable.Columns
get

Columns

Definition at line 36 of file ITable.cs.

string Utilities.ORM.Manager.Schema.Interfaces.ITable.Name
getset

Name

Definition at line 41 of file ITable.cs.

ISource Utilities.ORM.Manager.Schema.Interfaces.ITable.Source
get

Parent of the table structure

Definition at line 46 of file ITable.cs.

IColumn Utilities.ORM.Manager.Schema.Interfaces.ITable.this[string Name]
get

Returns the specified column

Parameters
NameName of the column
Returns
Column specified

Definition at line 58 of file ITable.cs.

ICollection<ITrigger> Utilities.ORM.Manager.Schema.Interfaces.ITable.Triggers
get

Triggers associated with the table (if source supports them)

Definition at line 51 of file ITable.cs.


The documentation for this interface was generated from the following file: