private void WriteOnConflictOption(DbEngineOptions options) { var opt = options.Get(SqliteOptions.On_Conflict); if (opt != null) { Builder.Append(" " + opt); } }
private void Init(string name) { Name = name; Options = new DbEngineOptions(); Columns = new ColumnsCollection(); Constraints = new ConstraintsCollection(this); Indexes = new IndexCollection(this); ModifiedColumns = new ModifiedColumnsCollection(name); }
public ColumnModifications(string name, string table) { name.MustNotBeEmpty(); table.MustNotBeEmpty(); Options = new DbEngineOptions(); Current = new CurrentColumnSchema(); Current.Name = name; TableName = table; }
protected virtual void WriteSparseOption(DbEngineOptions options) { var option = options.Get(SqlServerOptions.Sparse); if (option != null) { Builder.Append(" " + option); } }
protected override void WriteEndColumnOptions(DbEngineOptions options) { var option = options.Get(SqlServerOptions.RowGuidCol); if (option != null) { Builder.Append(" " + option); } }
private void WriteIncludes(DbEngineOptions options) { var opt = options.Get(SqlServerOptions.Include); if (opt != null) { Builder.Append(" " + opt); } }
public TableSchema(string name) { Name = name; Options= new DbEngineOptions(); Columns= new ColumnsCollection(); Constraints = new ConstraintsCollection(this); Indexes= new IndexCollection(this); ModifiedColumns=new ModifiedColumnsCollection(name); }
protected virtual string GetOptionsBeforeColumns(DbEngineOptions options) { var option = options.Get(SqlServerOptions.Clustered); if (option != null) { return " " + option; } option = options.Get(SqlServerOptions.NonClustered); if (option != null) { return " " + option; } return ""; }
protected virtual string GetOptionsBeforeColumns(DbEngineOptions options) { var option = options.Get(SqlServerOptions.Clustered); if (option != null) { return(" " + option); } option = options.Get(SqlServerOptions.NonClustered); if (option != null) { return(" " + option); } return(""); }
private void WriteWith(DbEngineOptions options) { if (options.HasAny(SqlServerOptions.Drop_Existing, SqlServerOptions.Ignore_Dup_Key)) { Builder.Append(" WITH ("); var ignore = options.Get(SqlServerOptions.Ignore_Dup_Key); if (ignore != null) { Builder.AppendFormat("{0},", ignore); } var drop = options.Get(SqlServerOptions.Drop_Existing); if (drop != null) { Builder.AppendFormat(" {0},", drop); } Builder.RemoveLast(); Builder.Append(")"); } }
private void WriteWith(DbEngineOptions options) { if (options.HasAny(SqlServerOptions.Drop_Existing,SqlServerOptions.Ignore_Dup_Key)) { Builder.Append(" WITH ("); var ignore = options.Get(SqlServerOptions.Ignore_Dup_Key); if (ignore!=null) { Builder.AppendFormat("{0},", ignore); } var drop = options.Get(SqlServerOptions.Drop_Existing); if (drop!=null) { Builder.AppendFormat(" {0},", drop); } Builder.RemoveLast(); Builder.Append(")"); } }
protected override void WriteEndColumnOptions(DbEngineOptions options) { WriteOnConflictOption(options); }
public ColumnDefinition() { Options = new DbEngineOptions(); }
protected virtual void WriteEndColumnOptions(DbEngineOptions options) { }
public IndexDefinition(string table) { Options = new DbEngineOptions(); TableName = table; Columns = new IndexColumnsCollection(); }
private void WriteIncludes(DbEngineOptions options) { var opt = options.Get(SqlServerOptions.Include); if (opt!=null)Builder.Append(" "+opt.ToString()); }
protected override void WriteSparseOption(DbEngineOptions options) { }
public IndexColumn(string name) { Name = name; Options = new DbEngineOptions(); }
public IndexColumn(string name) { Name = name; Options= new DbEngineOptions(); }
public ConstraintDefinition() { Options = new DbEngineOptions(); }
public DroppedSchemaItem(string name, string tableName) { _tableName = tableName; Name = name; Options = new DbEngineOptions(); }
protected override string GetOptionsBeforeColumns(DbEngineOptions options) { return(""); }
protected override string GetOptionsBeforeColumns(DbEngineOptions options) { return ""; }