docs: static Table addTableConstraintDefinitions(Session session, Table table,
              HsqlArrayList tempConstraints, HsqlArrayList constraintList) {
  
          Constraint c        = (Constraint) tempConstraints.get(0);
          String     namePart = c.getName() == null ? null
                                                    : c.getName().name;
          HsqlName indexName = session.database.nameManager.newAutoName("IDX",
              namePart, table.getSchemaName(), table.getName(),
              SchemaObject.INDEX);
  
          if (c.mainColSet != null) {
              c.core.mainCols = table.getColumnIndexes(c.mainColSet);
          }
  
          table.createPrimaryKey(indexName, c.core.mainCols, true);
  
          if (c.core.mainCols != null) {
              Constraint newconstraint = new Constraint(c.getName(), c.getIsAutogeneratedName(), table,
                  table.getPrimaryIndex(), Constraint.PRIMARY_KEY);
  
              table.addConstraint(newconstraint);
              session.database.schemaManager.addSchemaObject(newconstraint);
          }
  
          for (int i = 1; i < tempConstraints.size(); i++) {
              c = (Constraint) tempConstraints.get(i);
  
              switch (c.constType) {
  
                  case Constraint.UNIQUE : {
                      c.setColumnsIndexes(table);
  
                      // A VoltDB extension to support indexed expressions and the assume unique attribute
                      if (c.indexExprs != null) {
                          // Special case handling for VoltDB indexed expressions
                          if (table.getUniqueConstraintForExprs(c.indexExprs) != null) {
                              throw Error.error(ErrorCode.X_42522);
                          }
                      }
                      else
                      // End of VoltDB extension
                      if (table.getUniqueConstraintForColumns(c.core.mainCols)
                              != null) {
                          throw Error.error(ErrorCode.X_42522);
                      }
  
                      // create an autonamed index
                      indexName = session.database.nameManager.newAutoName("IDX",
                              c.getName().name, table.getSchemaName(),
                              table.getName(), SchemaObject.INDEX);
  
                      // A VoltDB extension to support indexed expressions and the assume unique attribute
                      Index index = null;
                      if (c.indexExprs != null) {
                          // Special case handling for VoltDB indexed expressions
                          index = table.createAndAddExprIndexStructure(
                                  indexName, c.core.mainCols, c.indexExprs, true, false, true)
                                  .setAssumeUnique(c.assumeUnique);
                      } else {
                          index = table.createAndAddIndexStructure(
                                  indexName, c.core.mainCols, null, null, true, false, true, false)
                                  .setAssumeUnique(c.assumeUnique);
                      }
  
                      Constraint newconstraint = new Constraint(c.getName(), c.getIsAutogeneratedName(),
                          table, index, Constraint.UNIQUE);
                      // A VoltDB extension to support the assume unique attribute
                      newconstraint = newconstraint.setAssumeUnique(c.assumeUnique);
                      // End of VoltDB extension
  
                      table.addConstraint(newconstraint);
                      session.database.schemaManager.addSchemaObject(
                          newconstraint);
  
                      break;
                  }
                  case Constraint.MIGRATING : {
                      // TODO
                      Index index = table.createAndAddIndexStructure(indexName,
                              c.core.mainCols, null, null, true, true, false, false);
                      Constraint newconstraint = new Constraint(c.getName(), c.getIsAutogeneratedName(),
                              table, index, Constraint.MIGRATING)
                              .setMigrating(c.migrating);
  
                      table.addConstraint(newconstraint);
                      session.database.schemaManager.addSchemaObject(
                              newconstraint);
                  }
                  case Constraint.FOREIGN_KEY : {
                      addForeignKey(session, table, c, constraintList);
  
                      break;
                  }
                  case Constraint.CHECK : {
                      c.prepareCheckConstraint(session, table, false);
                      table.addConstraint(c);
  
                      if (c.isNotNull()) {
                          ColumnSchema column =
                              table.getColumn(c.notNullColumnIndex);
  
                          column.setNullable(false);
                          table.setColumnTypeVars(c.notNullColumnIndex);
                      }
  
                      session.database.schemaManager.addSchemaObject(c);
  
                      break;
                  }
                  // A VoltDB extension to support LIMIT PARTITION ROWS
                  case Constraint.LIMIT : {
                      table.addConstraint(c);
                      session.database.schemaManager.addSchemaObject(c);
  
                      break;
                  }
                  // End of VoltDB extension
              }
          }
  
          return table;
      }