public void DateTime2Column(int length) { var type = "datetime2"; if (length > 0) { type += $"({length})"; } CreateTable(type, TestTableCreator.GetDateTimeSqlValue(_dbContext)); }
public void FloatColumn(int prec) { var type = "float"; if (prec > 0) { type += $"({prec})"; } CreateTable(type, TestTableCreator.GetBinaryFloatSqlValue()); }
public void Number(string prec, string scale) { if (scale == null) { CreateTable($"number({prec})", TestTableCreator.GetFloat47SqlValue()); } else { CreateTable($"number({prec}, {scale})", TestTableCreator.GetFloatSqlValue()); } }
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()); } }
public void BitColumn() { CreateTable("bit", TestTableCreator.GetBoolSqlValue()); }
public void BigIntColumn() { CreateTable("bigint", TestTableCreator.GetInt64SqlValue()); }
public void BinaryColumn() { CreateTable("binary(50)", TestTableCreator.GetRawSqlValue(_dbContext)); }
public void NTextColumn() { CreateTable("ntext", TestTableCreator.GetNLongTextSqlValue(_dbContext)); }
public void Varchar(int length) { var type = length == -1 ? "varchar(max)" : $"varchar({length})"; CreateTable(type, TestTableCreator.GetLongTextSqlValue()); }
public void LongColumn() { CreateTable("long", TestTableCreator.GetLongTextSqlValue()); }
public void NumericColumn(int prec, int scale) { CreateTable($"numeric({prec}, {scale})", TestTableCreator.GetDecSqlValue()); }
public void Text() { CreateTable("text", TestTableCreator.GetLongTextSqlValue()); }
public void Time() { CreateTable("time", TestTableCreator.GetTimeSqlValue(_dbContext)); }
public void SmallMoneyColumn() { CreateTable("smallmoney", TestTableCreator.GetSmallMoneySqlValue()); }
public void Real() { CreateTable("real", TestTableCreator.GetBinaryFloatSqlValue()); }
public void SmallIntColumn() { CreateTable("smallint", TestTableCreator.GetInt16SqlValue()); }
public void SmallDateTime() { CreateTable("smalldatetime", TestTableCreator.GetSmallDateTimeSqlValue(_dbContext)); }
public void NVarchar(int length) { var type = length == -1 ? "nvarchar(max)" : $"nvarchar({length})"; CreateTable(type, TestTableCreator.GetNVarcharSqlValue(_dbContext)); }
public void CharColumn(int length) { CreateTable($"char({length})", TestTableCreator.GetCharSqlValue()); }
public void ImageColumn() { CreateTable("image", TestTableCreator.GetBlobSqlValue(_dbContext)); }
public void DateTimeColumn() { CreateTable("datetime", TestTableCreator.GetDateTimeSqlValue(_dbContext)); }
public void MoneyColumn() { CreateTable("money", TestTableCreator.GetMoneySqlValue()); }
public void DecimalColumn(int prec, int scale) { CreateTable($"decimal({prec}, {scale})", TestTableCreator.GetDecSqlValue()); }
public void LongRawColumn() { CreateTable("long raw", TestTableCreator.GetBlobSqlValue(_dbContext)); }
public void TinyInt() { CreateTable("tinyint", TestTableCreator.GetInt8SqlValue()); }
public void Number() { CreateTable("number", TestTableCreator.GetFloatSqlValue()); }
public void IntColumn() { CreateTable("int", TestTableCreator.GetIntSqlValue()); }
public void Guid() { CreateTable("uniqueidentifier", TestTableCreator.GetGuidSqlValue(_dbContext)); }
public void NCharColumn(int length) { CreateTable($"nchar({length})", TestTableCreator.GetNCharSqlValue(_dbContext)); }
public void Varbinary(int length) { var type = length == -1 ? "varbinary(max)" : $"varbinary({length})"; CreateTable(type, TestTableCreator.GetBlobSqlValue(_dbContext)); }