docs: VoltXMLElement voltGetConstraintXML()
      {
          // Skip "MAIN" constraints, as they are a side effect of foreign key constraints and add no new info.
          if (this.constType == MAIN) {
              return null;
          }
  
          VoltXMLElement constraint = new VoltXMLElement("constraint");
          // WARNING: the name attribute setting is tentative, subject to reset in the
          // calling function, Table.voltGetTableXML.
          constraint.attributes.put("name", getName().name);
          constraint.attributes.put("nameisauto", getIsAutogeneratedName() ? "true" : "false");
          constraint.attributes.put("constrainttype", getTypeName());
          constraint.attributes.put("assumeunique", assumeUnique ? "true" : "false");
          constraint.attributes.put("migrating", migrating ? "true" : "false");
          constraint.attributes.put("rowslimit", String.valueOf(rowsLimit));
          if (rowsLimitDeleteStmt != null) {
              constraint.attributes.put("rowslimitdeletestmt", rowsLimitDeleteStmt);
          }
  
          // VoltDB implements constraints by defining an index, by annotating metadata (such as for NOT NULL columns),
          // or by issuing a "not supported" warning (such as for foreign keys).
          // Any constraint implemented as an index must have an index name attribute.
          // No other constraint details are currently used by VoltDB.
          if (this.constType != FOREIGN_KEY && core.mainIndex != null) {
              // WARNING: the index attribute setting is tentative, subject to reset in
              // the calling function, Table.voltGetTableXML.
              constraint.attributes.put("index", core.mainIndex.getName().name);
          }
          return constraint;
      }