code: Constraint getUniqueConstraintForColumns(int[] cols) {
  
          for (int i = 0, size = constraintList.length; i < size; i++) {
              Constraint c = constraintList[i];
  
              if (c.isUniqueWithColumns(cols)) {
                  return c;
              }
          }
  
          return null;
      }
docs: Returns the UNIQUE or PK constraint with the given column signature.