Ejemplo n.º 1
0
 private void WriteOnConflictOption(DbEngineOptions options)
 {
     var opt = options.Get(SqliteOptions.On_Conflict);
     if (opt != null)
     {
         Builder.Append(" " + opt);
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public ColumnModifications(string name, string table)
 {
     name.MustNotBeEmpty();
     table.MustNotBeEmpty();
     Options = new DbEngineOptions();
     Current = new CurrentColumnSchema();
     Current.Name = name;
     TableName = table;
 }
Ejemplo n.º 4
0
        private void WriteOnConflictOption(DbEngineOptions options)
        {
            var opt = options.Get(SqliteOptions.On_Conflict);

            if (opt != null)
            {
                Builder.Append(" " + opt);
            }
        }
Ejemplo n.º 5
0
        protected virtual void WriteSparseOption(DbEngineOptions options)
        {
            var option = options.Get(SqlServerOptions.Sparse);

            if (option != null)
            {
                Builder.Append(" " + option);
            }
        }
Ejemplo n.º 6
0
        protected override void WriteEndColumnOptions(DbEngineOptions options)
        {
            var option = options.Get(SqlServerOptions.RowGuidCol);

            if (option != null)
            {
                Builder.Append(" " + option);
            }
        }
Ejemplo n.º 7
0
 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);
 }
Ejemplo n.º 8
0
        private void WriteIncludes(DbEngineOptions options)
        {
            var opt = options.Get(SqlServerOptions.Include);

            if (opt != null)
            {
                Builder.Append(" " + opt);
            }
        }
Ejemplo n.º 9
0
 public ColumnModifications(string name, string table)
 {
     name.MustNotBeEmpty();
     table.MustNotBeEmpty();
     Options      = new DbEngineOptions();
     Current      = new CurrentColumnSchema();
     Current.Name = name;
     TableName    = table;
 }
Ejemplo n.º 10
0
        public TableSchema(string name)
        {
            Name = name;
            Options= new DbEngineOptions();
            Columns= new ColumnsCollection();
            Constraints = new ConstraintsCollection(this);
            Indexes= new IndexCollection(this);

            ModifiedColumns=new ModifiedColumnsCollection(name);
        }
Ejemplo n.º 11
0
        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 "";
        }
Ejemplo n.º 12
0
        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("");
        }
Ejemplo n.º 13
0
        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(")");
            }
        }
Ejemplo n.º 14
0
        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(")");
            }
        }
Ejemplo n.º 15
0
 protected override void WriteEndColumnOptions(DbEngineOptions options)
 {
     WriteOnConflictOption(options);
 }
Ejemplo n.º 16
0
 public ColumnDefinition()
 {
     Options = new DbEngineOptions();
 }
Ejemplo n.º 17
0
 protected override void WriteEndColumnOptions(DbEngineOptions options)
 {
     WriteOnConflictOption(options);
 }
Ejemplo n.º 18
0
 protected virtual void WriteEndColumnOptions(DbEngineOptions options)
 {
 }
Ejemplo n.º 19
0
 public IndexDefinition(string table)
 {
     Options   = new DbEngineOptions();
     TableName = table;
     Columns   = new IndexColumnsCollection();
 }
Ejemplo n.º 20
0
 protected virtual void WriteSparseOption(DbEngineOptions options)
 {
     var option = options.Get(SqlServerOptions.Sparse);
     if (option != null)
     {
         Builder.Append(" " + option);
     }
 }
Ejemplo n.º 21
0
 private void WriteIncludes(DbEngineOptions options)
 {
     var opt = options.Get(SqlServerOptions.Include);
     if (opt!=null)Builder.Append(" "+opt.ToString());
 }
Ejemplo n.º 22
0
 protected override void WriteSparseOption(DbEngineOptions options)
 {
 }
Ejemplo n.º 23
0
 public IndexColumn(string name)
 {
     Name    = name;
     Options = new DbEngineOptions();
 }
Ejemplo n.º 24
0
 public IndexColumn(string name)
 {
     Name = name;
     Options= new DbEngineOptions();
 }
Ejemplo n.º 25
0
 public ConstraintDefinition()
 {
     Options = new DbEngineOptions();
 }
Ejemplo n.º 26
0
 public ColumnDefinition()
 {
     Options = new DbEngineOptions();
 }
Ejemplo n.º 27
0
 protected override void WriteEndColumnOptions(DbEngineOptions options)
 {
     var option = options.Get(SqlServerOptions.RowGuidCol);
     if (option != null)
     {
         Builder.Append(" " + option);
     }
 }
Ejemplo n.º 28
0
 public DroppedSchemaItem(string name, string tableName)
 {
     _tableName = tableName;
     Name = name;
     Options = new DbEngineOptions();
 }
Ejemplo n.º 29
0
 protected override string GetOptionsBeforeColumns(DbEngineOptions options)
 {
     return("");
 }
Ejemplo n.º 30
0
 protected override void WriteSparseOption(DbEngineOptions options)
 {
 }
Ejemplo n.º 31
0
 public DroppedSchemaItem(string name, string tableName)
 {
     _tableName = tableName;
     Name       = name;
     Options    = new DbEngineOptions();
 }
Ejemplo n.º 32
0
 protected override string GetOptionsBeforeColumns(DbEngineOptions options)
 {
     return "";
 }
Ejemplo n.º 33
0
 protected virtual void WriteEndColumnOptions(DbEngineOptions options)
 {
 }
Ejemplo n.º 34
0
 public ConstraintDefinition()
 {
     Options = new DbEngineOptions();
 }
Ejemplo n.º 35
0
 public IndexDefinition(string table)
 {
     Options = new DbEngineOptions();
     TableName = table;
     Columns = new IndexColumnsCollection();
 }