public ForeignKeyCheckerUB1(UnaryTableUpdater source, BinaryTableUpdater target) { Debug.Assert(source.store == target.store1); this.source = source; this.target = target; }
public ForeignKeyCheckerBU1(BinaryTableUpdater source, UnaryTableUpdater target) { Debug.Assert(source.store1 == target.store); this.source = source; this.target = target; }
public ForeignKeyCheckerBT(BinaryTableUpdater source, TernaryTableUpdater target) { Debug.Assert(source.store1 == target.store1 & source.store2 == target.store2); this.source = source; this.target = target; }
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); } } }
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); }
public ForeignKeyCheckerBU2(BinaryTableUpdater source, UnaryTableUpdater target) { this.source = source; this.target = target; }