comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 371:67fa5c6147d7

Correct SQL syntax in comment (LIKE "%" is not valid SQL in WHERE clause)
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 23 Sep 2020 12:29:21 +0200 (2020-09-23)
parents 2ab474af487c
children 159c628527c4
comparison
equal deleted inserted replaced
370:2ab474af487c 371:67fa5c6147d7
1622 * null means that the catalog name should not be used to narrow the search 1622 * null means that the catalog name should not be used to narrow the search
1623 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; 1623 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored in the database;
1624 * "" retrieves those without a schema; 1624 * "" retrieves those without a schema;
1625 * null means that the schema name should not be used to narrow the search 1625 * null means that the schema name should not be used to narrow the search
1626 * @param procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database 1626 * @param procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database
1627 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 1627 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
1628 * @return ResultSet - each row is a procedure description 1628 * @return ResultSet - each row is a procedure description
1629 * @throws SQLException if a database access error occurs 1629 * @throws SQLException if a database access error occurs
1630 */ 1630 */
1631 @Override 1631 @Override
1632 public ResultSet getProcedures( 1632 public ResultSet getProcedures(
1732 * null means that the catalog name should not be used to narrow the search 1732 * null means that the catalog name should not be used to narrow the search
1733 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; 1733 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored in the database;
1734 * "" retrieves those without a schema; 1734 * "" retrieves those without a schema;
1735 * null means that the schema name should not be used to narrow the search 1735 * null means that the schema name should not be used to narrow the search
1736 * @param procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database 1736 * @param procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database
1737 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 1737 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
1738 * @param columnNamePattern - a column name pattern; must match the column name as it is stored in the database 1738 * @param columnNamePattern - a column name pattern; must match the column name as it is stored in the database
1739 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 1739 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
1740 * @return ResultSet - each row describes a stored procedure parameter or column 1740 * @return ResultSet - each row describes a stored procedure parameter or column
1741 * @throws SQLException if a database-access error occurs 1741 * @throws SQLException if a database-access error occurs
1742 * @see #getSearchStringEscape 1742 * @see #getSearchStringEscape
1743 */ 1743 */
1744 @Override 1744 @Override
1828 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored 1828 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored
1829 * in the database; "" retrieves those without a schema; 1829 * in the database; "" retrieves those without a schema;
1830 * null means that the schema name should not be used to narrow the search 1830 * null means that the schema name should not be used to narrow the search
1831 * @param tableNamePattern - a table name pattern; must match the table name as it is stored in the database 1831 * @param tableNamePattern - a table name pattern; must match the table name as it is stored in the database
1832 * For all tables this should be "%" 1832 * For all tables this should be "%"
1833 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 1833 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
1834 * @param types - a list of table types, which must be from the list of table types returned 1834 * @param types - a list of table types, which must be from the list of table types returned
1835 * from getTableTypes(),to include; null returns all types 1835 * from getTableTypes(),to include; null returns all types
1836 * @return ResultSet - each row is a table description 1836 * @return ResultSet - each row is a table description
1837 * @throws SQLException if a database-access error occurs. 1837 * @throws SQLException if a database-access error occurs.
1838 */ 1838 */
2082 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored 2082 * @param schemaPattern - a schema name pattern; must match the schema name as it is stored
2083 * in the database; "" retrieves those without a schema; 2083 * in the database; "" retrieves those without a schema;
2084 * null means that the schema name should not be used to narrow the search 2084 * null means that the schema name should not be used to narrow the search
2085 * @param tableNamePattern - a table name pattern; must match the table name as it is stored in the database 2085 * @param tableNamePattern - a table name pattern; must match the table name as it is stored in the database
2086 * For all tables this should be "%" 2086 * For all tables this should be "%"
2087 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2087 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2088 * @param columnNamePattern - a column name pattern; must match the column name as it is stored in the database 2088 * @param columnNamePattern - a column name pattern; must match the column name as it is stored in the database
2089 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2089 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2090 * @return ResultSet - each row is a column description 2090 * @return ResultSet - each row is a column description
2091 * @throws SQLException if a database error occurs 2091 * @throws SQLException if a database error occurs
2092 * @see #getSearchStringEscape 2092 * @see #getSearchStringEscape
2093 */ 2093 */
2094 @Override 2094 @Override
2179 * </OL> 2179 * </OL>
2180 * 2180 *
2181 * @param catalog a catalog name; "" retrieves those without a catalog 2181 * @param catalog a catalog name; "" retrieves those without a catalog
2182 * @param schemaPattern a schema name; "" retrieves those without a schema 2182 * @param schemaPattern a schema name; "" retrieves those without a schema
2183 * @param tableNamePattern a table name 2183 * @param tableNamePattern a table name
2184 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2184 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2185 * @param columnNamePattern a column name pattern 2185 * @param columnNamePattern a column name pattern
2186 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2186 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2187 * @return ResultSet each row is a column privilege description 2187 * @return ResultSet each row is a column privilege description
2188 * @see #getSearchStringEscape 2188 * @see #getSearchStringEscape
2189 * @throws SQLException if a database error occurs 2189 * @throws SQLException if a database error occurs
2190 */ 2190 */
2191 @Override 2191 @Override
2273 * </OL> 2273 * </OL>
2274 * 2274 *
2275 * @param catalog a catalog name; "" retrieves those without a catalog 2275 * @param catalog a catalog name; "" retrieves those without a catalog
2276 * @param schemaPattern a schema name pattern; "" retrieves those without a schema 2276 * @param schemaPattern a schema name pattern; "" retrieves those without a schema
2277 * @param tableNamePattern a table name pattern 2277 * @param tableNamePattern a table name pattern
2278 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2278 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2279 * @return ResultSet each row is a table privilege description 2279 * @return ResultSet each row is a table privilege description
2280 * @see #getSearchStringEscape 2280 * @see #getSearchStringEscape
2281 * @throws SQLException if a database error occurs 2281 * @throws SQLException if a database error occurs
2282 */ 2282 */
2283 @Override 2283 @Override
2365 * </OL> 2365 * </OL>
2366 * 2366 *
2367 * @param catalog a catalog name; "" retrieves those without a catalog 2367 * @param catalog a catalog name; "" retrieves those without a catalog
2368 * @param schema a schema name; "" retrieves those without a schema 2368 * @param schema a schema name; "" retrieves those without a schema
2369 * @param table a table name 2369 * @param table a table name
2370 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2370 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2371 * @param scope the scope of interest; use same values as SCOPE 2371 * @param scope the scope of interest; use same values as SCOPE
2372 * @param nullable include columns that are nullable? 2372 * @param nullable include columns that are nullable?
2373 * @return ResultSet each row is a column description 2373 * @return ResultSet each row is a column description
2374 * @throws SQLException if a database error occurs 2374 * @throws SQLException if a database error occurs
2375 */ 2375 */
2463 * </OL> 2463 * </OL>
2464 * 2464 *
2465 * @param catalog a catalog name; "" retrieves those without a catalog 2465 * @param catalog a catalog name; "" retrieves those without a catalog
2466 * @param schema a schema name; "" retrieves those without a schema 2466 * @param schema a schema name; "" retrieves those without a schema
2467 * @param table a table name 2467 * @param table a table name
2468 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2468 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2469 * @return ResultSet each row is a column description 2469 * @return ResultSet each row is a column description
2470 * @throws SQLException if a database error occurs 2470 * @throws SQLException if a database error occurs
2471 */ 2471 */
2472 @Override 2472 @Override
2473 public ResultSet getVersionColumns( 2473 public ResultSet getVersionColumns(
2506 * </OL> 2506 * </OL>
2507 * 2507 *
2508 * @param catalog a catalog name; "" retrieves those without a catalog 2508 * @param catalog a catalog name; "" retrieves those without a catalog
2509 * @param schema a schema name pattern; "" retrieves those without a schema 2509 * @param schema a schema name pattern; "" retrieves those without a schema
2510 * @param table a table name 2510 * @param table a table name
2511 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2511 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2512 * @return ResultSet each row is a primary key column description 2512 * @return ResultSet each row is a primary key column description
2513 * @throws SQLException if a database error occurs 2513 * @throws SQLException if a database error occurs
2514 */ 2514 */
2515 @Override 2515 @Override
2516 public ResultSet getPrimaryKeys( 2516 public ResultSet getPrimaryKeys(
2630 * </OL> 2630 * </OL>
2631 * 2631 *
2632 * @param catalog a catalog name; "" retrieves those without a catalog 2632 * @param catalog a catalog name; "" retrieves those without a catalog
2633 * @param schema a schema name pattern; "" retrieves those without a schema 2633 * @param schema a schema name pattern; "" retrieves those without a schema
2634 * @param table a table name 2634 * @param table a table name
2635 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2635 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2636 * @return ResultSet each row is a primary key column description 2636 * @return ResultSet each row is a primary key column description
2637 * @see #getExportedKeys 2637 * @see #getExportedKeys
2638 * @throws SQLException if a database error occurs 2638 * @throws SQLException if a database error occurs
2639 */ 2639 */
2640 @Override 2640 @Override
2718 * </OL> 2718 * </OL>
2719 * 2719 *
2720 * @param catalog a catalog name; "" retrieves those without a catalog 2720 * @param catalog a catalog name; "" retrieves those without a catalog
2721 * @param schema a schema name pattern; "" retrieves those without a schema 2721 * @param schema a schema name pattern; "" retrieves those without a schema
2722 * @param table a table name 2722 * @param table a table name
2723 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2723 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2724 * @return ResultSet each row is a foreign key column description 2724 * @return ResultSet each row is a foreign key column description
2725 * @see #getImportedKeys 2725 * @see #getImportedKeys
2726 * @throws SQLException if a database error occurs 2726 * @throws SQLException if a database error occurs
2727 */ 2727 */
2728 @Override 2728 @Override
2729 public ResultSet getExportedKeys( 2729 public ResultSet getExportedKeys(
2730 final String catalog, 2730 final String catalog,
2731 final String schema, 2731 final String schema,
2732 final String table 2732 final String table
2733 ) throws SQLException 2733 ) throws SQLException
2734 { 2734 {
2735 final StringBuilder query = new StringBuilder(keyQuery.length() + 250); 2735 final StringBuilder query = new StringBuilder(keyQuery.length() + 250);
2736 query.append(keyQuery); 2736 query.append(keyQuery);
2737 2737
2809 * </OL> 2809 * </OL>
2810 * 2810 *
2811 * @param pcatalog primary key catalog name; "" retrieves those without a catalog 2811 * @param pcatalog primary key catalog name; "" retrieves those without a catalog
2812 * @param pschema primary key schema name pattern; "" retrieves those without a schema 2812 * @param pschema primary key schema name pattern; "" retrieves those without a schema
2813 * @param ptable primary key table name 2813 * @param ptable primary key table name
2814 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2814 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2815 * @param fcatalog foreign key catalog name; "" retrieves those without a catalog 2815 * @param fcatalog foreign key catalog name; "" retrieves those without a catalog
2816 * @param fschema foreign key schema name pattern; "" retrieves those without a schema 2816 * @param fschema foreign key schema name pattern; "" retrieves those without a schema
2817 * @param ftable koreign key table name 2817 * @param ftable koreign key table name
2818 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2818 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2819 * @return ResultSet each row is a foreign key column description 2819 * @return ResultSet each row is a foreign key column description
2820 * @throws SQLException if a database error occurs 2820 * @throws SQLException if a database error occurs
2821 * @see #getImportedKeys 2821 * @see #getImportedKeys
2822 */ 2822 */
2823 @Override 2823 @Override
2986 * </OL> 2986 * </OL>
2987 * 2987 *
2988 * @param catalog a catalog name; "" retrieves those without a catalog 2988 * @param catalog a catalog name; "" retrieves those without a catalog
2989 * @param schema a schema name pattern; "" retrieves those without a schema 2989 * @param schema a schema name pattern; "" retrieves those without a schema
2990 * @param table a table name 2990 * @param table a table name
2991 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 2991 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
2992 * @param unique when true, return only indices for unique values; 2992 * @param unique when true, return only indices for unique values;
2993 * when false, return indices regardless of whether unique or not 2993 * when false, return indices regardless of whether unique or not
2994 * @param approximate when true, result is allowed to reflect approximate 2994 * @param approximate when true, result is allowed to reflect approximate
2995 * or out of data values; when false, results are requested to be 2995 * or out of data values; when false, results are requested to be
2996 * accurate 2996 * accurate
3751 * name as it is stored in the database; "" retrieves those 3751 * name as it is stored in the database; "" retrieves those
3752 * without a schema; null means that the schema name should 3752 * without a schema; null means that the schema name should
3753 * not be used to narrow the search 3753 * not be used to narrow the search
3754 * @param functionNamePattern a function name pattern; must match 3754 * @param functionNamePattern a function name pattern; must match
3755 * the function name as it is stored in the database 3755 * the function name as it is stored in the database
3756 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 3756 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
3757 * @return ResultSet - each row is a function description 3757 * @return ResultSet - each row is a function description
3758 * @throws SQLException if a database access error occurs 3758 * @throws SQLException if a database access error occurs
3759 */ 3759 */
3760 @Override 3760 @Override
3761 public ResultSet getFunctions( 3761 public ResultSet getFunctions(
3850 * name as it is stored in the database; "" retrieves those 3850 * name as it is stored in the database; "" retrieves those
3851 * without a schema; null means that the schema name should 3851 * without a schema; null means that the schema name should
3852 * not be used to narrow the search 3852 * not be used to narrow the search
3853 * @param functionNamePattern a procedure name pattern; must match the 3853 * @param functionNamePattern a procedure name pattern; must match the
3854 * function name as it is stored in the database 3854 * function name as it is stored in the database
3855 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 3855 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
3856 * @param columnNamePattern a parameter name pattern; must match the 3856 * @param columnNamePattern a parameter name pattern; must match the
3857 * parameter or column name as it is stored in the database 3857 * parameter or column name as it is stored in the database
3858 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE "%" condition is added to be evaluated). 3858 * Note that our implementation allows this param to be null also (for efficiency as no extra LIKE '%' condition is added to be evaluated).
3859 * @return ResultSet - each row describes a user function parameter, 3859 * @return ResultSet - each row describes a user function parameter,
3860 * column or return type 3860 * column or return type
3861 * @throws SQLException - if a database access error occurs 3861 * @throws SQLException - if a database access error occurs
3862 */ 3862 */
3863 @Override 3863 @Override