Beispiel #1
0
 /**
  * Drop and remove the given local temporary constraint from this session.
  *
  * @param constraint the constraint
  */
 void removeLocalTempTableConstraint(Constraint constraint) {
   if (localTempTableConstraints != null) {
     localTempTableConstraints.remove(constraint.getName());
     synchronized (database) {
       constraint.removeChildrenAndResources(this);
     }
   }
 }
Beispiel #2
0
 /**
  * Add a local temporary constraint to this session.
  *
  * @param constraint the constraint to add
  * @throws DbException if a constraint with the same name already exists
  */
 public void addLocalTempTableConstraint(Constraint constraint) {
   if (localTempTableConstraints == null) {
     localTempTableConstraints = database.newStringMap();
   }
   String name = constraint.getName();
   if (localTempTableConstraints.get(name) != null) {
     throw DbException.get(ErrorCode.CONSTRAINT_ALREADY_EXISTS_1, constraint.getSQL());
   }
   localTempTableConstraints.put(name, constraint);
 }