示例#1
0
        private void CheckTargetDeletes()
        {
            long[] buffer = target.Deletes(longBuff, counter);
            int    count  = counter[0];

            for (int i = 0; i < count; i++)
            {
                long entry = buffer[i];
                int  arg1  = BinaryTableUpdater.Arg1(entry);
                int  arg2  = BinaryTableUpdater.Arg2(entry);
                if (source.Contains12(arg1, arg2) && !target.Contains(arg1, arg2))
                {
                    throw DeletionForeignKeyViolation(arg1, arg2);
                }
            }
        }
示例#2
0
        public void Check()
        {
            if (source.HasInsertions())
            {
                long[] buffer = source.Insertions(this.buffer, counter);
                int    count  = counter[0];
                for (int i = 0; i < count; i++)
                {
                    long entry = buffer[i];
                    int  arg1  = BinaryTableUpdater.Arg1(entry);
                    if (!target.Contains(arg1))
                    {
                        throw InsertionForeignKeyViolation(arg1, BinaryTableUpdater.Arg2(entry));
                    }
                }
            }

            target.CheckDeletedKeys(this);
        }