Class MySqlColumnBuilder
Represents an SQL table column builder.
public sealed class MySqlColumnBuilder : SqlColumnBuilder, ISqlColumnBuilder, ISqlObjectBuilder
- Inheritance
-
MySqlColumnBuilder
- Implements
- Inherited Members
- Extension Methods
Remarks
MySqlDialect implementation.
Properties
Database
Database that this object belongs to.
public MySqlDatabaseBuilder Database { get; }
Property Value
Table
Table that this column belongs to.
public MySqlTableBuilder Table { get; }
Property Value
Methods
MarkAsNullable(bool)
Changes IsNullable value of this column.
public MySqlColumnBuilder MarkAsNullable(bool enabled = true)
Parameters
enabled
boolValue to set. Equal to true by default.
Returns
- MySqlColumnBuilder
this.
Exceptions
- SqlObjectBuilderException
When nullability cannot be changed.
SetComputation(SqlColumnComputation?)
Changes Computation value of this column.
public MySqlColumnBuilder SetComputation(SqlColumnComputation? computation)
Parameters
computation
SqlColumnComputation?Value to set.
Returns
- MySqlColumnBuilder
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.
public MySqlColumnBuilder SetDefaultValue(SqlExpressionNode? value)
Parameters
value
SqlExpressionNodeValue to set.
Returns
- MySqlColumnBuilder
this.
Exceptions
- SqlObjectBuilderException
When default value cannot be changed.
SetName(string)
Changes the name of this object.
public MySqlColumnBuilder SetName(string name)
Parameters
name
stringName to set.
Returns
- MySqlColumnBuilder
this.
Exceptions
- SqlObjectBuilderException
When name cannot be changed.
SetType(SqlColumnTypeDefinition)
Changes TypeDefinition value of this column.
public MySqlColumnBuilder SetType(SqlColumnTypeDefinition definition)
Parameters
definition
SqlColumnTypeDefinitionValue to set.
Returns
- MySqlColumnBuilder
this.
Remarks
Changing the type will reset the DefaultValue to null.
Exceptions
- SqlObjectBuilderException
When type definition cannot be changed.