コード例 #1
0
        public void DropSpecificObject(ISpecificObjectStructure obj, PlanPosition pos)
        {
            SpecificObjectStructure o = Structure.FindOrCreateSpecificObject(obj);

            AddOperation(new AlterOperation_DropSpecificObject {
                OldObject = o
            }, pos);
        }
コード例 #2
0
        public void CreateConstraint(ITableStructure table, IConstraint newcnt, PlanPosition pos)
        {
            TableStructure tbl = Structure.FindOrCreateTable(table.FullName);

            AddOperation(new AlterOperation_CreateConstraint {
                ParentTable = tbl, NewObject = Constraint.CreateCopy(newcnt)
            }, pos);
        }
コード例 #3
0
        public void CreateSpecificObject(ISpecificObjectStructure obj, PlanPosition pos)
        {
            SpecificObjectStructure o = new SpecificObjectStructure(obj);

            AddOperation(new AlterOperation_CreateSpecificObject {
                NewObject = o
            }, pos);
        }
コード例 #4
0
ファイル: AlterPlan.cs プロジェクト: timothydodd/dbshell
        public void DropSpecificObject(SpecificObjectInfo obj, PlanPosition pos = PlanPosition.End)
        {
            var o = Structure.FindOrCreateSpecificObject(obj);

            AddOperation(new AlterOperation_DropSpecificObject {
                OldObject = o
            }, pos);
        }
コード例 #5
0
        public void DropConstraint(IConstraint constraint, PlanPosition pos)
        {
            Constraint cnt = Structure.FindOrCreateConstraint(constraint);

            AddOperation(new AlterOperation_DropConstraint {
                ParentTable = (TableStructure)cnt.Table, OldObject = cnt
            }, pos);
        }
コード例 #6
0
ファイル: AlterPlan.cs プロジェクト: timothydodd/dbshell
        public void CreateSpecificObject(SpecificObjectInfo obj, PlanPosition pos = PlanPosition.End)
        {
            var o = obj.CloneSpecificObject();

            AddOperation(new AlterOperation_CreateSpecificObject {
                NewObject = o
            }, pos);
        }
コード例 #7
0
ファイル: AlterPlan.cs プロジェクト: timothydodd/dbshell
        public void CreateConstraint(TableInfo table, ConstraintInfo newcnt, PlanPosition pos = PlanPosition.End)
        {
            TableInfo tbl = Structure.FindOrCreateTable(table.FullName);

            AddOperation(new AlterOperation_CreateConstraint {
                ParentTable = tbl, NewObject = newcnt.CloneConstraint()
            }, pos);
        }
コード例 #8
0
ファイル: AlterPlan.cs プロジェクト: timothydodd/dbshell
        public void DropColumn(ColumnInfo column, PlanPosition pos = PlanPosition.End)
        {
            var col = Structure.FindOrCreateColumn(column);

            AddOperation(new AlterOperation_DropColumn {
                ParentTable = col.OwnerTable, OldObject = col
            }, pos);
        }
コード例 #9
0
ファイル: AlterPlan.cs プロジェクト: timothydodd/dbshell
        public void DropConstraint(ConstraintInfo constraint, PlanPosition pos = PlanPosition.End)
        {
            ConstraintInfo cnt = Structure.FindOrCreateConstraint(constraint);

            AddOperation(new AlterOperation_DropConstraint {
                ParentTable = cnt.OwnerTable, OldObject = cnt
            }, pos);
        }
コード例 #10
0
        private void AddOperation(AlterOperation op, PlanPosition position)
        {
            switch (position)
            {
            case PlanPosition.Begin:
                Operations.Insert(0, op);
                break;

            case PlanPosition.End:
                Operations.Add(op);
                break;
            }
        }
コード例 #11
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 public void DropSpecificObject(SpecificObjectInfo obj, PlanPosition pos = PlanPosition.End)
 {
     var o = Structure.FindOrCreateSpecificObject(obj);
     AddOperation(new AlterOperation_DropSpecificObject { OldObject = o }, pos);
 }
コード例 #12
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 public void CreateSpecificObject(SpecificObjectInfo obj, PlanPosition pos = PlanPosition.End)
 {
     var o = obj.CloneSpecificObject();
     AddOperation(new AlterOperation_CreateSpecificObject { NewObject = o }, pos);
 }
コード例 #13
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 public void CreateConstraint(TableInfo table, ConstraintInfo newcnt, PlanPosition pos = PlanPosition.End)
 {
     TableInfo tbl = Structure.FindOrCreateTable(table.FullName);
     AddOperation(new AlterOperation_CreateConstraint { ParentTable = tbl, NewObject = newcnt.CloneConstraint() }, pos);
 }
コード例 #14
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 public void DropColumn(ColumnInfo column, PlanPosition pos = PlanPosition.End)
 {
     var col = Structure.FindOrCreateColumn(column);
     AddOperation(new AlterOperation_DropColumn { ParentTable = col.OwnerTable, OldObject = col }, pos);
 }
コード例 #15
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 public void DropConstraint(ConstraintInfo constraint, PlanPosition pos = PlanPosition.End)
 {
     ConstraintInfo cnt = Structure.FindOrCreateConstraint(constraint);
     AddOperation(new AlterOperation_DropConstraint { ParentTable = cnt.OwnerTable, OldObject = cnt }, pos);
 }
コード例 #16
0
ファイル: AlterPlan.cs プロジェクト: dbshell/dbshell
 private void AddOperation(AlterOperation op, PlanPosition position = PlanPosition.End)
 {
     switch (position)
     {
         case PlanPosition.Begin:
             Operations.Insert(0, op);
             break;
         case PlanPosition.End:
             Operations.Add(op);
             break;
     }
 }