Ejemplo n.º 1
0
        public static ICreateTableColumnOptionOrWithColumnSyntax AsMyDateTime(
            this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax)
        {
            if (!DbProvider.IsPostgre)
            {
                return(createTableColumnAsTypeSyntax.AsDateTime());
            }

            return(createTableColumnAsTypeSyntax.AsCustom("TimestampTz"));
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public static ICreateTableColumnOptionOrWithColumnSyntax AsDateTimeOffset(this ICreateTableColumnAsTypeSyntax create)
 {
     return(create.AsCustom("DateTimeOffset"));
 }
Ejemplo n.º 4
0
 public static ICreateTableColumnOptionOrWithColumnSyntax AsJson(
     this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax)
 {
     return(createTableColumnAsTypeSyntax.AsCustom("Json"));
 }
Ejemplo n.º 5
0
 public static ICreateTableColumnOptionOrWithColumnSyntax AsMaxString(this ICreateTableColumnAsTypeSyntax syntax)
 {
     return(syntax.AsCustom("nvarchar(MAX)"));
 }
Ejemplo n.º 6
0
 public static ICreateTableColumnOptionOrWithColumnSyntax AsTINYINT(this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax)
 {
     return(createTableColumnAsTypeSyntax.AsCustom("tinyint"));
 }