예제 #1
0
        public void DateTime2Column(int length)
        {
            var type = "datetime2";

            if (length > 0)
            {
                type += $"({length})";
            }
            CreateTable(type, TestTableCreator.GetDateTimeSqlValue(_dbContext));
        }
예제 #2
0
        public void FloatColumn(int prec)
        {
            var type = "float";

            if (prec > 0)
            {
                type += $"({prec})";
            }
            CreateTable(type, TestTableCreator.GetBinaryFloatSqlValue());
        }
예제 #3
0
 public void Number(string prec, string scale)
 {
     if (scale == null)
     {
         CreateTable($"number({prec})", TestTableCreator.GetFloat47SqlValue());
     }
     else
     {
         CreateTable($"number({prec}, {scale})", TestTableCreator.GetFloatSqlValue());
     }
 }
예제 #4
0
 public void FloatColumn(int length)
 {
     if (length <= 0)
     {
         CreateTable("float", TestTableCreator.GetBinaryDoubleSqlValue());
     }
     else if (length > 24)
     {
         CreateTable($"float({length})", TestTableCreator.GetBinaryDoubleSqlValue());
     }
     else
     {
         CreateTable($"float({length})", TestTableCreator.GetBinaryFloatSqlValue());
     }
 }
예제 #5
0
 public void BitColumn()
 {
     CreateTable("bit", TestTableCreator.GetBoolSqlValue());
 }
예제 #6
0
 public void BigIntColumn()
 {
     CreateTable("bigint", TestTableCreator.GetInt64SqlValue());
 }
예제 #7
0
 public void BinaryColumn()
 {
     CreateTable("binary(50)", TestTableCreator.GetRawSqlValue(_dbContext));
 }
예제 #8
0
 public void NTextColumn()
 {
     CreateTable("ntext", TestTableCreator.GetNLongTextSqlValue(_dbContext));
 }
예제 #9
0
        public void Varchar(int length)
        {
            var type = length == -1 ? "varchar(max)" : $"varchar({length})";

            CreateTable(type, TestTableCreator.GetLongTextSqlValue());
        }
예제 #10
0
 public void LongColumn()
 {
     CreateTable("long", TestTableCreator.GetLongTextSqlValue());
 }
예제 #11
0
 public void NumericColumn(int prec, int scale)
 {
     CreateTable($"numeric({prec}, {scale})", TestTableCreator.GetDecSqlValue());
 }
예제 #12
0
 public void Text()
 {
     CreateTable("text", TestTableCreator.GetLongTextSqlValue());
 }
예제 #13
0
 public void Time()
 {
     CreateTable("time", TestTableCreator.GetTimeSqlValue(_dbContext));
 }
예제 #14
0
 public void SmallMoneyColumn()
 {
     CreateTable("smallmoney", TestTableCreator.GetSmallMoneySqlValue());
 }
예제 #15
0
 public void Real()
 {
     CreateTable("real", TestTableCreator.GetBinaryFloatSqlValue());
 }
예제 #16
0
 public void SmallIntColumn()
 {
     CreateTable("smallint", TestTableCreator.GetInt16SqlValue());
 }
예제 #17
0
 public void SmallDateTime()
 {
     CreateTable("smalldatetime", TestTableCreator.GetSmallDateTimeSqlValue(_dbContext));
 }
예제 #18
0
        public void NVarchar(int length)
        {
            var type = length == -1 ? "nvarchar(max)" : $"nvarchar({length})";

            CreateTable(type, TestTableCreator.GetNVarcharSqlValue(_dbContext));
        }
예제 #19
0
 public void CharColumn(int length)
 {
     CreateTable($"char({length})", TestTableCreator.GetCharSqlValue());
 }
예제 #20
0
 public void ImageColumn()
 {
     CreateTable("image", TestTableCreator.GetBlobSqlValue(_dbContext));
 }
예제 #21
0
 public void DateTimeColumn()
 {
     CreateTable("datetime", TestTableCreator.GetDateTimeSqlValue(_dbContext));
 }
예제 #22
0
 public void MoneyColumn()
 {
     CreateTable("money", TestTableCreator.GetMoneySqlValue());
 }
예제 #23
0
 public void DecimalColumn(int prec, int scale)
 {
     CreateTable($"decimal({prec}, {scale})", TestTableCreator.GetDecSqlValue());
 }
예제 #24
0
 public void LongRawColumn()
 {
     CreateTable("long raw", TestTableCreator.GetBlobSqlValue(_dbContext));
 }
예제 #25
0
 public void TinyInt()
 {
     CreateTable("tinyint", TestTableCreator.GetInt8SqlValue());
 }
예제 #26
0
 public void Number()
 {
     CreateTable("number", TestTableCreator.GetFloatSqlValue());
 }
예제 #27
0
 public void IntColumn()
 {
     CreateTable("int", TestTableCreator.GetIntSqlValue());
 }
예제 #28
0
 public void Guid()
 {
     CreateTable("uniqueidentifier", TestTableCreator.GetGuidSqlValue(_dbContext));
 }
예제 #29
0
 public void NCharColumn(int length)
 {
     CreateTable($"nchar({length})", TestTableCreator.GetNCharSqlValue(_dbContext));
 }
예제 #30
0
        public void Varbinary(int length)
        {
            var type = length == -1 ? "varbinary(max)" : $"varbinary({length})";

            CreateTable(type, TestTableCreator.GetBlobSqlValue(_dbContext));
        }