Class SqlTableBuilder
Represents an SQL table builder.
public abstract class SqlTableBuilder : SqlObjectBuilder, ISqlTableBuilder, ISqlObjectBuilder
- Inheritance
-
SqlTableBuilder
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SqlTableBuilder(SqlSchemaBuilder, string, SqlColumnBuilderCollection, SqlConstraintBuilderCollection)
Creates a new SqlTableBuilder instance.
protected SqlTableBuilder(SqlSchemaBuilder schema, string name, SqlColumnBuilderCollection columns, SqlConstraintBuilderCollection constraints)
Parameters
schema
SqlSchemaBuilderSchema that this table belongs to.
name
stringObject's name.
columns
SqlColumnBuilderCollectionCollection of columns that belong to this table.
constraints
SqlConstraintBuilderCollectionCollection of constraints that belong to this table.
Properties
Columns
Collection of columns that belong to this table.
public SqlColumnBuilderCollection Columns { get; }
Property Value
Constraints
Collection of constraints that belong to this table.
public SqlConstraintBuilderCollection Constraints { get; }
Property Value
Info
Represents a full name information of this table.
public SqlRecordSetInfo Info { get; }
Property Value
Node
Underlying SqlTableBuilderNode instance that represents this table.
public SqlTableBuilderNode Node { get; }
Property Value
Schema
Schema that this table belongs to.
public SqlSchemaBuilder Schema { get; }
Property Value
Methods
AfterNameChange(string)
Callback invoked just after Name change has been processed.
protected override void AfterNameChange(string originalValue)
Parameters
originalValue
stringOriginal value.
AfterRemove()
Callback invoked just after the removal has been processed.
protected override void AfterRemove()
BeforeNameChange(string)
Callback invoked just before Name change is processed.
protected override SqlPropertyChange<string> BeforeNameChange(string newValue)
Parameters
newValue
stringValue to set.
Returns
- SqlPropertyChange<string>
SqlPropertyChange<T> instance associated with Name change attempt.
Exceptions
- SqlObjectBuilderException
When Name of this object cannot be changed.
BeforeRemove()
Callback invoked just before the removal is processed.
protected override void BeforeRemove()
Exceptions
- SqlObjectBuilderException
When this object cannot be removed.
QuickRemoveColumns()
Removes all Columns from this table. This is a version for the QuickRemoveCore() method.
protected void QuickRemoveColumns()
QuickRemoveConstraints()
Removes all Constraints from this table. This is a version for the QuickRemoveCore() method.
protected void QuickRemoveConstraints()
QuickRemoveCore()
Performs a quick removal of this object.
protected override void QuickRemoveCore()
Remarks
See QuickRemove(SqlObjectBuilder) for more information.
SetName(string)
Changes the name of this object.
public SqlTableBuilder SetName(string name)
Parameters
name
stringName to set.
Returns
- SqlTableBuilder
this.
Exceptions
- SqlObjectBuilderException
When name cannot be changed.
ToString()
Returns a string representation of this SqlTableBuilder instance.
[Pure]
public override string ToString()
Returns
- string
String representation.