| java.lang.Object com.quadcap.sql.ExportedKeys
ExportedKeys | public class ExportedKeys implements StatementContext(Code) | | A statement context which keeps track of the set of changes to the
keys in a foreign-key constraint during the statement execution.
At statement end, we check the entire set to make sure referential
integrity has been maintained.
author: Stan Bailes |
Method Summary | |
public void | addDeleteSelfRef(byte[] key, byte[] fkey) | public void | addEntry(byte[] oldkey, byte[] newkey) | public void | addSelfRefEntry(byte[] oldkey, byte[] newkey, byte[] oldfkey, byte[] newfkey) | void | doKey(byte[] key, int bit) | public void | finish(boolean abort) | public int | priority() | public void | removeKey(int refSpec, byte[] key) removal with cascade. |
valid | final static int valid(Code) | | fkey -> key
'k' means "insert k"
'~k' means "delete k"
First case, key deleted which is not referenced:
lsb Encoding of 'ok, ~nk, ~of, ~nf' -> 1
Second case, key deleted where foreign key is also deleted:
lsb Encoding of 'ok, ~nk, of, ~nf' -> 5
Encoding of 1, 5: 0x0022
|
addSelfRefEntry | public void addSelfRefEntry(byte[] oldkey, byte[] newkey, byte[] oldfkey, byte[] newfkey) throws IOException(Code) | | |
priority | public int priority()(Code) | | |
removeKey | public void removeKey(int refSpec, byte[] key) throws SQLException(Code) | | removal with cascade. NYI. XXX
|
|
|