Example #1
0
 public Constraint(QNameManager.QName name, OrderedHashSet <string> mainCols, int type)
 {
     this.Core       = new ConstraintCore();
     this._name      = name;
     this.ConstType  = type;
     this.MainColSet = mainCols;
 }
Example #2
0
        public Constraint(QNameManager.QName name, Table table, int[] cols, int type)
        {
            this._name     = name;
            this.ConstType = type;
            ConstraintCore core1 = new ConstraintCore {
                MainTable = table,
                MainCols  = cols
            };

            this.Core = core1;
        }
Example #3
0
 public Constraint(QNameManager.QName name, Table t, Index index, int type)
 {
     this.Core           = new ConstraintCore();
     this._name          = name;
     this.ConstType      = type;
     this.Core.MainTable = t;
     this.Core.MainIndex = index;
     this.Core.MainCols  = index.GetColumns();
     for (int i = 0; i < this.Core.MainCols.Length; i++)
     {
         if (t.GetColumn(this.Core.MainCols[i]).GetDataType().IsLobType())
         {
             throw Error.GetError(0x159e);
         }
     }
 }
Example #4
0
        public Constraint(QNameManager.QName name, QNameManager.QName refTableName, OrderedHashSet <string> refCols, QNameManager.QName mainTableName, OrderedHashSet <string> mainCols, int type, int deleteAction, int updateAction, int matchType)
        {
            this.Core               = new ConstraintCore();
            this._name              = name;
            this.ConstType          = type;
            this.MainColSet         = mainCols;
            this.Core.RefTableName  = refTableName;
            this.Core.MainTableName = mainTableName;
            this.RefColSet          = refCols;
            this.Core.DeleteAction  = deleteAction;
            this.Core.UpdateAction  = updateAction;
            this.Core.MatchType     = matchType;
            switch (this.Core.DeleteAction)
            {
            case 0:
            case 2:
            case 4:
                this.Core.HasDeleteAction = true;
                break;
            }
            switch (this.Core.UpdateAction)
            {
            case 0:
            case 2:
            case 4:
                this.Core.HasUpdateAction = true;
                break;

            case 1:
            case 3:
                break;

            default:
                return;
            }
        }
Example #5
0
 public Constraint(QNameManager.QName name, Constraint fkconstraint)
 {
     this._name     = name;
     this.ConstType = 1;
     this.Core      = fkconstraint.Core;
 }