"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java" between
hsqldb-2.7.1.zip and hsqldb-2.7.2.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

JDBCDatabaseMetaData.java  (hsqldb-2.7.1):JDBCDatabaseMetaData.java  (hsqldb-2.7.2)
/* Copyright (c) 2001-2022, The HSQL Development Group /* Copyright (c) 2001-2023, The HSQL Development Group
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* Redistributions of source code must retain the above copyright notice, this * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
skipping to change at line 218 skipping to change at line 218
* *
* <hr> * <hr>
* *
* (fredt@users)<br> * (fredt@users)<br>
* (campbell-burnet@users) * (campbell-burnet@users)
* </div> * </div>
* <!-- end release-specific documentation --> * <!-- end release-specific documentation -->
* *
* @author Campbell Burnet (campbell-burnet@users dot sourceforge.net) * @author Campbell Burnet (campbell-burnet@users dot sourceforge.net)
* @author Fred Toussi (fredt@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.7.0 * @version 2.7.2
* @since HSQLDB 1.9.0 * @since HSQLDB 1.9.0
* @see org.hsqldb.dbinfo.DatabaseInformation * @see org.hsqldb.dbinfo.DatabaseInformation
*/ */
public class JDBCDatabaseMetaData implements DatabaseMetaData, public class JDBCDatabaseMetaData implements DatabaseMetaData,
java.sql.Wrapper { java.sql.Wrapper {
private static final String[] openGroupNumericFunctions = { private static final String[] openGroupNumericFunctions = {
"ABS", "ACOS", "ASIN", "ATAN", "ATAN2", "BITAND", "BITOR", "BITXOR", "ABS", "ACOS", "ASIN", "ATAN", "ATAN2", "BITAND", "BITOR", "BITXOR",
"CEILING", "COS", "COT", "DEGREES", "EXP", "FLOOR", "LOG", "LOG10", "CEILING", "COS", "COT", "DEGREES", "EXP", "FLOOR", "LOG", "LOG10",
"MOD", "PI", "POWER", "RADIANS", "RAND", "ROUND", "ROUNDMAGIC", "SIG N", "MOD", "PI", "POWER", "RADIANS", "RAND", "ROUND", "ROUNDMAGIC", "SIG N",
skipping to change at line 487 skipping to change at line 487
* <h1>HSQLDB-Specific Information:</h1> <p> * <h1>HSQLDB-Specific Information:</h1> <p>
* *
* Returns the full version string. * Returns the full version string.
* </div> <p> * </div> <p>
* *
* @return database version number * @return database version number
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
*/ */
public String getDatabaseProductVersion() throws SQLException { public String getDatabaseProductVersion() throws SQLException {
ResultSet rs = execute("call database_version()"); ResultSet rs = execute("CALL DATABASE_VERSION()");
rs.next(); rs.next();
return rs.getString(1); return rs.getString(1);
} }
/** /**
* Retrieves the name of this JDBC driver. * Retrieves the name of this JDBC driver.
* *
* @return JDBC driver name * @return JDBC driver name
skipping to change at line 2832 skipping to change at line 2832
} }
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schemaPattern = translateSchema(schemaPattern); schemaPattern = translateSchema(schemaPattern);
StringBuilder select = new StringBuilder(baseSelect); StringBuilder select = new StringBuilder(baseSelect);
select.append(and("PROCEDURE_CAT", select.append(and("PROCEDURE_CAT",
"=", catalog)).append(and("PROCEDURE_SCHEM", "LIKE", "=", catalog)).append(and("PROCEDURE_SCHEM", "LIKE",
schemaPattern)).append(and("PROCEDURE_NAME", "LIKE", schemaPattern)).append(and("PROCEDURE_NAME", "LIKE",
procedureNamePattern)); procedureNamePattern));
// By default, query already returns the result ordered by select.append(" ORDER BY PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME,
// PROCEDURE_SCHEM, PROCEDURE_NAME... SPECIFIC_NAME");
return execute(select.toString()); return execute(select.toString());
} }
/* /*
* Indicates that it is not known whether the procedure returns * Indicates that it is not known whether the procedure returns
* a result. * a result.
* <P> * <P>
* A possible value for column <code>PROCEDURE_TYPE</code> in the * A possible value for column <code>PROCEDURE_TYPE</code> in the
* <code>ResultSet</code> object returned by the method * <code>ResultSet</code> object returned by the method
* <code>getProcedures</code>. * <code>getProcedures</code>.
skipping to change at line 3003 skipping to change at line 3002
} }
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schemaPattern = translateSchema(schemaPattern); schemaPattern = translateSchema(schemaPattern);
StringBuilder select = toQueryPrefix("SYSTEM_PROCEDURECOLUMNS").append( StringBuilder select = toQueryPrefix("SYSTEM_PROCEDURECOLUMNS").append(
and("PROCEDURE_CAT", "=", catalog)).append( and("PROCEDURE_CAT", "=", catalog)).append(
and("PROCEDURE_SCHEM", "LIKE", schemaPattern)).append( and("PROCEDURE_SCHEM", "LIKE", schemaPattern)).append(
and("PROCEDURE_NAME", "LIKE", procedureNamePattern)).append( and("PROCEDURE_NAME", "LIKE", procedureNamePattern)).append(
and("COLUMN_NAME", "LIKE", columnNamePattern)); and("COLUMN_NAME", "LIKE", columnNamePattern));
// By default, query already returns result ordered by select.append(" ORDER BY PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME,
// PROCEDURE_SCHEM and PROCEDURE_NAME... SPECIFIC_NAME");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves a description of the tables available in the given catalog. * Retrieves a description of the tables available in the given catalog.
* Only table descriptions matching the catalog, schema, table * Only table descriptions matching the catalog, schema, table
* name and type criteria are returned. They are ordered by * name and type criteria are returned. They are ordered by
* <code>TABLE_TYPE</code>, JDBC 4.1[<code>TABLE_CAT</code>,] * <code>TABLE_TYPE</code>, JDBC 4.1[<code>TABLE_CAT</code>,]
* <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>. * <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>.
* <P> * <P>
skipping to change at line 3137 skipping to change at line 3135
+ illegalType + "\""); + illegalType + "\"");
} }
*/ */
// end JDBC4 clarification // end JDBC4 clarification
// //
select.append(" AND TABLE_TYPE IN (").append( select.append(" AND TABLE_TYPE IN (").append(
StringUtil.getList(types, ",", "'")).append(')'); StringUtil.getList(types, ",", "'")).append(')');
} }
// By default, query already returns result ordered by select.append(" ORDER BY TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, TABLE_NAME"
// TABLE_TYPE, TABLE_SCHEM and TABLE_NAME... );
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves the schema names available in this database. The results * Retrieves the schema names available in this database. The results
* are ordered by JDBC 4.1[<code>TABLE_CATALOG</code>] and * are ordered by JDBC 4.1[<code>TABLE_CATALOG</code>] and
* <code>TABLE_SCHEM</code>. * <code>TABLE_SCHEM</code>.
* *
* <P>The schema columns are: * <P>The schema columns are:
* <OL> * <OL>
skipping to change at line 3372 skipping to change at line 3369
} }
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schemaPattern = translateSchema(schemaPattern); schemaPattern = translateSchema(schemaPattern);
StringBuilder select = toQueryPrefix("SYSTEM_COLUMNS").append( StringBuilder select = toQueryPrefix("SYSTEM_COLUMNS").append(
and("TABLE_CAT", "=", catalog)).append( and("TABLE_CAT", "=", catalog)).append(
and("TABLE_SCHEM", "LIKE", schemaPattern)).append( and("TABLE_SCHEM", "LIKE", schemaPattern)).append(
and("TABLE_NAME", "LIKE", tableNamePattern)).append( and("TABLE_NAME", "LIKE", tableNamePattern)).append(
and("COLUMN_NAME", "LIKE", columnNamePattern)); and("COLUMN_NAME", "LIKE", columnNamePattern));
// by default, query already returns the result ordered select.append(" ORDER BY TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION");
// by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves a description of the access rights for a table's columns. * Retrieves a description of the access rights for a table's columns.
* *
* <P>Only privileges matching the column name criteria are * <P>Only privileges matching the column name criteria are
* returned. They are ordered by COLUMN_NAME and PRIVILEGE. * returned. They are ordered by COLUMN_NAME and PRIVILEGE.
* *
* <P>Each privilege description has the following columns: * <P>Each privilege description has the following columns:
skipping to change at line 3452 skipping to change at line 3448
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schema = translateSchema(schema); schema = translateSchema(schema);
String sql = String sql =
"SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM," "SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM,"
+ "TABLE_NAME, COLUMN_NAME, GRANTOR, GRANTEE, PRIVILEGE_TYPE PRIVILE GE, IS_GRANTABLE " + "TABLE_NAME, COLUMN_NAME, GRANTOR, GRANTEE, PRIVILEGE_TYPE PRIVILE GE, IS_GRANTABLE "
+ "FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE TRUE " + "FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE TRUE "
+ and("TABLE_CATALOG", "=", catalog) + and("TABLE_CATALOG", "=", catalog)
+ and("TABLE_SCHEMA", "=", schema) + and("TABLE_NAME", "=", table) + and("TABLE_SCHEMA", "=", schema) + and("TABLE_NAME", "=", table)
+ and("COLUMN_NAME", "LIKE", columnNamePattern) + and("COLUMN_NAME", "LIKE", columnNamePattern)
+ " ORDER BY COLUMN_NAME, PRIVILEGE"
; ;
// By default, the query already returns the result
// ordered by column name, privilege...
return execute(sql); return execute(sql);
} }
/** /**
* Retrieves a description of the access rights for each table available * Retrieves a description of the access rights for each table available
* in a catalog. Note that a table privilege applies to one or * in a catalog. Note that a table privilege applies to one or
* more columns in the table. It would be wrong to assume that * more columns in the table. It would be wrong to assume that
* this privilege applies to all columns (this may be true for * this privilege applies to all columns (this may be true for
* some systems but is not true for all.) * some systems but is not true for all.)
* *
skipping to change at line 3527 skipping to change at line 3522
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schemaPattern = translateSchema(schemaPattern); schemaPattern = translateSchema(schemaPattern);
String sql = String sql =
"SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM," "SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM,"
+ "TABLE_NAME, GRANTOR, GRANTEE, PRIVILEGE_TYPE PRIVILEGE, IS_GRANTA BLE " + "TABLE_NAME, GRANTOR, GRANTEE, PRIVILEGE_TYPE PRIVILEGE, IS_GRANTA BLE "
+ "FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE TRUE " + "FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE TRUE "
+ and("TABLE_CATALOG", "=", catalog) + and("TABLE_CATALOG", "=", catalog)
+ and("TABLE_SCHEMA", "LIKE", schemaPattern) + and("TABLE_SCHEMA", "LIKE", schemaPattern)
+ and("TABLE_NAME", "LIKE", tableNamePattern); + and("TABLE_NAME", "LIKE", tableNamePattern)
+ " ORDER BY TABLE_SCHEM, TABLE_NAME, PRIVILEGE";
/* /*
if (wantsIsNull(tableNamePattern)) { if (wantsIsNull(tableNamePattern)) {
return executeSelect("SYSTEM_TABLEPRIVILEGES", "0=1"); return executeSelect("SYSTEM_TABLEPRIVILEGES", "0=1");
} }
*/ */
// By default, the query already returns a result ordered by
// TABLE_SCHEM, TABLE_NAME, and PRIVILEGE...
return execute(sql); return execute(sql);
} }
/** /**
* Retrieves a description of a table's optimal set of columns that * Retrieves a description of a table's optimal set of columns that
* uniquely identifies a row. They are ordered by SCOPE. * uniquely identifies a row. They are ordered by SCOPE.
* *
* <P>Each column description has the following columns: * <P>Each column description has the following columns:
* <OL> * <OL>
* <LI><B>SCOPE</B> short {@code =>} actual scope of result * <LI><B>SCOPE</B> short {@code =>} actual scope of result
skipping to change at line 3657 skipping to change at line 3651
table)).append(and("NULLABLE", "=", table)).append(and("NULLABLE", "=",
Nullable)).append(" AND SCOPE IN ").append( Nullable)).append(" AND SCOPE IN ").append(
scopeIn); scopeIn);
// By default, query already returns rows in contract order. // By default, query already returns rows in contract order.
// However, the way things are set up, there should never be // However, the way things are set up, there should never be
// a result where there is > 1 distinct scope value: most requests // a result where there is > 1 distinct scope value: most requests
// will want only one table and the system table producer (for // will want only one table and the system table producer (for
// now) guarantees that a maximum of one BRI scope column set is // now) guarantees that a maximum of one BRI scope column set is
// produced for each table // produced for each table
select.append(" ORDER BY SCOPE");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves a description of a table's columns that are automatically * Retrieves a description of a table's columns that are automatically
* updated when any value in a row is updated. They are * updated when any value in a row is updated. They are
* unordered. * unordered.
* *
* <P>Each column description has the following columns: * <P>Each column description has the following columns:
* <OL> * <OL>
skipping to change at line 3798 skipping to change at line 3793
} }
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schema = translateSchema(schema); schema = translateSchema(schema);
StringBuilder select = StringBuilder select =
toQueryPrefix("SYSTEM_PRIMARYKEYS").append(and("TABLE_CAT", "=", toQueryPrefix("SYSTEM_PRIMARYKEYS").append(and("TABLE_CAT", "=",
catalog)).append(and("TABLE_SCHEM", "=", catalog)).append(and("TABLE_SCHEM", "=",
schema)).append(and("TABLE_NAME", "=", schema)).append(and("TABLE_NAME", "=",
table)); table));
// By default, query already returns result in contract order select.append(" ORDER BY COLUMN_NAME");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves a description of the primary key columns that are * Retrieves a description of the primary key columns that are
* referenced by the given table's foreign key columns (the primary keys * referenced by the given table's foreign key columns (the primary keys
* imported by a table). They are ordered by PKTABLE_CAT, * imported by a table). They are ordered by PKTABLE_CAT,
* PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ. * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
* *
* <P>Each primary key column description has the following columns: * <P>Each primary key column description has the following columns:
skipping to change at line 4019 skipping to change at line 4015
throw JDBCUtil.nullArgument("table"); throw JDBCUtil.nullArgument("table");
} }
catalog = translateCatalog(catalog); catalog = translateCatalog(catalog);
schema = translateSchema(schema); schema = translateSchema(schema);
StringBuilder select = StringBuilder select =
toQueryPrefix("SYSTEM_CROSSREFERENCE").append(and("PKTABLE_CAT", toQueryPrefix("SYSTEM_CROSSREFERENCE").append(and("PKTABLE_CAT",
"=", catalog)).append(and("PKTABLE_SCHEM", "=", "=", catalog)).append(and("PKTABLE_SCHEM", "=",
schema)).append(and("PKTABLE_NAME", "=", table)); schema)).append(and("PKTABLE_NAME", "=", table));
// By default, query already returns the table ordered by select.append(" ORDER BY FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, KEY_S
// FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. EQ");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* (JDBC4 clarification:) * (JDBC4 clarification:)
* Retrieves a description of the foreign key columns in the given foreign k ey * Retrieves a description of the foreign key columns in the given foreign k ey
* table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). * table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table).
* The number of columns returned from the parent table must match the numbe r of * The number of columns returned from the parent table must match the numbe r of
* columns that make up the foreign key. They * columns that make up the foreign key. They
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
skipping to change at line 4151 skipping to change at line 4146
StringBuilder select = StringBuilder select =
toQueryPrefix("SYSTEM_CROSSREFERENCE").append(and("PKTABLE_CAT", toQueryPrefix("SYSTEM_CROSSREFERENCE").append(and("PKTABLE_CAT",
"=", parentCatalog)).append(and("PKTABLE_SCHEM", "=", "=", parentCatalog)).append(and("PKTABLE_SCHEM", "=",
parentSchema)).append(and("PKTABLE_NAME", "=", parentSchema)).append(and("PKTABLE_NAME", "=",
parentTable)).append(and("FKTABLE_CAT", "=", parentTable)).append(and("FKTABLE_CAT", "=",
foreignCatalog)).append(and("FKTABLE_SCHEM", "=", foreignCatalog)).append(and("FKTABLE_SCHEM", "=",
foreignSchema)).append(and("FKTABLE_NAME", foreignSchema)).append(and("FKTABLE_NAME",
"=", foreignTable)); "=", foreignTable));
// by default, query already returns the table ordered by select.append(" ORDER BY FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, KEY_S
// FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. EQ");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves a description of all the (JDBC4 clarification:) data types supp orted by * Retrieves a description of all the (JDBC4 clarification:) data types supp orted by
* this database. They are ordered by DATA_TYPE and then by how * this database. They are ordered by DATA_TYPE and then by how
* closely the data type maps to the corresponding JDBC SQL type. * closely the data type maps to the corresponding JDBC SQL type.
* *
* <P>(JDBC4 clarification:) If the database supports SQL distinct types, th en getTypeInfo() will return * <P>(JDBC4 clarification:) If the database supports SQL distinct types, th en getTypeInfo() will return
* a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTIN CT. * a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTIN CT.
skipping to change at line 4328 skipping to change at line 4322
Boolean nu = (unique) ? Boolean.FALSE Boolean nu = (unique) ? Boolean.FALSE
: null; : null;
StringBuilder select = StringBuilder select =
toQueryPrefix("SYSTEM_INDEXINFO").append(and("TABLE_CAT", "=", toQueryPrefix("SYSTEM_INDEXINFO").append(and("TABLE_CAT", "=",
catalog)).append(and("TABLE_SCHEM", "=", catalog)).append(and("TABLE_SCHEM", "=",
schema)).append(and("TABLE_NAME", "=", schema)).append(and("TABLE_NAME", "=",
table)).append(and("NON_UNIQUE", "=", table)).append(and("NON_UNIQUE", "=",
nu)); nu));
// By default, this query already returns the table ordered by select.append(" ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION"
// NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION... );
return execute(select.toString()); return execute(select.toString());
} }
//--------------------------JDBC 2.0----------------------------- //--------------------------JDBC 2.0-----------------------------
/** /**
* Retrieves whether this database supports the given result set type. * Retrieves whether this database supports the given result set type.
* *
* @param type defined in <code>java.sql.ResultSet</code> * @param type defined in <code>java.sql.ResultSet</code>
* @return <code>true</code> if so; <code>false</code> otherwise * @return <code>true</code> if so; <code>false</code> otherwise
skipping to change at line 4706 skipping to change at line 4699
"LIKE", typeNamePattern)); "LIKE", typeNamePattern));
if (types == null) { if (types == null) {
// do not use to narrow search // do not use to narrow search
} else { } else {
select.append(" AND DATA_TYPE IN (").append( select.append(" AND DATA_TYPE IN (").append(
StringUtil.getList(types, ",", "")).append(')'); StringUtil.getList(types, ",", "")).append(')');
} }
// By default, the query already returns a result ordered by select.append(" ORDER BY DATA_TYPE, TYPE_CAT, TYPE_SCHEM, TYPE_NAME");
// DATA_TYPE, TYPE_SCHEM, and TYPE_NAME...
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves the connection that produced this metadata object. * Retrieves the connection that produced this metadata object.
* <P> * <P>
* @return the connection that produced this metadata object * @return the connection that produced this metadata object
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @since JDK 1.2 * @since JDK 1.2
*/ */
skipping to change at line 5065 skipping to change at line 5057
return executeSelect("SYSTEM_UDTATTRIBUTES", "0=1"); return executeSelect("SYSTEM_UDTATTRIBUTES", "0=1");
} }
schemaPattern = translateSchema(schemaPattern); schemaPattern = translateSchema(schemaPattern);
StringBuilder select = toQueryPrefix("SYSTEM_UDTATTRIBUTES").append( StringBuilder select = toQueryPrefix("SYSTEM_UDTATTRIBUTES").append(
and("TYPE_CAT", "=", catalog)).append( and("TYPE_CAT", "=", catalog)).append(
and("TYPE_SCHEM", "LIKE", schemaPattern)).append( and("TYPE_SCHEM", "LIKE", schemaPattern)).append(
and("TYPE_NAME", "LIKE", typeNamePattern)).append( and("TYPE_NAME", "LIKE", typeNamePattern)).append(
and("ATTR_NAME", "LIKE", attributeNamePattern)); and("ATTR_NAME", "LIKE", attributeNamePattern));
select.append(" ORDER BY TYPE_CAT, TYPE_SCHEM, TYPE_NAME, ORDINAL_POSITI ON");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves whether this database supports the given result set holdability . * Retrieves whether this database supports the given result set holdability .
* *
* <!-- start release-specific documentation --> * <!-- start release-specific documentation -->
* <div class="ReleaseSpecificDocumentation"> * <div class="ReleaseSpecificDocumentation">
* <h1>HSQLDB-Specific Information:</h1> <p> * <h1>HSQLDB-Specific Information:</h1> <p>
* *
skipping to change at line 5339 skipping to change at line 5332
* @see #getSearchStringEscape * @see #getSearchStringEscape
* @since JDK 1.6, HSQLDB 1.9 * @since JDK 1.6, HSQLDB 1.9
*/ */
public ResultSet getSchemas(String catalog, public ResultSet getSchemas(String catalog,
String schemaPattern) throws SQLException { String schemaPattern) throws SQLException {
StringBuilder select = StringBuilder select =
toQueryPrefix("SYSTEM_SCHEMAS").append(and("TABLE_CATALOG", "=", toQueryPrefix("SYSTEM_SCHEMAS").append(and("TABLE_CATALOG", "=",
catalog)).append(and("TABLE_SCHEM", "LIKE", schemaPattern)); catalog)).append(and("TABLE_SCHEM", "LIKE", schemaPattern));
// By default, query already returns result in contract order select.append(" ORDER BY TABLE_CATALOG, TABLE_SCHEM");
return execute(select.toString()); return execute(select.toString());
} }
/** /**
* Retrieves whether this database supports invoking user-defined or vendor functions * Retrieves whether this database supports invoking user-defined or vendor functions
* using the stored procedure escape syntax. * using the stored procedure escape syntax.
* *
* @return <code>true</code> if so; <code>false</code> otherwise * @return <code>true</code> if so; <code>false</code> otherwise
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @since JDK 1.6, HSQLDB 1.9 * @since JDK 1.6, HSQLDB 1.9
skipping to change at line 5762 skipping to change at line 5755
/** /**
* *
* Retrieves the maximum number of bytes this database allows for * Retrieves the maximum number of bytes this database allows for
* the logical size for a {@code LOB}. * the logical size for a {@code LOB}.
* *
* @return the maximum number of bytes allowed; a result of zero * @return the maximum number of bytes allowed; a result of zero
* means that there is no limit or the limit is not known * means that there is no limit or the limit is not known
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @since 1.8 * @since 1.8
*/ */
//#ifdef JAVA8
public long getMaxLogicalLobSize() throws SQLException { public long getMaxLogicalLobSize() throws SQLException {
return BlobType.maxBlobPrecision; return BlobType.maxBlobPrecision;
} }
//#endif JAVA8
/** /**
* Retrieves whether this database supports REF CURSOR. * Retrieves whether this database supports REF CURSOR.
* @return {@code true} if this database supports REF CURSOR; * @return {@code true} if this database supports REF CURSOR;
* {@code false} otherwise * {@code false} otherwise
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @since 1.8 * @since 1.8
*/ */
//#ifdef JAVA8
public boolean supportsRefCursors() throws SQLException { public boolean supportsRefCursors() throws SQLException {
return false; return false;
} }
//#endif JAVA8
//----------------------- Internal Implementation -------------------------- //----------------------- Internal Implementation --------------------------
/** Used by getBestRowIdentifier to avoid extra object construction */ /** Used by getBestRowIdentifier to avoid extra object construction */
static final Integer INT_COLUMNS_NO_NULLS = Integer.valueOf(columnNoNulls); static final Integer INT_COLUMNS_NO_NULLS = Integer.valueOf(columnNoNulls);
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// private attributes // private attributes
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
/** /**
 End of changes. 23 change blocks. 
32 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)