Interface ISqlColumnBuilder
Represents an SQL table column builder.
public interface ISqlColumnBuilder : ISqlObjectBuilder- Inherited Members
- Extension Methods
Properties
Computation
Underlying optional SqlColumnComputation of this column.
SqlColumnComputation? Computation { get; }Property Value
DefaultValue
Underlying optional default value expression.
SqlExpressionNode? DefaultValue { get; }Property Value
IsNullable
Specifies whether or not this column accepts null values.
bool IsNullable { get; }Property Value
Node
Underlying SqlColumnBuilderNode instance that represents this column.
SqlColumnBuilderNode Node { get; }Property Value
ReferencedComputationColumns
Collection of columns referenced by this column's Computation.
IReadOnlyCollection<ISqlColumnBuilder> ReferencedComputationColumns { get; }Property Value
Table
Table that this column belongs to.
ISqlTableBuilder Table { get; }Property Value
TypeDefinition
ISqlColumnTypeDefinition instance that defines the data type of this column.
ISqlColumnTypeDefinition TypeDefinition { get; }Property Value
Methods
Asc()
Creates a new SqlOrderByNode instance from this column with Asc ordering.
[Pure]
SqlOrderByNode Asc()Returns
- SqlOrderByNode
- New SqlOrderByNode instance. 
Desc()
Creates a new SqlOrderByNode instance from this column with Desc ordering.
[Pure]
SqlOrderByNode Desc()Returns
- SqlOrderByNode
- New SqlOrderByNode instance. 
MarkAsNullable(bool)
Changes IsNullable value of this column.
ISqlColumnBuilder MarkAsNullable(bool enabled = true)Parameters
- enabledbool
- Value to set. Equal to true by default. 
Returns
- ISqlColumnBuilder
- this. 
Exceptions
- SqlObjectBuilderException
- When nullability cannot be changed. 
SetComputation(SqlColumnComputation?)
Changes Computation value of this column.
ISqlColumnBuilder SetComputation(SqlColumnComputation? computation)Parameters
- computationSqlColumnComputation?
- Value to set. 
Returns
- ISqlColumnBuilder
- this. 
Remarks
Changing the computation to non-null will reset the DefaultValue to null.
Exceptions
- SqlObjectBuilderException
- When computation cannot be changed. 
SetDefaultValue(SqlExpressionNode?)
Changes DefaultValue value of this column.
ISqlColumnBuilder SetDefaultValue(SqlExpressionNode? value)Parameters
- valueSqlExpressionNode
- Value to set. 
Returns
- ISqlColumnBuilder
- this. 
Exceptions
- SqlObjectBuilderException
- When default value cannot be changed. 
SetName(string)
Changes the name of this object.
ISqlColumnBuilder SetName(string name)Parameters
- namestring
- Name to set. 
Returns
- ISqlColumnBuilder
- this. 
Exceptions
- SqlObjectBuilderException
- When name cannot be changed. 
SetType(ISqlColumnTypeDefinition)
Changes TypeDefinition value of this column.
ISqlColumnBuilder SetType(ISqlColumnTypeDefinition definition)Parameters
- definitionISqlColumnTypeDefinition
- Value to set. 
Returns
- ISqlColumnBuilder
- this. 
Remarks
Changing the type will reset the DefaultValue to null.
Exceptions
- SqlObjectBuilderException
- When type definition cannot be changed.