Search Results for

    Show / Hide Table of Contents

    Interface IColumnTypeSyntax<TNext>

    Defines the column type

    Namespace: FluentMigrator.Builders
    Assembly: FluentMigrator.Abstractions.dll
    Syntax
    public interface IColumnTypeSyntax<TNext> where TNext : IFluentSyntax
    Type Parameters
    Name Description
    TNext

    The interface to return after a type was specified

    Methods

    | Edit this page View Source

    AsAnsiString()

    Defines the column type as ANSI string (single byte character set)

    Declaration
    TNext AsAnsiString()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsAnsiString(int)

    Defines the column type as ANSI string (single byte character set) with the given size

    Declaration
    TNext AsAnsiString(int size)
    Parameters
    Type Name Description
    int size

    The maximum size (usually in bytes) of the ansi string

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsAnsiString(int, string)

    Defines the column type as ANSI string (single byte character set) with the given size and collationName

    Declaration
    TNext AsAnsiString(int size, string collationName)
    Parameters
    Type Name Description
    int size

    The maximum size (usually in bytes) of the ansi string

    string collationName

    The collation to use for this column

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsAnsiString(string)

    Defines the column type as ANSI string (single byte character set) with the given collationName

    Declaration
    TNext AsAnsiString(string collationName)
    Parameters
    Type Name Description
    string collationName

    The collation to use for this column

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsBinary()

    Defines the column type as BLOB

    Declaration
    TNext AsBinary()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsBinary(int)

    Defines the column type as BLOB

    Declaration
    TNext AsBinary(int size)
    Parameters
    Type Name Description
    int size

    The maximum size of the BLOB (in bytes)

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsBoolean()

    Defines the column type as bool (or bit)

    Declaration
    TNext AsBoolean()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsByte()

    Defines the column type as byte

    Declaration
    TNext AsByte()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsCurrency()

    Defines the column type as currency

    Declaration
    TNext AsCurrency()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsCustom(string)

    Defines the column with a custom (DB-specific) type

    Declaration
    TNext AsCustom(string customType)
    Parameters
    Type Name Description
    string customType

    The custom type as SQL identifier

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDate()

    Defines the column type as date

    Declaration
    TNext AsDate()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDateTime()

    Defines the column type as DateTime

    Declaration
    TNext AsDateTime()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDateTime2()

    Defines the column type as DateTime with extended range and precision

    Declaration
    TNext AsDateTime2()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDateTimeOffset()

    Defines the column type as DateTimeOffset

    Declaration
    TNext AsDateTimeOffset()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDateTimeOffset(int)

    Defines the column type as DateTimeOffset

    Declaration
    TNext AsDateTimeOffset(int precision)
    Parameters
    Type Name Description
    int precision

    The number of digits for the fraction of a second

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDecimal()

    Defines the column type as decimal

    Declaration
    TNext AsDecimal()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDecimal(int, int)

    Defines the column type as decimal with given size and precision

    Declaration
    TNext AsDecimal(int size, int precision)
    Parameters
    Type Name Description
    int size

    The number of digits

    int precision

    The number of digits after the comma

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsDouble()

    Defines the column type as double

    Declaration
    TNext AsDouble()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsFixedLengthAnsiString(int)

    Defines the column type as ANSI string with fixed length

    Declaration
    TNext AsFixedLengthAnsiString(int size)
    Parameters
    Type Name Description
    int size

    The length of the string in bytes

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsFixedLengthAnsiString(int, string)

    Defines the column type as ANSI string with fixed length

    Declaration
    TNext AsFixedLengthAnsiString(int size, string collationName)
    Parameters
    Type Name Description
    int size

    The length of the string in bytes

    string collationName

    The name of the collation to use

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsFixedLengthString(int)

    Defines the column type as unicode string with a fixed length

    Declaration
    TNext AsFixedLengthString(int size)
    Parameters
    Type Name Description
    int size

    The maximum length of the string in code points

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsFixedLengthString(int, string)

    Defines the column type as unicode string with a fixed length

    Declaration
    TNext AsFixedLengthString(int size, string collationName)
    Parameters
    Type Name Description
    int size

    The length of the string in code points

    string collationName

    The name of the collation to use

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsFloat()

    Defines the column type as a float

    Declaration
    TNext AsFloat()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsGuid()

    Defines the column type as a Guid

    Declaration
    TNext AsGuid()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsInt16()

    Defines the column type as a short

    Declaration
    TNext AsInt16()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsInt32()

    Defines the column type as a int

    Declaration
    TNext AsInt32()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsInt64()

    Defines the column type as a long

    Declaration
    TNext AsInt64()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsString()

    Defines the column type as unicode string

    Declaration
    TNext AsString()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsString(int)

    Defines the column type as unicode string

    Declaration
    TNext AsString(int size)
    Parameters
    Type Name Description
    int size

    The maximum length in code points

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsString(int, string)

    Defines the column type as unicode string

    Declaration
    TNext AsString(int size, string collationName)
    Parameters
    Type Name Description
    int size

    The maximum length in code points

    string collationName

    The name of the collation

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsString(string)

    Defines the column type as unicode string

    Declaration
    TNext AsString(string collationName)
    Parameters
    Type Name Description
    string collationName

    The name of the collation

    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsTime()

    Defines the column type as TimeSpan

    Declaration
    TNext AsTime()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsXml()

    Defines the column type as XML

    Declaration
    TNext AsXml()
    Returns
    Type Description
    TNext

    The next step

    | Edit this page View Source

    AsXml(int)

    Defines the column type as XML

    Declaration
    TNext AsXml(int size)
    Parameters
    Type Name Description
    int size

    The maximum size

    Returns
    Type Description
    TNext

    The next step

    • Edit this page
    • View Source
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.