Beispiel #1
0
        public bool Contains3(int surr3)
        {
            PrepareInsert3();

            if (Array.SortedArrayContains(insertList3, surr3))
            {
                return(true);
            }

            if (table.Contains3(surr3))
            {
                //## THIS COULD BE MADE FASTER BY CHECKING FIRST WHETHER surr3 APPEARS IN THE DELETE LIST AT ALL
                Prepare();
                Sym12TernaryTable.Iter3 it = table.GetIter3(surr3);
                Debug.Assert(!it.Done());
                do
                {
                    if (!Ints123.Contains(deleteList, deleteCount, it.Get1(), it.Get2(), surr3))
                    {
                        return(true);
                    }
                    it.Next();
                } while (!it.Done());
            }

            return(false);
        }
Beispiel #2
0
        private KeyViolationException Col3KeyViolationException(int arg1, int arg2, int arg3)
        {
            Sym12TernaryTable.Iter3 it = table.GetIter3(arg3);
            int otherArg1 = it.Get1();
            int otherArg2 = it.Get2();

            return(NewKeyViolationException(arg1, arg2, arg3, otherArg1, otherArg2, arg3, KeyViolationException.key_3, false));
        }
Beispiel #3
0
 public void Delete3(int value3)
 {
     Sym12TernaryTable.Iter3 it = table.GetIter3(value3);
     while (!it.Done())
     {
         Debug.Assert(it.Get1() <= it.Get2());
         deleteList = Array.Append3(deleteList, deleteCount++, it.Get1(), it.Get2(), value3);
         it.Next();
     }
 }
        private ForeignKeyViolationException ForeignKeyViolation(int arg3Surr)
        {
            Sym12TernaryTable.Iter3 it = source.table.GetIter3(arg3Surr);
            Obj arg1 = source.store12.SurrToValue(it.Get1());
            Obj arg2 = source.store12.SurrToValue(it.Get2());
            Obj arg3 = source.store3.SurrToValue(arg3Surr);

            Obj[] tuple = new Obj[] { arg1, arg2, arg3 };
            return(ForeignKeyViolationException.SymTernary3Unary(source.relvarName, target.relvarName, tuple, arg3));
        }