Class SqlSchemaBuilder
Represents an SQL schema builder.
public abstract class SqlSchemaBuilder : SqlObjectBuilder, ISqlSchemaBuilder, ISqlObjectBuilder
- Inheritance
-
SqlSchemaBuilder
- Implements
- Derived
- Inherited Members
Constructors
SqlSchemaBuilder(SqlDatabaseBuilder, string, SqlObjectBuilderCollection)
Creates a new SqlSchemaBuilder instance.
protected SqlSchemaBuilder(SqlDatabaseBuilder database, string name, SqlObjectBuilderCollection objects)
Parameters
database
SqlDatabaseBuilderDatabase that this schema belongs to.
name
stringObject's name.
objects
SqlObjectBuilderCollectionCollection of objects that belong to this schema.
Properties
CanRemove
Specifies whether or not this object can be removed.
public override bool CanRemove { get; }
Property Value
Objects
Collection of objects that belong to this schema.
public SqlObjectBuilderCollection Objects { 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.
QuickRemoveCore()
Performs a quick removal of this object.
protected override void QuickRemoveCore()
Remarks
See QuickRemove(SqlObjectBuilder) for more information.
Exceptions
- NotSupportedException
Quick removal of schemas is not supported by default.
QuickRemoveObjects()
Quick-removes all Objects.
protected void QuickRemoveObjects()
ResetAllTableAndViewInfoCache()
Resets SqlRecordSetInfo of all tables and views.
protected void ResetAllTableAndViewInfoCache()
Remarks
See ResetInfo(SqlTableBuilder) and ResetInfo(SqlViewBuilder) for more information.
SetName(string)
Changes the name of this object.
public SqlSchemaBuilder SetName(string name)
Parameters
name
stringName to set.
Returns
- SqlSchemaBuilder
this.
Exceptions
- SqlObjectBuilderException
When name cannot be changed.
ThrowIfDefault()
Throws an exception when this schema is the Default schema.
protected void ThrowIfDefault()
Exceptions
- SqlObjectBuilderException
When this schema is the Default schema.