docs: public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern,
        String[] types)
        throws SQLException {
  
      StringBuilder sql =
          new StringBuilder("SELECT TABLE_SCHEMA TABLE_CAT, NULL  TABLE_SCHEM,  TABLE_NAME,"
              + " IF(TABLE_TYPE='BASE TABLE', 'TABLE', TABLE_TYPE) as TABLE_TYPE,"
              + " TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, "
              + " NULL REF_GENERATION"
              + " FROM INFORMATION_SCHEMA.TABLES "
              + " WHERE "
              + catalogCond("TABLE_SCHEMA", catalog)
              + " AND "
              + patternCond("TABLE_NAME", tableNamePattern));
  
      if (types != null && types.length > 0) {
        sql.append(" AND TABLE_TYPE IN (");
        for (int i = 0; i < types.length; i++) {
          if (types[i] == null) {
            continue;
          }
          String type = escapeQuote(mapTableTypes(types[i]));
          if (i == types.length - 1) {
            sql.append(type).append(")");
          } else {
            sql.append(type).append(",");
          }
        }
      }
  
      sql.append(" ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME");
  
      return executeQuery(sql.toString());
    }