/// <summary> /// Initializes a new instance of the <see cref="ProcedureGenerator"/> class. /// </summary> /// <param name="table">The table.</param> public ProcedureGenerator(DatabaseTable table) : base(table) { SqlWriter = new SqlWriter(table, SqlType.SqlServer); SqlType? originSqlType = null; if (table.DatabaseSchema != null) originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); _dataTypeWriter = new DataTypeWriter(originSqlType); }
public TableGenerator(DatabaseTable table) : base(table) { SqlType? originSqlType = null; if (table.DatabaseSchema != null) originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); DataTypeWriter = new DataTypeWriter(originSqlType); }
public TableGenerator(DatabaseTable table) : base(table) { SqlType?originSqlType = null; if (table.DatabaseSchema != null) { originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); } DataTypeWriter = new DataTypeWriter(originSqlType); }
/// <summary> /// Initializes a new instance of the <see cref="ProcedureGenerator"/> class. /// </summary> /// <param name="table">The table.</param> public ProcedureGenerator(DatabaseTable table) : base(table) { SqlWriter = new SqlWriter(table, SqlType.SqlServer); SqlType?originSqlType = null; if (table.DatabaseSchema != null) { originSqlType = ProviderToSqlType.Convert(table.DatabaseSchema.Provider); } _dataTypeWriter = new DataTypeWriter(originSqlType); }
public void TestBinary() { //arrange _column.DbDataType = "BINARY"; _column.Length = 400; //specify that we are coming from SqlServer, so keep Binary format var typeWriter = new DataTypeWriter(SqlType.SqlServer); //act var result = typeWriter.WriteDataType(_column); //assert Assert.AreEqual("BINARY (400)", result); }
public TableGenerator(DatabaseTable table) : base(table) { DataTypeWriter = new DataTypeWriter(); }
protected override string ColumnDataType(string dataType) { return(DataTypeWriter.WriteDataType(dataType)); }
/// <summary> /// Initializes a new instance of the <see cref="ProcedureGenerator"/> class. /// </summary> /// <param name="table">The table.</param> public ProcedureGenerator(DatabaseTable table) : base(table) { SqlWriter = new SqlWriter(table, SqlType.SqlServer); _dataTypeWriter = new DataTypeWriter(); }