docs: private void readConstraint(SchemaObject schemaObject,
                                  HsqlArrayList constraintList) {
  
          HsqlName constName = null;
          boolean isAutogeneratedName = true;
  
          if (token.tokenType == Tokens.CONSTRAINT) {
              read();
  
              constName =
                  readNewDependentSchemaObjectName(schemaObject.getName(),
                                                   SchemaObject.CONSTRAINT);
              isAutogeneratedName = false;
          }
  
          // A VoltDB extension to support indexed expressions and the assume unique attribute
          boolean assumeUnique = false; // For VoltDB
          // End of VoltDB extension
          switch (token.tokenType) {
  
              case Tokens.PRIMARY : {
                  if (schemaObject.getName().type != SchemaObject.TABLE) {
                      throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                  }
  
                  read();
                  readThis(Tokens.KEY);
  
                  Constraint mainConst;
  
                  mainConst = (Constraint) constraintList.get(0);
  
                  if (mainConst.constType == Constraint.PRIMARY_KEY) {
                      throw Error.error(ErrorCode.X_42532);
                  }
  
                  if (constName == null) {
                      constName = database.nameManager.newAutoName("PK",
                              schemaObject.getSchemaName(),
                              schemaObject.getName(), SchemaObject.CONSTRAINT);
                  }
  
                  OrderedHashSet set = readColumnNames(false);
                  Constraint c = new Constraint(constName, isAutogeneratedName, set,
                                                Constraint.PRIMARY_KEY);
  
                  constraintList.set(0, c);
  
                  break;
              }
              // A VoltDB extension to support indexed expressions and the assume unique attribute
              case Tokens.ASSUMEUNIQUE :
                  assumeUnique = true;
                  // $FALL-THROUGH$
              // End of VoltDB extension
              case Tokens.UNIQUE : {
                  if (schemaObject.getName().type != SchemaObject.TABLE) {
                      throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                  }
  
                  read();
  
                  // A VoltDB extension to "readColumnNames(false)" to support indexed expressions.
                  java.util.List<Expression> indexExprs = XreadExpressions(null);
                  OrderedHashSet set = getSimpleColumnNames(indexExprs);
                  /* disable 1 line ...
                  OrderedHashSet set = readColumnNames(false);
                  ... disabled 1 line */
                  // End of VoltDB extension
  
                  if (constName == null) {
                      constName = database.nameManager.newAutoName("CT",
                              schemaObject.getSchemaName(),
                              schemaObject.getName(), SchemaObject.CONSTRAINT);
                  }
  
                  // A VoltDB extension to support indexed expressions.
                  boolean hasNonColumnExprs = false;
                  if (set == null) {
                      hasNonColumnExprs = true;
                      set = getBaseColumnNames(indexExprs);
                  }
                  // End of VoltDB extension
                  Constraint c = new Constraint(constName, isAutogeneratedName, set,
                                                Constraint.UNIQUE);
                  // A VoltDB extension to support indexed expressions and assume unique attribute.
                  c.setAssumeUnique(assumeUnique);
                  if (hasNonColumnExprs) {
                      c = c.withExpressions(indexExprs.toArray(new Expression[indexExprs.size()]));
                  }
                  // End of VoltDB extension
  
                  constraintList.add(c);
  
                  break;
              }
              case Tokens.FOREIGN : {
                  if (schemaObject.getName().type != SchemaObject.TABLE) {
                      throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                  }
  
                  read();
                  readThis(Tokens.KEY);
  
                  OrderedHashSet set = readColumnNames(false);
                  Constraint c = readFKReferences((Table) schemaObject,
                                                  constName, set);
  
                  constraintList.add(c);
  
                  break;
              }
              case Tokens.CHECK : {
                  read();
  
                  if (constName == null) {
                      constName = database.nameManager.newAutoName("CT",
                              schemaObject.getSchemaName(),
                              schemaObject.getName(), SchemaObject.CONSTRAINT);
                  }
  
                  Constraint c = new Constraint(constName, isAutogeneratedName, null,
                                                Constraint.CHECK);
  
                  readCheckConstraintCondition(c);
                  constraintList.add(c);
  
                  break;
              }
              // A VoltDB extension to support LIMIT PARTITION ROWS
              case Tokens.LIMIT : {
                  read();
  
                  for (int i = 0;  i < constraintList.size(); i++) {
                      if (((Constraint)constraintList.get(i)).getConstraintType() == Constraint.LIMIT) {
                          throw Error.error(ErrorCode.X_42524,
                                  String.format("Multiple LIMIT PARTITION ROWS constraints on table %s are forbidden.", schemaObject.getName().name));
                      }
                  }
  
                  if (constName == null) {
                      constName = database.nameManager.newAutoName("LIMIT",
                              schemaObject.getSchemaName(),
                              schemaObject.getName(), SchemaObject.CONSTRAINT);
                  }
  
                  Constraint c = new Constraint(constName, isAutogeneratedName, null, Constraint.LIMIT);
                  readLimitConstraintCondition(c);
                  constraintList.add(c);
  
                  break;
              }
              // End of VoltDB extension
              default : {
                  if (constName != null) {
                      throw Error.error(ErrorCode.X_42581);
                  }
              }
          }
      }