PersistentStore store = session.sessionData.getRowStore(t);
// Intermediate holders
Iterator constraints;
Constraint constraint;
OrderedHashSet references;
RoutineSchema routine;
Object[] row;
constraints = database.schemaManager.databaseObjectIterator(
SchemaObject.CONSTRAINT);
while (constraints.hasNext()) {
HsqlName constraintName = (HsqlName) constraints.next();
if (constraintName.parent == null) {
continue;
}
if (!session.getGrantee().isFullyAccessibleByRole(
constraintName.parent)) {
continue;
}
switch (constraintName.parent.type) {
case SchemaObject.TABLE : {
Table table;
try {
table = (Table) database.schemaManager.getSchemaObject(
constraintName.parent.name,
constraintName.parent.schema.name,
SchemaObject.TABLE);
} catch (Exception e) {
continue;
}
constraint = table.getConstraint(constraintName.name);
if (constraint.getConstraintType()
!= SchemaObject.ConstraintTypes.CHECK) {
continue;
}
break;
}
case SchemaObject.DOMAIN : {
Type domain;
try {
domain = (Type) database.schemaManager.getSchemaObject(
constraintName.parent.name,
constraintName.parent.schema.name,
SchemaObject.DOMAIN);
} catch (Exception e) {
continue;
}
constraint = domain.userTypeModifier.getConstraint(
constraintName.name);
}
default :
continue;
}
references = constraint.getReferences();
for (int i = 0; i < references.size(); i++) {
HsqlName name = (HsqlName) references.get(i);
if (name.type != SchemaObject.SPECIFIC_ROUTINE) {
continue;
}