public void column_not_null_with_default_no_options() { var w = new SqlServerColumnWriter(_sb); _col.IsNullable = false; _col.DefaultValue = "0"; w.Write(_col); Assert.Equal("[User Id] bit NOT NULL DEFAULT 0",_sb.ToString()); }
public ColumnWriterTests() { _sb = new StringBuilder(); _col = new ColumnDefinition(); _col.Name = "User Id"; _col.Type=DbType.Boolean; _cw = new SqlServerColumnWriter(_sb); }
public void column_with_identity_and_options() { var w = new SqlServerColumnWriter(_sb); _col.IsIdentity = true; _col.IsNullable = true; _col.Options.Add(SqlServerOptions.ColumnIs.Sparse()); w.Write(_col); Assert.Equal("[User Id] bit SPARSE NULL IDENTITY(1,1)", _sb.ToString()); }
public SqlServerColumnChangesWriter(StringBuilder builder) : base(builder, DbEngine.SqlServer) { _writer = new SqlServerColumnWriter(Builder); }