public static ICreateTableColumnOptionOrWithColumnSyntax AsMyDateTime( this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax) { if (!DbProvider.IsPostgre) { return(createTableColumnAsTypeSyntax.AsDateTime()); } return(createTableColumnAsTypeSyntax.AsCustom("TimestampTz")); }
public static ICreateTableColumnOptionOrWithColumnSyntax AsVarcharString( this ICreateTableColumnAsTypeSyntax columnTypeSyntax, int size, bool nullable = false) { var customType = string.Format(@"VARCHAR({0})", size); var intermediate = columnTypeSyntax.AsCustom(customType); return(nullable ? intermediate.Nullable() : intermediate.NotNullable()); }
public static ICreateTableColumnOptionOrWithColumnSyntax AsDateTimeOffset(this ICreateTableColumnAsTypeSyntax create) { return(create.AsCustom("DateTimeOffset")); }
public static ICreateTableColumnOptionOrWithColumnSyntax AsJson( this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax) { return(createTableColumnAsTypeSyntax.AsCustom("Json")); }
public static ICreateTableColumnOptionOrWithColumnSyntax AsMaxString(this ICreateTableColumnAsTypeSyntax syntax) { return(syntax.AsCustom("nvarchar(MAX)")); }
public static ICreateTableColumnOptionOrWithColumnSyntax AsTINYINT(this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax) { return(createTableColumnAsTypeSyntax.AsCustom("tinyint")); }