code: public boolean isDatabaseCompatible(String databaseProductNameRegex, DatabaseVersion minVersion, DatabaseVersion maxVersion) throws SQLException {
          readMetaDataIfNeeded();
          if (!this.databaseProductName.matches(databaseProductNameRegex)) {
              return false;
          }
  
          return new VersionRange(minVersion, maxVersion).isWithinRange(this.databaseVersion);
      }
docs: Compares database product name and version information to that reported
  by the database.
  
  @param databaseProductNameRegex a regular expression that the actual
  database product name will match. Use a regular expression that is
  unlikely to overlap with the product names of other database systems.
  @param minVersion the expected minimum version, if any.
  @param maxVersion the expected maximum version, if any.
  @return whether the actual database product name and version match the
  provided arguments. The database product name comparison checks whether
  the actual database product name matches the provided database product
  name regular expression. The min and max version comparisons are
  inclusive.
  
  @throws SQLException if an error occurs fetching metadata containing the
  database product name and version from the database.