Interface IColumnTypeBuilder<TNext>
Builds a column type expression.
Namespace: Umbraco.Cms.Infrastructure.Migrations.Expressions.Common
Assembly: Umbraco.Infrastructure.dll
Syntax
public interface IColumnTypeBuilder<out TNext> : IFluentBuilder where TNext : IFluentBuilder
Type Parameters
| Name | Description |
|---|---|
| TNext |
Methods
View SourceAsAnsiString()
Sets the column type to an ANSI (non-Unicode) string.
Declaration
TNext AsAnsiString()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsAnsiString(int)
Defines the column type as an ANSI string with the specified size.
Declaration
TNext AsAnsiString(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The maximum size of the ANSI string. |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsBinary()
Sets the column type to a binary data type.
Declaration
TNext AsBinary()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsBinary(int)
Sets the column type to binary with the specified size in bytes.
Declaration
TNext AsBinary(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The maximum number of bytes for the binary column. |
Returns
| Type | Description |
|---|---|
| TNext | An instance representing the next step in the column type builder chain. |
AsBoolean()
Sets the column type to boolean.
Declaration
TNext AsBoolean()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsByte()
Specifies that the column should have a byte data type.
Declaration
TNext AsByte()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder fluent interface. |
AsCurrency()
Specifies that the column should use a currency-compatible data type.
Declaration
TNext AsCurrency()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsCustom(string)
Specifies a custom database column type for the column being defined.
Declaration
TNext AsCustom(string customType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | customType | A string representing the custom database column type. |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsDate()
Sets the column type to a date type in the database schema.
Declaration
TNext AsDate()
Returns
| Type | Description |
|---|---|
| TNext | An object representing the next step in the migration expression. |
AsDateTime()
Sets the column type to DateTime.
Declaration
TNext AsDateTime()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsDecimal()
Sets the column type to a decimal data type in the database schema.
Declaration
TNext AsDecimal()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsDecimal(int, int)
Sets the column type to decimal with the specified size and precision.
Declaration
TNext AsDecimal(int size, int precision)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The total number of digits that the decimal column can store. |
| int | precision | The number of digits to the right of the decimal point. |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsDouble()
Sets the column type to a double-precision floating-point number.
Declaration
TNext AsDouble()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsFixedLengthAnsiString(int)
Sets the column type to a fixed-length ANSI string of the specified size.
Declaration
TNext AsFixedLengthAnsiString(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The length of the fixed-length ANSI string column. |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsFixedLengthString(int)
Defines the column as a fixed length string with the specified size.
Declaration
TNext AsFixedLengthString(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The fixed length size of the string. |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsFloat()
Sets the database column type to a floating-point number.
Declaration
TNext AsFloat()
Returns
| Type | Description |
|---|---|
| TNext | The next builder in the expression chain. |
AsGuid()
Sets the column type to GUID (Globally Unique Identifier).
Declaration
TNext AsGuid()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsInt16()
Sets the column type to Int16 (short).
Declaration
TNext AsInt16()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsInt32()
Sets the column type to a 32-bit integer (Int32).
Declaration
TNext AsInt32()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsInt64()
Sets the column type to Int64 (a 64-bit integer).
Declaration
TNext AsInt64()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsString()
Sets the column type to a string (typically maps to a VARCHAR or NVARCHAR in the database).
Declaration
TNext AsString()
Returns
| Type | Description |
|---|---|
| TNext | An instance of |
AsString(int)
Specifies that the column should be of type string with a maximum length.
Declaration
TNext AsString(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size | The maximum number of characters allowed in the string column. |
Returns
| Type | Description |
|---|---|
| TNext | An object representing the next step in the column type builder chain. |
AsTime()
Specifies that the column type should be set to a time data type.
Declaration
TNext AsTime()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsXml()
Specifies that the column type should be XML.
Declaration
TNext AsXml()
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |
AsXml(int)
Defines the column type as XML.
Declaration
TNext AsXml(int size)
Parameters
| Type | Name | Description |
|---|---|---|
| int | size |
Returns
| Type | Description |
|---|---|
| TNext | The next step in the column type builder chain. |