0001: /*
0002: * Licensed to the Apache Software Foundation (ASF) under one or more
0003: * contributor license agreements. See the NOTICE file distributed with
0004: * this work for additional information regarding copyright ownership.
0005: * The ASF licenses this file to You under the Apache License, Version 2.0
0006: * (the "License"); you may not use this file except in compliance with
0007: * the License. You may obtain a copy of the License at
0008: *
0009: * http://www.apache.org/licenses/LICENSE-2.0
0010: *
0011: * Unless required by applicable law or agreed to in writing, software
0012: * distributed under the License is distributed on an "AS IS" BASIS,
0013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014: * See the License for the specific language governing permissions and
0015: * limitations under the License.
0016: */
0017:
0018: package java.sql;
0019:
0020: /**
0021: * An interface which provides comprehensive information about the database.
0022: * <p>
0023: * This interface is implemented by JDBC driver writers in order to provide
0024: * information about the underlying Database capabilities and the JDBC driver
0025: * capabilities taken together.
0026: * <p>
0027: * Some of the methods in this interface take String parameters which are
0028: * Patterns. Within these string Patterns, '%' and '_' characters have special
0029: * meanings. '%' means "match any substring of 0 or more characters". '_' means
0030: * "match any one character". Only metadata entries that match the pattern are
0031: * returned. If such a search pattern string is set to <code>null</code>,
0032: * that argument's criteria are dropped from the search.
0033: *
0034: */
0035: public interface DatabaseMetaData {
0036:
0037: /**
0038: * States that it may not be permitted to store <code>NULL</code> values.
0039: */
0040: public static final short attributeNoNulls = 0;
0041:
0042: /**
0043: * States that <code>NULL</code> values are definitely permitted.
0044: */
0045: public static final short attributeNullable = 1;
0046:
0047: /**
0048: * States that whether <code>NULL</code> values are permitted is unknown.
0049: */
0050: public static final short attributeNullableUnknown = 2;
0051:
0052: /**
0053: * States the best row identifier is <em>NOT</em> a pseudo column.
0054: */
0055: public static final int bestRowNotPseudo = 1;
0056:
0057: /**
0058: * States that the best row identifier is a pseudo column.
0059: */
0060: public static final int bestRowPseudo = 2;
0061:
0062: /**
0063: * States that the remainder of the current session is used as the scope for
0064: * the best row identifier.
0065: */
0066: public static final int bestRowSession = 2;
0067:
0068: /**
0069: * States that best row identifier scope lasts only while the row is being
0070: * used.
0071: */
0072: public static final int bestRowTemporary = 0;
0073:
0074: /**
0075: * States that the remainder of the current transaction is used as the scope
0076: * for the best row identifier.
0077: */
0078: public static final int bestRowTransaction = 1;
0079:
0080: /**
0081: * States that the best row identifier may or may not be a pseudo column.
0082: */
0083: public static final int bestRowUnknown = 0;
0084:
0085: /**
0086: * States that the column might not allow <code>NULL</code> values.
0087: */
0088: public static final int columnNoNulls = 0;
0089:
0090: /**
0091: * States that the column definitely allows <code>NULL</code> values.
0092: */
0093: public static final int columnNullable = 1;
0094:
0095: /**
0096: * States that it is unknown whether the columns may be nulled.
0097: */
0098: public static final int columnNullableUnknown = 2;
0099:
0100: /**
0101: * For the column UPDATE_RULE, States that when the primary key is updated,
0102: * the foreign key (imported key) is changed to agree with it.
0103: */
0104: public static final int importedKeyCascade = 0;
0105:
0106: /**
0107: * States deferrability.
0108: */
0109: public static final int importedKeyInitiallyDeferred = 5;
0110:
0111: /**
0112: * States defer-ability.
0113: */
0114: public static final int importedKeyInitiallyImmediate = 6;
0115:
0116: /**
0117: * For the columns UPDATE_RULE and DELETE_RULE, States that if the primary
0118: * key has been imported, it cannot be updated or deleted.
0119: */
0120: public static final int importedKeyNoAction = 3;
0121:
0122: /**
0123: * States defer-ability.
0124: */
0125: public static final int importedKeyNotDeferrable = 7;
0126:
0127: /**
0128: * States that a primary key must not be updated when imported as a foreign
0129: * key by some other table. Used for the column UPDATE_RULE.
0130: */
0131: public static final int importedKeyRestrict = 1;
0132:
0133: /**
0134: * States that when the primary key is modified (updated or deleted) the
0135: * foreign (imported) key is changed to its default value. Applies to the
0136: * UPDATE_RULE and DELETE_RULE columns.
0137: */
0138: public static final int importedKeySetDefault = 4;
0139:
0140: /**
0141: * States that when the primary key is modified (updated or deleted) the
0142: * foreign (imported) key is changed to <code>NULL</code>. Applies to the
0143: * UPDATE_RULE and DELETE_RULE columns.
0144: */
0145: public static final int importedKeySetNull = 2;
0146:
0147: /**
0148: * States that this column stores IN type parameters.
0149: */
0150: public static final int procedureColumnIn = 1;
0151:
0152: /**
0153: * States that this column stores INOUT type parameters.
0154: */
0155: public static final int procedureColumnInOut = 2;
0156:
0157: /**
0158: * States that this column stores OUT type parameters.
0159: */
0160: public static final int procedureColumnOut = 4;
0161:
0162: /**
0163: * States that the column stores results
0164: */
0165: public static final int procedureColumnResult = 3;
0166:
0167: /**
0168: * States that the column stores return values.
0169: */
0170: public static final int procedureColumnReturn = 5;
0171:
0172: /**
0173: * States that type of the column is unknown.
0174: */
0175: public static final int procedureColumnUnknown = 0;
0176:
0177: /**
0178: * States that <code>NULL</code> values are not permitted.
0179: */
0180: public static final int procedureNoNulls = 0;
0181:
0182: /**
0183: * States that the procedure does not return a result.
0184: */
0185: public static final int procedureNoResult = 1;
0186:
0187: /**
0188: * States that <code>NULL</code> values are permitted.
0189: */
0190: public static final int procedureNullable = 1;
0191:
0192: /**
0193: * States that whether <code>NULL</code> values are permitted is unknown.
0194: */
0195: public static final int procedureNullableUnknown = 2;
0196:
0197: /**
0198: * States that it is unknown whether or not the procedure returns a result.
0199: */
0200: public static final int procedureResultUnknown = 0;
0201:
0202: /**
0203: * States that the procedure returns a result.
0204: */
0205: public static final int procedureReturnsResult = 2;
0206:
0207: /**
0208: * States that the value is an SQL99 SQLSTATE value.
0209: */
0210: public static final int sqlStateSQL99 = 2;
0211:
0212: /**
0213: * States that the value is an SQL CLI SQLSTATE value as defined by X/Open
0214: * (who are now know as Open Group) .
0215: */
0216: public static final int sqlStateXOpen = 1;
0217:
0218: /**
0219: * States that this table index is a clustered index.
0220: */
0221: public static final short tableIndexClustered = 1;
0222:
0223: /**
0224: * States that this table index is a hashed index.
0225: */
0226: public static final short tableIndexHashed = 2;
0227:
0228: /**
0229: * States this table's index is neither a clustered index, not a hashed
0230: * index, and not a table statistics index; i.e. it is something else.
0231: */
0232: public static final short tableIndexOther = 3;
0233:
0234: /**
0235: * States this column has the table's statistics, and that it is returned in
0236: * conjunction with the table's index description.
0237: */
0238: public static final short tableIndexStatistic = 0;
0239:
0240: /**
0241: * States that a <code>NULL</code> value is <em>NOT</em> permitted for
0242: * this data type.
0243: */
0244: public static final int typeNoNulls = 0;
0245:
0246: /**
0247: * States that a <code>NULL</code> value is permitted for this data type.
0248: */
0249: public static final int typeNullable = 1;
0250:
0251: /**
0252: * States that it is unknown if a <code>NULL</code> value is permitted for
0253: * this data type.
0254: */
0255: public static final int typeNullableUnknown = 2;
0256:
0257: /**
0258: * States that one can base all WHERE search clauses except WHERE .
0259: */
0260: public static final int typePredBasic = 2;
0261:
0262: /**
0263: * States that <code>WHERE</code> is the only WHERE search clause that may
0264: * be based on this type.
0265: */
0266: public static final int typePredChar = 1;
0267:
0268: /**
0269: * States that this type does not support <code>WHERE</code> search
0270: * clauses.
0271: */
0272: public static final int typePredNone = 0;
0273:
0274: /**
0275: * States that all WHERE search clauses may be based on this type.
0276: */
0277: public static final int typeSearchable = 3;
0278:
0279: /**
0280: * States that the version column is known to be not a pseudo column.
0281: */
0282: public static final int versionColumnNotPseudo = 1;
0283:
0284: /**
0285: * States that this version column is known to be a pseudo column.
0286: */
0287: public static final int versionColumnPseudo = 2;
0288:
0289: /**
0290: * States that the version column may be a pseudo column or not.
0291: */
0292: public static final int versionColumnUnknown = 0;
0293:
0294: /**
0295: * Answers whether all procedures returned by <code>getProcedures</code>
0296: * can be called by the current user.
0297: *
0298: * @return <code>true</code> if all procedures can be called by the
0299: * current user, <code>false</code> otherwise.
0300: * @throws SQLException
0301: * if there is a database error
0302: */
0303: public boolean allProceduresAreCallable() throws SQLException;
0304:
0305: /**
0306: * Answers whether all the tables returned by <code>getTables</code> can
0307: * be used by the current user in a SELECT statement.
0308: *
0309: * @return <code>true</code> if all the tables can be used,<code>false</code>
0310: * otherwise
0311: * @throws SQLException
0312: * if there is a database error
0313: */
0314: public boolean allTablesAreSelectable() throws SQLException;
0315:
0316: /**
0317: * Answers if a data definition statement in a transaction forces a commit
0318: * of the transaction.
0319: *
0320: * @return <code>true</code> if the statement forces a commit,
0321: * <code>false</code> otherwise
0322: * @throws SQLException
0323: * if there is a database error
0324: */
0325: public boolean dataDefinitionCausesTransactionCommit()
0326: throws SQLException;
0327:
0328: /**
0329: * Answers whether the database ignores data definition statements within a
0330: * transaction.
0331: *
0332: * @return <code>true</code> if the database ignores a data definition
0333: * statement, <code>false</code> otherwise
0334: * @throws SQLException
0335: * if there is a database error
0336: */
0337: public boolean dataDefinitionIgnoredInTransactions()
0338: throws SQLException;
0339:
0340: /**
0341: * Answers whether a visible row delete can be detected by calling
0342: * <code>ResultSet.rowDeleted</code>.
0343: *
0344: * @param type
0345: * the type of the ResultSet involved:
0346: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
0347: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
0348: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
0349: * @return <code>true</code> if the visible row delete can be detected,
0350: * <code>false</code> otherwise
0351: * @throws SQLException
0352: * if there is a database error
0353: */
0354: public boolean deletesAreDetected(int type) throws SQLException;
0355:
0356: /**
0357: * Answers whether the return value of <code>getMaxRowSize</code> includes
0358: * the SQL data types <code>LONGVARCHAR</code> and
0359: * <code>LONGVARBINARY</code>.
0360: *
0361: * @return <code>true</code> if the return value includes
0362: * <code>LONGVARBINARY</code> and <code>LONGVARCHAR</code>,
0363: * otherwise <code>false</code>.
0364: * @throws SQLException
0365: * if there is a database error
0366: */
0367: public boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
0368:
0369: /**
0370: * Answers a description of the specified attribute of the specified type
0371: * for an SQL User Defined Type (UDT) for a specified schema and catalog.
0372: * The descriptions returned are ordered by <code>TYPE_SCHEM</code>,
0373: * <code>TYPE_NAME</code> and ORDINAL_POSITION. The descriptions do not
0374: * contain inherited attributes.
0375: * <p>
0376: * The returned ResultSet object has rows with the following column names
0377: * and meanings:
0378: * <ol>
0379: * <li><code>TYPE_CAT</code> - String - the Type Catalog name (possibly
0380: * <code>null</code>)</li>
0381: * <li><code>TYPE_SCHEM</code> - String - the Type Schema name (possibly
0382: * <code>null</code>)</li>
0383: * <li><code>TYPE_NAME</code> - String - the Type name</li>
0384: * <li><code>ATTR_NAME</code> - String - the Attribute name</li>
0385: * <li><code>DATA_TYPE</code> - int - the Attribute type as defined in
0386: * <code>java.sql.Types</code></li>
0387: * <li><code>ATTR_TYPE_NAME</code> - String - the Attribute type name.
0388: * This depends on the data source. For a <code>UDT</code> the name is
0389: * fully qualified. For a <code>REF</code> it is both fully qualified and
0390: * represents the target type of the reference.</li>
0391: * <li><code>ATTR_SIZE</code> - int - the Column size. When referring to
0392: * char and date types this value is the maximum number of characters. When
0393: * referring to numeric types is is the precision.</li>
0394: * <li><code>DECIMAL_DIGITS</code> - int - how many fractional digits are
0395: * supported</li>
0396: * <li><code>NUM_PREC_RADIX</code> - int - numeric values radix</li>
0397: * <li><code>NULLABLE</code> - int - whether <code>NULL</code> is
0398: * permitted:
0399: * <ul>
0400: * <li>DatabaseMetaData.attributeNoNulls - might not allow
0401: * <code>NULL</code>s</li>
0402: * <li>DatabaseMetaData.attributeNullable - <code>NULL</code>s
0403: * definitely permitted</li>
0404: * <li>DatabaseMetaData.attributeNullableUnknown - unknown</li>
0405: * </ul>
0406: * </li>
0407: * <li><code>REMARKS</code> - String - A comment describing the attribute
0408: * (possibly <code>null</code>)</li>
0409: * <li>ATTR_DEF - String - Default value for the attribute (possibly
0410: * <code>null</code>)</li>
0411: * <li><code>SQL_DATA_TYPE</code> - int - not used</li>
0412: * <li>SQL_DATETIME_SUB - int - not used</li>
0413: * <li>CHAR_OCTET_LENGTH - int - For <code>CHAR</code> types, the max
0414: * number of bytes in the column</li>
0415: * <li>ORDINAL_POSITION - int - The Index of the column in the Table (based
0416: * on 1)</li>
0417: * <li>IS_NULLABLE - String - "NO" = column does not allow
0418: * <code>NULL</code>s, "YES" = column allows <code>NULL</code>s "" =
0419: * <code>NULL</code> status unknown</li>
0420: * <li><code>SCOPE_CATALOG</code> - String - Catalog for table,
0421: * <code>SCOPE</code> of Reference attribute. NULL if
0422: * <code>DATA_TYPE</code> is not REF.</li>
0423: * <li><code>SCOPE_SCHEMA</code> - String - Schema for table,
0424: * <code>SCOPE</code> of Reference attribute. NULL if
0425: * <code>DATA_TYPE</code> is not REF.</li>
0426: * <li><code>SCOPE_TABLE</code> - String - Table name for
0427: * <code>SCOPE</code> of Reference attribute. <code>NULL</code> if
0428: * <code>DATA_TYPE</code> is not REF.</li>
0429: * <li><code>SOURCE_DATA_TYPE</code> - String - The source type for user
0430: * generated REF type or for a Distinct type. (<code>NULL</code> if
0431: * <code>DATA_TYPE</code> is not DISTINCT or user generated REF)</li>
0432: * </ol>
0433: *
0434: * @param catalog
0435: * a Catalog Name. <code>null</code> is used to imply no
0436: * narrowing of the search using Catalog Name. Otherwise, the
0437: * name must match a Catalog Name held in the database, with ""
0438: * used to retrieve those without a Catalog Name.
0439: * @param schemaPattern
0440: * a Schema Name Pattern. <code>null</code> is used to imply no
0441: * narrowing of the search using Schema Name. Otherwise, the name
0442: * must match a Schema name in the database, with "" used to
0443: * retrieve those without a Schema name.
0444: * @param typeNamePattern
0445: * a Type name. This pattern must match the type name stored in
0446: * the database.
0447: * @param attributeNamePattern
0448: * an Attribute name. Must match the attribute name as stored in
0449: * the database.
0450: * @return a ResultSet, where each Row is an attribute description
0451: * @throws SQLException
0452: * if there is a database error
0453: */
0454: public ResultSet getAttributes(String catalog,
0455: String schemaPattern, String typeNamePattern,
0456: String attributeNamePattern) throws SQLException;
0457:
0458: /**
0459: * Answers a list of a table's optimal set of columns that uniquely
0460: * identifies a row. The results are ordered by <code>SCOPE</code> (see
0461: * below).
0462: * <p>
0463: * The results are returned as a table, with one entry for each column, as
0464: * follows:
0465: * <ol>
0466: * <li><code>SCOPE</code> - short - the <code>SCOPE</code> of the
0467: * result, as follows:
0468: * <ul>
0469: * <li>DatabaseMetaData.bestRowTemporary - very temporary, while using row
0470: * </li>
0471: * <li>DatabaseMetaData.bestRowTransaction - good for remainder of current
0472: * transaction </li>
0473: * <li>DatabaseMetaData.bestRowSession - good for remainder of database
0474: * session </li>
0475: * </ul>
0476: * </li>
0477: * <li><code>COLUMN_NAME</code> - String - the column name </li>
0478: * <li><code>DATA_TYPE</code> - int - the Type of the data, as defined in
0479: * <code>java.sql.Types</code> </li>
0480: * <li><code>TYPE_NAME</code> - String - Name of the type - database
0481: * dependent. For UDT types the name is fully qualified </li>
0482: * <li><code>COLUMN_SIZE</code> - int - The precision of the data in the
0483: * column </li>
0484: * <li><code>BUFFER_LENGTH</code> - int - not used </li>
0485: * <li><code>DECIMAL_DIGITS</code> - short - number of fractional digits
0486: * </li>
0487: * <li><code>PSEUDO_COLUMN</code> - short - whether this is a pseudo
0488: * column eg. and Oracle ROWID:
0489: * <ul>
0490: * <li>DatabaseMetaData.bestRowUnknown - don't know whether this is a
0491: * pseudo column</li>
0492: * <li>DatabaseMetaData.bestRowNotPseudo - column is not pseudo</li>
0493: * <li>DatabaseMetaData.bestRowPseudo - column is a pseudo column</li>
0494: * </ul>
0495: * </li>
0496: * </ol>
0497: *
0498: * @param catalog
0499: * a Catalog Name. <code>null</code> is used to imply no
0500: * narrowing of the search using Catalog Name. Otherwise, the
0501: * name must match a Catalog Name held in the database, with ""
0502: * used to retrieve those without a Catalog Name.
0503: * @param schema
0504: * a Schema Name Pattern. <code>null</code> is used to imply no
0505: * narrowing of the search using Schema Name. Otherwise, the name
0506: * must match a Schema name in the database, with "" used to
0507: * retrieve those without a Schema name.
0508: * @param table
0509: * the table name. This must match the name of the table as
0510: * declared in the database.
0511: * @param scope
0512: * the <code>SCOPE</code> of interest, values as defined above
0513: * @param nullable
0514: * <code>true</code> = include columns that are nullable,
0515: * <code>false</code> = do not include
0516: * @return a ResultSet where each row is a description of a column and the
0517: * complete set of rows is the optimal set for this table.
0518: * @throws SQLException
0519: * if there is a database error
0520: */
0521: public ResultSet getBestRowIdentifier(String catalog,
0522: String schema, String table, int scope, boolean nullable)
0523: throws SQLException;
0524:
0525: /**
0526: * Answers the set of catalog names available in this database. The set is
0527: * returned ordered by catalog name.
0528: *
0529: * @return a ResultSet containing the Catalog names, with each row
0530: * containing one Catalog name contained as a String in the single
0531: * column named <code>TABLE_CAT</code>.
0532: * @throws SQLException
0533: * if there is a database error
0534: */
0535: public ResultSet getCatalogs() throws SQLException;
0536:
0537: /**
0538: * Answers the separator that this database uses between a catalog name and
0539: * table name.
0540: *
0541: * @return a String containing the separator
0542: * @throws SQLException
0543: * if there is a database error
0544: */
0545: public String getCatalogSeparator() throws SQLException;
0546:
0547: /**
0548: * Answers the term that the database vendor prefers term for "catalog".
0549: *
0550: * @return a String with the vendor's term for "catalog"
0551: * @throws SQLException
0552: * if there is a database error
0553: */
0554: public String getCatalogTerm() throws SQLException;
0555:
0556: /**
0557: * Answers a description of access rights for a table's columns. Only access
0558: * rights matching the criteria for the column name are returned.
0559: * <p>
0560: * The description is returned as a ResultSet with rows of data for each
0561: * access right, with columns as follows:
0562: * <ol>
0563: * <li><code>TABLE_CAT</code> - String - Catalog name (possibly
0564: * <code>null</code>)</li>
0565: * <li><code>TABLE_SCHEM</code> - String - Schema name (possibly
0566: * <code>null</code>) </li>
0567: * <li><code>TABLE_NAME</code> - String - The Table name </li>
0568: * <li><code>COLUMN_NAME</code> - String - The Column name</li>
0569: * <li><code>GRANTOR</code> - String - The grantor of access (possibly
0570: * <code>null</code>)</li>
0571: * <li><code>PRIVILEGE</code> - String - Access right - one of SELECT,
0572: * INSERT, UPDATE, REFERENCES,...</li>
0573: * <li><code>IS_GRANTABLE</code> - String - "YES" implies that the
0574: * receiver can grant access to others, "NO" if the receiver cannot grant
0575: * access to others, <code>null</code> if unknown.</li>
0576: * </ol>
0577: *
0578: * @param catalog
0579: * a Catalog Name. <code>null</code> is used to imply no
0580: * narrowing of the search using Catalog Name. Otherwise, the
0581: * name must match a Catalog Name held in the database, with ""
0582: * used to retrieve those without a Catalog Name.
0583: * @param schema
0584: * a Schema Name Pattern. <code>null</code> is used to imply no
0585: * narrowing of the search using Schema Name. Otherwise, the name
0586: * must match a Schema name in the database, with "" used to
0587: * retrieve those without a Schema name.
0588: * @param table
0589: * the table name. This must match the name of the table as
0590: * declared in the database.
0591: * @param columnNamePattern
0592: * the column name. This must match the name of a column in the
0593: * table in the database.
0594: * @return a ResultSet containing the access rights, one row for each
0595: * privilege description
0596: * @throws SQLException
0597: * if there is a database error
0598: */
0599: public ResultSet getColumnPrivileges(String catalog, String schema,
0600: String table, String columnNamePattern) throws SQLException;
0601:
0602: /**
0603: * Answers a description of table columns available in a specified catalog.
0604: * Only descriptions meeting the specified Catalog, Schema, Table and Column
0605: * names are returned.
0606: * <p>
0607: * The descriptions are returned as a ResultSet conforming to the following
0608: * data layout, with one row per table column:
0609: * <ol>
0610: * <li><code>TABLE_CAT</code> - String - Catalog name (possibly
0611: * <code>null</code>)</li>
0612: * <li><code>TABLE_SCHEM</code> - String - Schema name (possibly
0613: * <code>null</code>) </li>
0614: * <li><code>TABLE_NAME</code> - String - The Table name </li>
0615: * <li><code>COLUMN_NAME</code> - String - The Column name</li>
0616: * <li><code>DATA_TYPE</code> - int - The SQL type as specified in
0617: * <code>java.sql.Types</code></li>
0618: * <li><code>TYPE_NAME</code> - String - Name for the data type, depends
0619: * on database, UDT names are fully qualified</li>
0620: * <li><code>COLUMN_SIZE</code> - int - Column size - the precision for
0621: * numeric types, max characters for char and date types</li>
0622: * <li><code>BUFFER_LENGTH</code> - int - Not used </li>
0623: * <li><code>DECIMAL_DIGITS</code> - int - maximum number of fractional
0624: * digits </li>
0625: * <li><code>NUM_PREC_RADIX</code> - int - the Radix </li>
0626: * <li><code>NULLABLE</code> - int - does the column allow
0627: * <code>null</code>s:
0628: * <ul>
0629: * <li>DatabaseMetaData.columnNoNulls = may not allow <code>NULL</code>s</li>
0630: * <li>DatabaseMetaData.columnNullable = does allow <code>NULL</code>s</li>
0631: * <li>DatabaseMetaData.columnNullableUnknown = unknown <code>NULL</code>
0632: * status</li>
0633: * </ul>
0634: * </li>
0635: * <li><code>REMARKS</code> - String - A description of the column
0636: * (possibly <code>null</code>) </li>
0637: * <li><code>COLUMN_DEF</code> - String - Default value for the column
0638: * (possibly <code>null</code>)</li>
0639: * <li><code>SQL_DATA_TYPE</code> - int - not used </li>
0640: * <li><code>SQL_DATETIME_SUB</code> - int - not used </li>
0641: * <li><code>CHAR_OCTET_LENGTH</code> - int - maximum number of bytes in
0642: * the char type columns </li>
0643: * <li><code>ORDINAL_POSITION</code> - int - Column index in the table (1
0644: * based) </li>
0645: * <li><code>IS_NULLABLE</code> - String - "NO" = column does not allow
0646: * NULLs, "YES" = column allows NULLs "" = <code>NULL</code> status
0647: * unknown</li>
0648: * <li><code>SCOPE</code>_CATALOG - String - Catalog for table,
0649: * <code>SCOPE</code> of Reference attribute. NULL if
0650: * <code>DATA_TYPE</code> is not REF.</li>
0651: * <li><code>SCOPE_SCHEMA</code> - String - Schema for table, scope of
0652: * Reference attribute. <code>NULL</code> if <code>DATA_TYPE</code> is
0653: * not REF.</li>
0654: * <li><code>SCOPE_TABLE</code> - String - Table name for scope of
0655: * Reference attribute. <code>NULL</code> if <code>DATA_TYPE</code> is
0656: * not REF.</li>
0657: * <li><code>SOURCE_DATA_TYPE</code> - String - The source type for user
0658: * generated REF type or for a Distinct type. (<code>NULL</code> if
0659: * <code>DATA_TYPE</code> is not DISTINCT or user generated REF)</li>
0660: * </ol>
0661: *
0662: * @param catalog
0663: * a Catalog Name. <code>null</code> is used to imply no
0664: * narrowing of the search using Catalog Name. Otherwise, the
0665: * name must match a Catalog Name held in the database, with ""
0666: * used to retrieve those without a Catalog Name.
0667: * @param schemaPattern
0668: * a Schema Name Pattern. <code>null</code> is used to imply no
0669: * narrowing of the search using Schema Name. Otherwise, the name
0670: * must match a Schema name in the database, with "" used to
0671: * retrieve those without a Schema name.
0672: * @param tableNamePattern
0673: * the table name. This must match the name of the table as
0674: * declared in the database.
0675: * @param columnNamePattern
0676: * the column name. This must match the name of a column in the
0677: * table in the database.
0678: * @return the descriptions as a ResultSet with rows in the form defined
0679: * above
0680: * @throws SQLException
0681: * if there is a database error
0682: */
0683: public ResultSet getColumns(String catalog, String schemaPattern,
0684: String tableNamePattern, String columnNamePattern)
0685: throws SQLException;
0686:
0687: /**
0688: * Answers the database connection that created this metadata.
0689: *
0690: * @return the connection
0691: * @throws SQLException
0692: * if there is a database error
0693: */
0694: public Connection getConnection() throws SQLException;
0695:
0696: /**
0697: * Answers a list of foreign key columns in a given foreign key table that
0698: * reference the primary key columns of a supplied primary key table. This
0699: * describes how one table imports the key of another table. It would be
0700: * expected to return a single foreign key - primary key pair in most cases.
0701: * <p>
0702: * The descriptions are returned as a ResultSet with one row for each
0703: * Foreign key, with the following layout:
0704: * <ol>
0705: * <li><code>PKTABLE_CAT</code> - String - from the primary key table :
0706: * Catalog (possibly <code>null</code>)</li>
0707: * <li><code>PKTABLE_SCHEM</code> - String - from the primary key table :
0708: * Schema (possibly <code>null</code>) </li>
0709: * <li><code>PKTABLE_NAME</code> - String - primary key table : name
0710: * </li>
0711: * <li><code>PKCOLUMN_NAME</code> - String - primary key column : name</li>
0712: * <li><code>FKTABLE_CAT</code> - String - from the foreign key table :
0713: * the catalog name being exported (possibly <code>null</code>)</li>
0714: * <li><code>FKTABLE_SCHEM</code> - String - foreign key table : Schema
0715: * name being exported (possibly <code>null</code>) </li>
0716: * <li><code>FKTABLE_NAME</code> - String - foreign key table : the name
0717: * being exported</li>
0718: * <li><code>FKCOLUMN_NAME</code> - String - foreign key column : the
0719: * name being exported</li>
0720: * <li><code>KEY_SEQ</code> - short - sequence number (in the foreign
0721: * key)</li>
0722: * <li><code>UPDATE_RULE</code> - short - how to treat foreign key when
0723: * primary key is updated:
0724: * <ul>
0725: * <li>DatabaseMetaData.importedKeyNoAction - don't allow update of primary
0726: * key if imported</li>
0727: * <li>DatabaseMetaData.importedKeyCascade - change imported key to match
0728: * the primary key update</li>
0729: * <li>DatabaseMetaData.importedKeySetNull - set the imported key to
0730: * <code>null</code></li>
0731: * <li>DatabaseMetaData.importedKeySetDefault - set the imported key to
0732: * default values</li>
0733: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
0734: * </ul>
0735: * </li>
0736: * <li><code>DELETE_RULE</code> - short - how to treat foreign key when
0737: * primary key is deleted:
0738: * <ul>
0739: * <li>DatabaseMetaData.importedKeyNoAction - don't allow delete of primary
0740: * key if imported</li>
0741: * <li>DatabaseMetaData.importedKeyCascade - delete those rows that import
0742: * a deleted key</li>
0743: * <li>DatabaseMetaData.importedKeySetNull - set the imported key to
0744: * <code>null</code></li>
0745: * <li>DatabaseMetaData.importedKeySetDefault - set the imported key to
0746: * default values</li>
0747: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
0748: * </ul>
0749: * </li>
0750: * <li>FK_NAME - String - foreign key name (possibly <code>null</code>)</li>
0751: * <li>PK_NAME - String - primary key name (possibly <code>null</code>)</li>
0752: * <li>DEFERRABILITY - short - can foreign key constraints be deferred
0753: * until commit (see SQL92 specification for definitions)?:
0754: * <ul>
0755: * <li>DatabaseMetaData.importedKeyInitiallyDeferred</li>
0756: * <li>DatabaseMetaData.importedKeyInitiallyImmediate</li>
0757: * <li>DatabaseMetaData.importedKeyNotDeferrable</li>
0758: * </ul>
0759: * </li>
0760: * </ol>
0761: *
0762: * @param primaryCatalog
0763: * a Catalog Name. <code>null</code> is used to imply no
0764: * narrowing of the search using Catalog Name. Otherwise, the
0765: * name must match a Catalog Name held in the database, with ""
0766: * used to retrieve those without a Catalog Name.
0767: * @param primarySchema
0768: * a Schema Name. <code>null</code> is used to imply no
0769: * narrowing of the search using Schema Name. Otherwise, the name
0770: * must match a Schema name in the database, with "" used to
0771: * retrieve those without a Schema name.
0772: * @param primaryTable
0773: * the name of the table which exports the key. It must match the
0774: * name of the table in the database
0775: * @param foreignCatalog
0776: * a Catalog Name. <code>null</code> is used to imply no
0777: * narrowing of the search using Catalog Name. Otherwise, the
0778: * name must match a Catalog Name held in the database, with ""
0779: * used to retrieve those without a Catalog Name.
0780: * @param foreignSchema
0781: * a Schema Name. <code>null</code> is used to imply no
0782: * narrowing of the search using Schema Name. Otherwise, the name
0783: * must match a Schema name in the database, with "" used to
0784: * retrieve those without a Schema name.
0785: * @param foreignTable
0786: * the name of the table importing the key. It must match the
0787: * name of the table in the database
0788: * @return a ResultSet containing rows with the descriptions of the foreign
0789: * keys laid out according to the format defined above.
0790: * @throws SQLException
0791: * if there is a database error
0792: */
0793: public ResultSet getCrossReference(String primaryCatalog,
0794: String primarySchema, String primaryTable,
0795: String foreignCatalog, String foreignSchema,
0796: String foreignTable) throws SQLException;
0797:
0798: /**
0799: * Answers the major version number of the database software.
0800: *
0801: * @return the Major version number of the database software.
0802: * @throws SQLException
0803: * a database error occurred
0804: */
0805: public int getDatabaseMajorVersion() throws SQLException;
0806:
0807: /**
0808: * Answers the minor version number of the database software.
0809: *
0810: * @return the Minor version number of the database software.
0811: * @throws SQLException
0812: * a database error occurred
0813: */
0814: public int getDatabaseMinorVersion() throws SQLException;
0815:
0816: /**
0817: * Answers the name of the database software.
0818: *
0819: * @return a String with the name of the database software.
0820: * @throws SQLException
0821: * a database error occurred
0822: */
0823: public String getDatabaseProductName() throws SQLException;
0824:
0825: /**
0826: * Answers the version number of this database software.
0827: *
0828: * @return a String with the version number of the database software.
0829: * @throws SQLException
0830: * a database error occurred
0831: */
0832: public String getDatabaseProductVersion() throws SQLException;
0833:
0834: /**
0835: * Answers the default transaction isolation level for this database.
0836: *
0837: * @return the default transaction isolation level. One of
0838: * <code>TRANSACTION_NONE</code>,
0839: * <code>TRANSACTION_READ_COMMITTED</code>,
0840: * <code>TRANSACTION_READ_UNCOMMITTED</code>,
0841: * <code>TRANSACTION_REPEATABLE_READ</code> or
0842: * <code>TRANSACTION_SERIALIZABLE</code>.
0843: * @throws SQLException
0844: * a database error occurred
0845: */
0846: public int getDefaultTransactionIsolation() throws SQLException;
0847:
0848: /**
0849: * Answers the JDBC driver's major version number.
0850: *
0851: * @return the driver's major version number
0852: */
0853: public int getDriverMajorVersion();
0854:
0855: /**
0856: * Answers the JDBC driver's minor version number.
0857: *
0858: * @return the driver's minor version number
0859: */
0860: public int getDriverMinorVersion();
0861:
0862: /**
0863: * Answers the name of this JDBC driver.
0864: *
0865: * @return a String containing the name of the JDBC driver
0866: * @throws SQLException
0867: * a database error occurred
0868: */
0869: public String getDriverName() throws SQLException;
0870:
0871: /**
0872: * Answers the version number of this JDBC driver.
0873: *
0874: * @return a String containing the complete version number of the JDBC
0875: * driver
0876: * @throws SQLException
0877: * a database error occurred
0878: */
0879: public String getDriverVersion() throws SQLException;
0880:
0881: /**
0882: * Answers a list of the foreign key columns that reference the primary key
0883: * columns of a specified table (the foreign keys exported by a table).
0884: * <p>
0885: * The list is returned as a ResultSet with a row for each of the foreign
0886: * key columns, ordered by <code>FKTABLE_CAT</code>,
0887: * <code>FKTABLE_SCHEM</code>, <code>FKTABLE_NAME</code>, and
0888: * <code>KEY_SEQ</code>, with the format for each row being:
0889: * <ol>
0890: * <li><code>PKTABLE_CAT</code> - String - primary key table : Catalog
0891: * (possibly <code>null</code>)</li>
0892: * <li><code>PKTABLE_SCHEM</code> - String - primary key table : Schema
0893: * (possibly <code>null</code>) </li>
0894: * <li><code>PKTABLE_NAME</code> - String - primary key table : name
0895: * </li>
0896: * <li><code>PKCOLUMN_NAME</code> - String - primary key column : name</li>
0897: * <li><code>FKTABLE_CAT</code> - String - foreign key table : Catalog
0898: * name being exported (possibly <code>null</code>)</li>
0899: * <li><code>FKTABLE_SCHEM</code> - String - foreign key table : Schema
0900: * name being exported (possibly <code>null</code>) </li>
0901: * <li><code>FKTABLE_NAME</code> - String - foreign key table : name
0902: * being exported</li>
0903: * <li><code>FKCOLUMN_NAME</code> - String - foreign key column : name
0904: * being exported</li>
0905: * <li>KEY_SEQ - short - sequence number in the foreign key</li>
0906: * <li>UPDATE_RULE - short - how to treat foreign key when primary key is
0907: * updated:
0908: * <ul>
0909: * <li>DatabaseMetaData.importedKeyNoAction - don't allow update of primary
0910: * key if imported</li>
0911: * <li>DatabaseMetaData.importedKeyCascade - change imported key to match
0912: * the primary key update</li>
0913: * <li>DatabaseMetaData.importedKeySetNull - set the imported key to
0914: * <code>null</code></li>
0915: * <li>DatabaseMetaData.importedKeySetDefault - set the imported key to
0916: * default values</li>
0917: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
0918: * </ul>
0919: * </li>
0920: * <li>DELETE_RULE - short - how to treat foreign key when primary key is
0921: * deleted:
0922: * <ul>
0923: * <li>DatabaseMetaData.importedKeyNoAction - don't allow delete of primary
0924: * key if imported</li>
0925: * <li>DatabaseMetaData.importedKeyCascade - the deletion should also
0926: * delete rows that import a deleted key</li>
0927: * <li>DatabaseMetaData.importedKeySetNull - it should set the imported key
0928: * to <code>null</code></li>
0929: * <li>DatabaseMetaData.importedKeySetDefault - deletion sets the imported
0930: * key to default values</li>
0931: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
0932: * </ul>
0933: * </li>
0934: * <li>FK_NAME - String - foreign key name (possibly <code>null</code>)</li>
0935: * <li>PK_NAME - String - primary key name (possibly <code>null</code>)</li>
0936: * <li>DEFERRABILITY - short - defines whether foreign key constraints can
0937: * be deferred until commit (see SQL92 specification for definitions):
0938: * <ul>
0939: * <li>DatabaseMetaData.importedKeyInitiallyDeferred</li>
0940: * <li>DatabaseMetaData.importedKeyInitiallyImmediate</li>
0941: * <li>DatabaseMetaData.importedKeyNotDeferrable</li>
0942: * </ul>
0943: * </li>
0944: * </ol>
0945: *
0946: * @param catalog
0947: * a Catalog Name. <code>null</code> is used to imply no
0948: * narrowing of the search using Catalog Name. Otherwise, the
0949: * name must match a Catalog Name held in the database, with ""
0950: * used to retrieve those without a Catalog Name.
0951: * @param schema
0952: * a Schema Name. <code>null</code> is used to imply no
0953: * narrowing of the search using Schema Name. Otherwise, the name
0954: * must match a Schema name in the database, with "" used to
0955: * retrieve those without a Schema name.
0956: * @param table
0957: * a table name, which must match the name of a table in the
0958: * database
0959: * @return a ResultSet containing a row for each of the foreign key columns,
0960: * as defined above
0961: * @throws SQLException
0962: * a database error occurred
0963: */
0964: public ResultSet getExportedKeys(String catalog, String schema,
0965: String table) throws SQLException;
0966:
0967: /**
0968: * Answers a string of characters that may be used in unquoted identifier
0969: * names. The characters a-z, A-Z, 0-9 and _ are always permitted.
0970: *
0971: * @return a String containing all the extra characters
0972: * @throws SQLException
0973: * a database error occurred
0974: */
0975: public String getExtraNameCharacters() throws SQLException;
0976:
0977: /**
0978: * Answers the string used to quote SQL identifiers. Returns " " (space) if
0979: * identifier quoting not supported.
0980: *
0981: * @return the String used to quote SQL identifiers.
0982: * @throws SQLException
0983: * a database error occurred
0984: */
0985: public String getIdentifierQuoteString() throws SQLException;
0986:
0987: /**
0988: * Answers a list columns in a table that are both primary keys and
0989: * referenced by the table's foreign key columns (that is, the primary keys
0990: * imported by a table).
0991: * <p>
0992: * The list returned is a <code>ResultSet</code> with a row entry for each
0993: * primary key column, ordered by <code>PKTABLE_CAT</code>,
0994: * <code>PKTABLE_SCHEM</code>, <code>PKTABLE_NAME</code>, and
0995: * <code>KEY_SEQ</code>, with the following format:
0996: * <ol>
0997: * <li><code>PKTABLE_CAT</code> - String - primary key Catalog name being
0998: * imported (possibly <code>null</code>)</li>
0999: * <li><code>PKTABLE_SCHEM</code> - String - primary key Schema name
1000: * being imported (possibly <code>null</code>) </li>
1001: * <li><code>PKTABLE_NAME</code> - String - primary key Table name being
1002: * imported </li>
1003: * <li><code>PKCOLUMN_NAME</code> - String - primary key column name
1004: * being imported</li>
1005: * <li><code>FKTABLE_CAT</code> - String - foreign key table catalog name
1006: * (possibly <code>null</code>)</li>
1007: * <li><code>FKTABLE_SCHEM</code> - String - foreign key table Schema
1008: * name (possibly <code>null</code>) </li>
1009: * <li><code>FKTABLE_NAME</code> - String - foreign key table name</li>
1010: * <li><code>FKCOLUMN_NAME</code> - String - foreign key column name</li>
1011: * <li>KEY_SEQ - short - sequence number in the foreign key</li>
1012: * <li>UPDATE_RULE - short - how to treat foreign key when primary key is
1013: * updated:
1014: * <ul>
1015: * <li>DatabaseMetaData.importedKeyNoAction - don't allow update of primary
1016: * key if imported</li>
1017: * <li>DatabaseMetaData.importedKeyCascade - change imported key to match
1018: * the primary key update</li>
1019: * <li>DatabaseMetaData.importedKeySetNull - set the imported key to
1020: * <code>null</code></li>
1021: * <li>DatabaseMetaData.importedKeySetDefault - set the imported key to
1022: * default values</li>
1023: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
1024: * </ul>
1025: * </li>
1026: * <li>DELETE_RULE - short - how to treat foreign key when primary key is
1027: * deleted:
1028: * <ul>
1029: * <li>DatabaseMetaData.importedKeyNoAction - don't allow delete of primary
1030: * key if imported</li>
1031: * <li>DatabaseMetaData.importedKeyCascade - delete those rows that import
1032: * a deleted key</li>
1033: * <li>DatabaseMetaData.importedKeySetNull - set the imported key to
1034: * <code>null</code></li>
1035: * <li>DatabaseMetaData.importedKeySetDefault - set the imported key to
1036: * default values</li>
1037: * <li>DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction</li>
1038: * </ul>
1039: * </li>
1040: * <li>FK_NAME - String - foreign key name (possibly <code>null</code>)</li>
1041: * <li>PK_NAME - String - primary key name (possibly <code>null</code>)</li>
1042: * <li>DEFERRABILITY - short - defines whether foreign key constraints can
1043: * be deferred until commit (see SQL92 specification for definitions):
1044: * <ul>
1045: * <li>DatabaseMetaData.importedKeyInitiallyDeferred</li>
1046: * <li>DatabaseMetaData.importedKeyInitiallyImmediate</li>
1047: * <li>DatabaseMetaData.importedKeyNotDeferrable</li>
1048: * </ul>
1049: * </li>
1050: * </ol>
1051: *
1052: * @param catalog
1053: * a Catalog Name. <code>null</code> is used to imply no
1054: * narrowing of the search using Catalog Name. Otherwise, the
1055: * name must match a Catalog Name held in the database, with ""
1056: * used to retrieve those without a Catalog Name.
1057: * @param schema
1058: * a Schema Name. <code>null</code> is used to imply no
1059: * narrowing of the search using Schema Name. Otherwise, the name
1060: * must match a Schema name in the database, with "" used to
1061: * retrieve those without a Schema name.
1062: * @param table
1063: * a table name, which must match the name of a table in the
1064: * database
1065: * @return a ResultSet containing the list of primary key columns as rows in
1066: * the format defined above.
1067: * @throws SQLException
1068: * a database error occurred
1069: */
1070: public ResultSet getImportedKeys(String catalog, String schema,
1071: String table) throws SQLException;
1072:
1073: /**
1074: * Answers a list of indices and statistics for a specified table.
1075: * <p>
1076: * The list is returned as a ResultSet, with one row for each index or
1077: * statistic. The list is ordered by NON_UNIQUE, TYPE, INDEX_NAME, and
1078: * ORDINAL_POSITION. Each row has the following format:
1079: * <ol>
1080: * <li><code>TABLE_CAT</code> - String - table catalog name (possibly
1081: * <code>null</code>)</li>
1082: * <li><code>TABLE_SCHEM</code> - String - Table Schema name (possibly
1083: * <code>null</code>) </li>
1084: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1085: * <li><code>NON_UNIQUE</code> - boolean - <code>true</code> when index
1086: * values can be non-unique. Must be <code>false</code> when TYPE is
1087: * tableIndexStatistic</li>
1088: * <li><code>INDEX_QUALIFIER</code> - String : index catalog name.
1089: * <code>null</code> when TYPE is 'tableIndexStatistic'</li>
1090: * <li><code>INDEX_NAME</code> - String : index name. <code>null</code>
1091: * when TYPE is 'tableIndexStatistic'</li>
1092: * <li>TYPE - short - the index type. One of:
1093: * <ul>
1094: * <li>DatabaseMetaData.tableIndexStatistic - table statistics returned
1095: * with Index descriptions</li>
1096: * <li>DatabaseMetaData.tableIndexClustered - a clustered Index</li>
1097: * <li>DatabaseMetaData.tableIndexHashed - a hashed Index</li>
1098: * <li>DatabaseMetaData.tableIndexOther - other style of Index</li>
1099: * </ul>
1100: * </li>
1101: * <li>ORDINAL_POSITION - short - column sequence within Index. 0 when TYPE
1102: * is tableIndexStatistic </li>
1103: * <li><code>COLUMN_NAME</code> - String - the column name.
1104: * <code>null</code> when TYPE is tableIndexStatistic</li>
1105: * <li>ASC_OR_DESC - String - column sort sequence. <code>null</code> if
1106: * sequencing not supported or TYPE is tableIndexStatistic; otherwise "A"
1107: * means sort ascending and "D" means sort descending. </li>
1108: * <li>CARDINALITY - int - Number of unique values in the Index. If TYPE is
1109: * tableIndexStatistic, this is number of rows in the table.</li>
1110: * <li>PAGES - int - Number of pages for current Index. If TYPE is
1111: * tableIndexStatistic, this is number of pages used for the table.</li>
1112: * <li>FILTER_CONDITION - String - Filter condition. (possibly null) </li>
1113: * </ol>
1114: *
1115: * @param catalog
1116: * a Catalog Name. null is used to imply no narrowing of the
1117: * search using Catalog Name. Otherwise, the name must match a
1118: * Catalog Name held in the database, with "" used to retrieve
1119: * those without a Catalog Name.
1120: * @param schema
1121: * a Schema Name. null is used to imply no narrowing of the
1122: * search using Schema Name. Otherwise, the name must match a
1123: * Schema name in the database, with "" used to retrieve those
1124: * without a Schema name.
1125: * @param table
1126: * a table name, which must match the name of a table in the
1127: * database
1128: * @param unique
1129: * <code>true</code> means only return indices for unique
1130: * values, <code>false</code> implies that they can be returned
1131: * even if not unique.
1132: * @param approximate
1133: * <code>true</code> implies that the list can contain
1134: * approximate or "out of data" values, <code>false</code>
1135: * implies that all values must be precisely accurate
1136: * @return a ResultSet containing the list of indices and statistics for the
1137: * table, in the format defined above.
1138: * @throws SQLException
1139: * a database error occurred
1140: */
1141: public ResultSet getIndexInfo(String catalog, String schema,
1142: String table, boolean unique, boolean approximate)
1143: throws SQLException;
1144:
1145: /**
1146: * Answers this driver's major JDBC version number.
1147: *
1148: * @return the major JDBC version number
1149: * @throws SQLException
1150: * a database error occurred
1151: */
1152: public int getJDBCMajorVersion() throws SQLException;
1153:
1154: /**
1155: * Answers the minor JDBC version number for this driver.
1156: *
1157: * @return the Minor JDBC Version Number
1158: * @throws SQLException
1159: * a database error occurred
1160: */
1161: public int getJDBCMinorVersion() throws SQLException;
1162:
1163: /**
1164: * Get the maximum number of hex characters in an in-line binary literal for
1165: * this database.
1166: *
1167: * @return the maximum number of hex characters in an in-line binary
1168: * literal. If the number is unlimited then the result is zero.
1169: * @throws SQLException
1170: * a database error occurred
1171: */
1172: public int getMaxBinaryLiteralLength() throws SQLException;
1173:
1174: /**
1175: * Answers the maximum size of a Catalog name in this database.
1176: *
1177: * @return the maximum size in characters for a Catalog name. If the limit
1178: * is unknown, or the value is unlimited, then the result is zero.
1179: * @throws SQLException
1180: * a database error occurred
1181: */
1182: public int getMaxCatalogNameLength() throws SQLException;
1183:
1184: /**
1185: * Answers the maximum size for a character literal in this database.
1186: *
1187: * @return the maximum size in characters for a character literal. If the
1188: * limit is unknown, or the value is unlimited, then the result is
1189: * zero.
1190: * @throws SQLException
1191: * a database error occurred
1192: */
1193: public int getMaxCharLiteralLength() throws SQLException;
1194:
1195: /**
1196: * Answers the maximum size for a Column name for this database.
1197: *
1198: * @return the maximum number of characters for a Column name. If the limit
1199: * is unknown, or the value is unlimited, then the result is zero.
1200: * @throws SQLException
1201: * a database error occurred
1202: */
1203: public int getMaxColumnNameLength() throws SQLException;
1204:
1205: /**
1206: * Get the maximum number of columns in a GROUP BY clause for this database.
1207: *
1208: * @return the maximum number of columns in a GROUP BY clause. If the limit
1209: * is unknown, or the value is unlimited, then the result is zero.
1210: * @throws SQLException
1211: * a database error occurred
1212: */
1213: public int getMaxColumnsInGroupBy() throws SQLException;
1214:
1215: /**
1216: * Answers the maximum number of columns in an Index for this database.
1217: *
1218: * @return the maximum number of columns in an Index. If the limit is
1219: * unknown, or the value is unlimited, then the result is zero.
1220: * @throws SQLException
1221: * a database error occurred
1222: */
1223: public int getMaxColumnsInIndex() throws SQLException;
1224:
1225: /**
1226: * Answers the maximum number of columns in an ORDER BY clause for this
1227: * database.
1228: *
1229: * @return the maximum number of columns in an ORDER BY clause. If the limit
1230: * is unknown, or the value is unlimited, then the result is zero.
1231: * @throws SQLException
1232: * a database error occurred
1233: */
1234: public int getMaxColumnsInOrderBy() throws SQLException;
1235:
1236: /**
1237: * Answers the maximum number of columns in a SELECT list for this database.
1238: *
1239: * @return the maximum number of columns in a SELECT list. If the limit is
1240: * unknown, or the value is unlimited, then the result is zero.
1241: * @throws SQLException
1242: * a database error occurred
1243: */
1244: public int getMaxColumnsInSelect() throws SQLException;
1245:
1246: /**
1247: * Answers the maximum number of columns in a table for this database.
1248: *
1249: * @return the maximum number of columns in a table. If the limit is
1250: * unknown, or the value is unlimited, then the result is zero.
1251: * @throws SQLException
1252: * a database error occurred
1253: */
1254: public int getMaxColumnsInTable() throws SQLException;
1255:
1256: /**
1257: * Answers the database's maximum number of concurrent connections.
1258: *
1259: * @return the maximum number of connections. If the limit is unknown, or
1260: * the value is unlimited, then the result is zero.
1261: * @throws SQLException
1262: * a database error occurred
1263: */
1264: public int getMaxConnections() throws SQLException;
1265:
1266: /**
1267: * Answers the maximum length of a cursor name for this database.
1268: *
1269: * @return the maximum number of characters in a cursor name. If the limit
1270: * is unknown, or the value is unlimited, then the result is zero.
1271: * @throws SQLException
1272: * a database error occurred
1273: */
1274: public int getMaxCursorNameLength() throws SQLException;
1275:
1276: /**
1277: * Answers the maximum length in bytes for an Index for this database. This
1278: * covers all the parts of a composite index.
1279: *
1280: * @return the maximum length in bytes for an Index. If the limit is
1281: * unknown, or the value is unlimited, then the result is zero.
1282: * @throws SQLException
1283: * a database error occurred
1284: */
1285: public int getMaxIndexLength() throws SQLException;
1286:
1287: /**
1288: * Answers the maximum number of characters for a procedure name in this
1289: * database.
1290: *
1291: * @return the maximum number of character for a procedure name. If the
1292: * limit is unknown, or the value is unlimited, then the result is
1293: * zero.
1294: * @throws SQLException
1295: * a database error occurred
1296: */
1297: public int getMaxProcedureNameLength() throws SQLException;
1298:
1299: /**
1300: * Answers the maximum number of bytes within a single row for this
1301: * database.
1302: *
1303: * @return the maximum number of bytes for a single row. If the limit is
1304: * unknown, or the value is unlimited, then the result is zero.
1305: * @throws SQLException
1306: * a database error occurred
1307: */
1308: public int getMaxRowSize() throws SQLException;
1309:
1310: /**
1311: * Answers the maximum number of characters in a schema name for this
1312: * database.
1313: *
1314: * @return the maximum number of characters in a Schema name. If the limit
1315: * is unknown, or the value is unlimited, then the result is zero.
1316: * @throws SQLException
1317: * a database error occurred
1318: */
1319: public int getMaxSchemaNameLength() throws SQLException;
1320:
1321: /**
1322: * Answers the maximum number of characters in an SQL statement for this
1323: * database.
1324: *
1325: * @return the maximum number of characters in an SQL statement. If the
1326: * limit is unknown, or the value is unlimited, then the result is
1327: * zero.
1328: * @throws SQLException
1329: * a database error occurred
1330: */
1331: public int getMaxStatementLength() throws SQLException;
1332:
1333: /**
1334: * Get the maximum number of simultaneously open active statements for this
1335: * database.
1336: *
1337: * @return the maximum number of open active statements. If the limit is
1338: * unknown, or the value is unlimited, then the result is zero.
1339: * @throws SQLException
1340: * a database error occurred
1341: */
1342: public int getMaxStatements() throws SQLException;
1343:
1344: /**
1345: * Answers the maximum size for a table name in the database.
1346: *
1347: * @return the maximum size in characters for a table name. If the limit is
1348: * unknown, or the value is unlimited, then the result is zero.
1349: * @throws SQLException
1350: * a database error occurred
1351: */
1352: public int getMaxTableNameLength() throws SQLException;
1353:
1354: /**
1355: * Answers the maximum number of tables permitted in a SELECT statement for
1356: * the database.
1357: *
1358: * @return the maximum number of tables permitted in a SELECT statement. If
1359: * the limit is unknown, or the value is unlimited, then the result
1360: * is zero.
1361: * @throws SQLException
1362: * a database error occurred
1363: */
1364: public int getMaxTablesInSelect() throws SQLException;
1365:
1366: /**
1367: * Answers the maximum number of characters in a user name for the database.
1368: *
1369: * @return the maximum number of characters in a user name. If the limit is
1370: * unknown, or the value is unlimited, then the result is zero.
1371: * @throws SQLException
1372: * a database error occurred
1373: */
1374: public int getMaxUserNameLength() throws SQLException;
1375:
1376: /**
1377: * Answers a list of the math functions available with this database. These
1378: * are used in the JDBC function escape clause and are the Open Group CLI
1379: * math function names.
1380: *
1381: * @return a String which contains the list of Math functions as a comma
1382: * separated list.
1383: * @throws SQLException
1384: * a database error occurred
1385: */
1386: public String getNumericFunctions() throws SQLException;
1387:
1388: /**
1389: * Answers a list of the primary key columns of a specified table.
1390: * <p>
1391: * The list is returned as a ResultSet with one row for each primary key
1392: * column, ordered by <code>COLUMN_NAME</code>, with each row having the
1393: * structure as follows:
1394: * <ol>
1395: * <li><code>TABLE_CAT</code> - String - table catalog name (possibly
1396: * null)</li>
1397: * <li><code>TABLE_SCHEM</code> - String - Table Schema name (possibly
1398: * null) </li>
1399: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1400: * <li><code>COLUMN_NAME</code> - String - The Column name </li>
1401: * <li><code>KEY_SEQ</code> - short - the sequence number for this column
1402: * in the primary key</li>
1403: * <li><code>PK_NAME</code> - String - the primary key name (possibly
1404: * null)</li>
1405: * </ol>
1406: *
1407: * @param catalog
1408: * a Catalog Name. <code>null</code> is used to imply no
1409: * narrowing of the search using Catalog Name. Otherwise, the
1410: * name must match a Catalog Name held in the database, with the
1411: * empty string used to retrieve those without a Catalog Name.
1412: * @param schema
1413: * a Schema Name. <code>null</code> is used to imply no
1414: * narrowing of the search using Schema Name. Otherwise, the name
1415: * must match a Schema name in the database, with the empty
1416: * string used to retrieve those without a Schema name.
1417: * @param table
1418: * the name of a table, which must match the name of a table in
1419: * the database
1420: * @return a ResultSet containing the list of keys in the format defined
1421: * above
1422: * @throws SQLException
1423: * a database error occurred
1424: */
1425: public ResultSet getPrimaryKeys(String catalog, String schema,
1426: String table) throws SQLException;
1427:
1428: /**
1429: * Answers a list of parameter and result columns for the stored procedures
1430: * belonging to a specified Catalog.
1431: * <p>
1432: * The list is returned as a ResultSet with one row for each parameter or
1433: * result column. The data is ordered by PROCEDURE_SCHEM and PROCEDURE_NAME,
1434: * while for each procedure, the return value (if any) is first, followed by
1435: * the parameters in the order they appear in the stored procedure call,
1436: * followed by ResultSet columns in column number order. Each row has the
1437: * following structure:
1438: * <ol>
1439: * <li>PROCEDURE_CAT - String - the procedure catalog name</li>
1440: * <li>PROCEDURE_SCHEM - String - the procedure schema name (possibly null)
1441: * </li>
1442: * <li>PROCEDURE_NAME - String - the procedure name</li>
1443: * <li><code>COLUMN_NAME</code> - String - the name of the column</li>
1444: * <li>COLUMN_TYPE - short - the kind of column or parameter, as follows:
1445: * <ul>
1446: * <li>DatabaseMetaData.procedureColumnUnknown - type unknown</li>
1447: * <li>DatabaseMetaData.procedureColumnIn - an IN parameter</li>
1448: * <li>DatabaseMetaData.procedureColumnInOut - an INOUT parameter</li>
1449: * <li>DatabaseMetaData.procedureColumnOut - an OUT parameter</li>
1450: * <li>DatabaseMetaData.procedureColumnReturn - a return value</li>
1451: * <li>DatabaseMetaData.procedureReturnsResult - a result column in a
1452: * result set</li>
1453: * </ul>
1454: * </li>
1455: * <li><code>DATA_TYPE</code> - int - the SQL type of the data, as in
1456: * <code>java.sql.Types</code> </li>
1457: * <li><code>TYPE_NAME</code> - String - the SQL type name, for a UDT it
1458: * is fully qualified</li>
1459: * <li>PRECISION - int - the precision</li>
1460: * <li>LENGTH - int - the length of the data in bytes </li>
1461: * <li>SCALE - short - the scale for numeric types</li>
1462: * <li>RADIX - short - the Radix for numeric data (typically 2 or 10) </li>
1463: * <li>NULLABLE - short - can the data contain null:
1464: * <ul>
1465: * <li>DatabaseMetaData.procedureNoNulls - <code>NULL</code>s not
1466: * permitted</li>
1467: * <li>DatabaseMetaData.procedureNullable - <code>NULL</code>s are
1468: * permitted </li>
1469: * <li>DatabaseMetaData.procedureNullableUnknown - <code>NULL</code>
1470: * status unknown </li>
1471: * </ul>
1472: * </li>
1473: * <li><code>REMARKS</code> - String - an explanatory comment about the
1474: * data item </li>
1475: * </ol>
1476: *
1477: * @param catalog
1478: * a Catalog Name. null is used to imply no narrowing of the
1479: * search using Catalog Name. Otherwise, the name must match a
1480: * Catalog Name held in the database, with "" used to retrieve
1481: * those without a Catalog Name.
1482: * @param schemaPattern
1483: * a Schema Name Pattern. null is used to imply no narrowing of
1484: * the search using Schema Name. Otherwise, the name must match a
1485: * Schema name in the database, with "" used to retrieve those
1486: * without a Schema name.
1487: * @param procedureNamePattern
1488: * a pattern that must match the name of the procedure stored in
1489: * the database
1490: * @param columnNamePattern
1491: * a column name pattern. The name must match the column name
1492: * stored in the database.
1493: * @return a ResultSet with the list of parameter and result columns in the
1494: * format defined above
1495: * @throws SQLException
1496: * a database error occurred
1497: */
1498: public ResultSet getProcedureColumns(String catalog,
1499: String schemaPattern, String procedureNamePattern,
1500: String columnNamePattern) throws SQLException;
1501:
1502: /**
1503: * Answers a list of the stored procedures available in a specified catalog.
1504: * <p>
1505: * The list is returned as a ResultSet with one row for each stored
1506: * procedure, ordered by PROCEDURE_SCHEME and PROCEDURE_NAME, with the data
1507: * in each row as follows:
1508: * <ol>
1509: * <li><code>PROCEDURE_CAT</code> - String : the procedure catalog name</li>
1510: * <li><code>PROCEDURE_SCHEM</code> - String : the procedure schema name
1511: * (possibly <code>null</code>) </li>
1512: * <li><code>PROCEDURE_NAME</code> - String : the procedure name</li>
1513: * <li><code>Reserved</code></li>
1514: * <li><code>Reserved</code></li>
1515: * <li><code>Reserved</code></li>
1516: * <li><code>REMARKS</code> - String - information about the procedure</li>
1517: * <li><code>PROCEDURE_TYPE</code> - short : one of:
1518: * <ul>
1519: * <li>DatabaseMetaData.procedureResultUnknown - procedure may return a
1520: * result </li>
1521: * <li>DatabaseMetaData.procedureNoResult - procedure does not return a
1522: * result</li>
1523: * <li>DatabaseMetaData.procedureReturnsResult - procedure definitely
1524: * returns a result</li>
1525: * </ul>
1526: * </li>
1527: * </ol>
1528: *
1529: * @param catalog
1530: * a Catalog Name. null is used to imply no narrowing of the
1531: * search using Catalog Name. Otherwise, the name must match a
1532: * Catalog Name held in the database, with "" used to retrieve
1533: * those without a Catalog Name.
1534: * @param schemaPattern
1535: * a Schema Name Pattern. null is used to imply no narrowing of
1536: * the search using Schema Name. Otherwise, the name must match a
1537: * Schema name in the database, with "" used to retrieve those
1538: * without a Schema name.
1539: * @param procedureNamePattern
1540: * a procedure name pattern, which must match the procedure name
1541: * stored in the database
1542: * @return a ResultSet where each row is a description of a stored procedure
1543: * in the format defined above.
1544: * @throws SQLException
1545: * a database error occurred
1546: */
1547: public ResultSet getProcedures(String catalog,
1548: String schemaPattern, String procedureNamePattern)
1549: throws SQLException;
1550:
1551: /**
1552: * Answers the database vendor's preferred name for "procedure".
1553: *
1554: * @return a String with the vendor's preferred name for "procedure"
1555: * @throws SQLException
1556: * a database error occurred
1557: */
1558: public String getProcedureTerm() throws SQLException;
1559:
1560: /**
1561: * Answers the result set's default hold-ability.
1562: *
1563: * @return one of <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
1564: * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
1565: * @throws SQLException
1566: * a database error occurred
1567: */
1568: public int getResultSetHoldability() throws SQLException;
1569:
1570: /**
1571: * Answers a list of the schema names in the database. The list is returned
1572: * as a ResultSet, ordered by the Schema name, with one row per Schema in
1573: * the following format:
1574: * <ol>
1575: * <li><code>TABLE_SCHEM</code> - String - the Schema name</li>
1576: * <li><code>TABLE_CAT</code>ALOG - String - the Catalog name (possibly
1577: * null) </li>
1578: * </ol>
1579: *
1580: * @return a ResultSet with one row for each schema in the format defined
1581: * above.
1582: * @throws SQLException
1583: * a database error occurred
1584: */
1585: public ResultSet getSchemas() throws SQLException;
1586:
1587: /**
1588: * Answers the database vendor's preferred term for "schema".
1589: *
1590: * @return a String which is the vendor's preferred term for schema
1591: * @throws SQLException
1592: * a database error occurred
1593: */
1594: public String getSchemaTerm() throws SQLException;
1595:
1596: /**
1597: * Returns the string that is used to escape wildcard characters. This
1598: * string is used to escape the '_' and '%' wildcard characters in catalog
1599: * search strings which are a pattern and so which use the wildcard
1600: * characters. '_' is used to represent any single character wile '%' is
1601: * used for a sequence of zero or more characters.
1602: *
1603: * @return a String used to escape the wildcard characters
1604: * @throws SQLException
1605: * a database error occurred
1606: */
1607: public String getSearchStringEscape() throws SQLException;
1608:
1609: /**
1610: * Answers a list of all the SQL keywords that are NOT also SQL92 keywords
1611: * for the database.
1612: *
1613: * @return a String containing the list of SQL keywords in a comma separated
1614: * format.
1615: * @throws SQLException
1616: * a database error occurred
1617: */
1618: public String getSQLKeywords() throws SQLException;
1619:
1620: /**
1621: * States the type of SQLState value returned by SQLException.getSQLState.
1622: * This can either be the X/Open (now known as Open Group) SQL CLI form or
1623: * the SQL99 form.
1624: *
1625: * @return an integer, which is either DatabaseMetaData.sqlStateSQL99 or
1626: * DatabaseMetaData.sqlStateXOpen.
1627: * @throws SQLException
1628: * a database error occurred
1629: */
1630: public int getSQLStateType() throws SQLException;
1631:
1632: /**
1633: * Answers a list of string functions available with the database. These
1634: * functions are used in JDBC function escape clause and follow the Open
1635: * Group CLI string function names definition.
1636: *
1637: * @return a String containing the list of string functions in comma
1638: * separated format.
1639: * @throws SQLException
1640: * a database error occurred
1641: */
1642: public String getStringFunctions() throws SQLException;
1643:
1644: /**
1645: * Answers a listing of the hierarchies of tables in a specified schema in
1646: * the database.
1647: * <p>
1648: * The listing only contains entries for tables that have a super table.
1649: * Super and sub tables must be defined in the same Catalog and Schema. The
1650: * list is returned as a ResultSet, with one row for each table that has a
1651: * super table, in the following format:
1652: * <ol>
1653: * <li><code>TABLE_CAT</code> - String - table catalog name (possibly
1654: * null)</li>
1655: * <li><code>TABLE_SCHEM</code> - String - Table Schema name (possibly
1656: * null) </li>
1657: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1658: * <li>SUPER<code>TABLE_NAME</code> - String - The Super Table name
1659: * </li>
1660: * </ol>
1661: *
1662: * @param catalog
1663: * a Catalog Name. null is used to imply no narrowing of the
1664: * search using Catalog Name. Otherwise, the name must match a
1665: * Catalog Name held in the database, with "" used to retrieve
1666: * those without a Catalog Name.
1667: * @param schemaPattern
1668: * a Schema Name Pattern. null is used to imply no narrowing of
1669: * the search using Schema Name. Otherwise, the name must match a
1670: * Schema name in the database, with "" used to retrieve those
1671: * without a Schema name.
1672: * @param tableNamePattern
1673: * a Table Name, which should match the Table name as stored in
1674: * the database. it may be a fully qualified name. If it is fully
1675: * qualified the Catalog Name and Schema Name parameters are
1676: * ignored.
1677: * @return a ResultSet with one row for each table which has a super table,
1678: * in the format defined above. An empty ResultSet is returned if
1679: * the database does not support table hierarchies.
1680: * @throws SQLException
1681: * a database error occurred
1682: */
1683: public ResultSet getSuperTables(String catalog,
1684: String schemaPattern, String tableNamePattern)
1685: throws SQLException;
1686:
1687: /**
1688: * Answers the User Defined Type (UDT) hierarchies for a given schema. Only
1689: * the immediate parent/child relationship is described. If a UDT does not
1690: * have a direct supertype, it is not listed.
1691: * <p>
1692: * The listing is returned as a ResultSet where there is one row for a
1693: * specific UDT which describes its supertype, with the data organized in
1694: * columns as follows:
1695: * <ol>
1696: * <li><code>TYPE_CAT</code> - String - the UDT Catalog name (possibly
1697: * null)</li>
1698: * <li><code>TYPE_SCHEM</code> - String - the UDT Schema name (possibly
1699: * null) </li>
1700: * <li><code>TYPE_NAME</code> - String - the UDT type name </li>
1701: * <li>SUPER<code>TYPE_CAT</code> - String - direct supertype's Catalog
1702: * name (possibly null)</li>
1703: * <li>SUPER<code>TYPE_SCHEM</code> - String - direct supertype's Schema
1704: * name (possibly null) </li>
1705: * <li>SUPER<code>TYPE_NAME</code> - String - direct supertype's name
1706: * </li>
1707: * </ol>
1708: *
1709: * @param catalog
1710: * the Catalog name. "" means get the UDTs without a catalog.
1711: * null means don't use the catalog name to restrict the search.
1712: * @param schemaPattern
1713: * the Schema pattern name. "" means get the UDT's without a
1714: * schema.
1715: * @param typeNamePattern
1716: * the UDT name pattern. This may be a fully qualified name. When
1717: * a fully qualified name is specified, the Catalog name and
1718: * Schema name parameters are ignored.
1719: * @return a ResultSet in which each row gives information about a
1720: * particular UDT in the format defined above. An empty ResultSet is
1721: * returned for a database that does not support type hierarchies.
1722: * @throws SQLException
1723: * a database error occurred
1724: */
1725: public ResultSet getSuperTypes(String catalog,
1726: String schemaPattern, String typeNamePattern)
1727: throws SQLException;
1728:
1729: /**
1730: * Answers a list of system functions available with the database. These are
1731: * names used in the JDBC function escape clause and are Open Group CLI
1732: * function names.
1733: *
1734: * @return a String containing the list of system functions in a comma
1735: * separated format
1736: * @throws SQLException
1737: * a database error occurred
1738: */
1739: public String getSystemFunctions() throws SQLException;
1740:
1741: /**
1742: * Answers a description of access rights for each table present in a
1743: * catalog. Table privileges can apply to one or more columns in the table -
1744: * but are not guaranteed to apply to all columns.
1745: * <p>
1746: * The privileges are returned as a ResultSet, with one row for each
1747: * privilege, ordered by <code>TABLE_SCHEM</code>,
1748: * <code>TABLE_NAME</code>, PRIVILEGE, and each row has data as defined
1749: * in the following column definitions:
1750: * <ol>
1751: * <li><code>TABLE_CAT</code> - String - table catalog name (possibly
1752: * null)</li>
1753: * <li><code>TABLE_SCHEM</code> - String - Table Schema name (possibly
1754: * null) </li>
1755: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1756: * <li>GRANTOR - String - who granted the access</li>
1757: * <li>GRANTEE - String - who received the access grant </li>
1758: * <li>PRIVILEGE - String - the type of access granted - one of SELECT,
1759: * INSERT, UPDATE, REFERENCES,... </li>
1760: * <li>IS_GRANTABLE - String - "YES" implies the grantee can grant access
1761: * to others, "NO" implies guarantee cannot grant access to others, null
1762: * means this status is unknown</li>
1763: * </ol>
1764: *
1765: * @param catalog
1766: * a Catalog Name. null is used to imply no narrowing of the
1767: * search using Catalog Name. Otherwise, the name must match a
1768: * Catalog Name held in the database, with "" used to retrieve
1769: * those without a Catalog Name.
1770: * @param schemaPattern
1771: * a Schema Name Pattern. null is used to imply no narrowing of
1772: * the search using Schema Name. Otherwise, the name must match a
1773: * Schema name in the database, with "" used to retrieve those
1774: * without a Schema name.
1775: * @param tableNamePattern
1776: * a Table Name, which should match the Table name as stored in
1777: * the database.
1778: * @return a ResultSet containing a list with one row for each table in the
1779: * format defined above.
1780: * @throws SQLException
1781: * a database error occurred
1782: */
1783: public ResultSet getTablePrivileges(String catalog,
1784: String schemaPattern, String tableNamePattern)
1785: throws SQLException;
1786:
1787: /**
1788: * Answers a description of the tables in a specified catalog.
1789: * <p>
1790: * The descriptions are returned as rows in a ResultSet, one row for each
1791: * Table. The ResultSet is ordered by <code>TABLE_TYPE</code>,
1792: * <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>. Each row in
1793: * the ResultSet consists of a series of columns as follows:
1794: * <ol>
1795: * <li><code>TABLE_CAT</code> - String - table catalog name (possibly
1796: * null)</li>
1797: * <li><code>TABLE_SCHEM</code> - String - Table Schema name (possibly
1798: * null) </li>
1799: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1800: * <li><code>TABLE_TYPE</code> - String - Typical names include "TABLE",
1801: * "VIEW", "SYSTEM TABLE", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY"</li>
1802: * <li><code>REMARKS</code> - String - A comment describing the table
1803: * </li>
1804: * <li><code>TYPE_CAT</code> - String - the 'Types' catalog(possibly
1805: * null)</li>
1806: * <li><code>TYPE_SCHEM</code> - String - the 'Types' schema(possibly
1807: * null) </li>
1808: * <li><code>TYPE_NAME</code> - String - the 'Types' name (possibly null)
1809: * </li>
1810: * <li><code>SELF_REFERENCING_COL_NAME</code> - String - the name of a
1811: * designated identifier column in a typed table (possibly null) </li>
1812: * <li>REF_GENERATION - String - one of the following values : "SYSTEM" |
1813: * "USER" | "DERIVED" - specifies how values in the
1814: * <code>SELF_REFERENCING_COL_NAME</code> are created (possibly null)
1815: * </li>
1816: * </ol>
1817: *
1818: * @param catalog
1819: * a Catalog Name. null is used to imply no narrowing of the
1820: * search using Catalog Name. Otherwise, the name must match a
1821: * Catalog Name held in the database, with "" used to retrieve
1822: * those without a Catalog Name.
1823: * @param schemaPattern
1824: * a Schema Name Pattern. null is used to imply no narrowing of
1825: * the search using Schema Name. Otherwise, the name must match a
1826: * Schema name in the database, with "" used to retrieve those
1827: * without a Schema name.
1828: * @param tableNamePattern
1829: * a Table Name, which should match the Table name as stored in
1830: * the database.
1831: * @param types
1832: * a list of table types to include in the list. null implies
1833: * list all types.
1834: * @return a ResultSet with one row per table in the format defined above.
1835: * @throws SQLException
1836: * a database error occurred
1837: */
1838: public ResultSet getTables(String catalog, String schemaPattern,
1839: String tableNamePattern, String[] types)
1840: throws SQLException;
1841:
1842: /**
1843: * Answers a list of table types supported by the database.
1844: * <p>
1845: * The list is returned as a ResultSet with one row per table type, ordered
1846: * by the table type. The information in the ResultSet is structured into a
1847: * single column per row, as follows:
1848: * <ol>
1849: * <li><code>TABLE_TYPE</code> - String - the Table Type. Typical names
1850: * include "TABLE", "VIEW", "SYSTEM TABLE", "ALIAS", "SYNONYM", "GLOBAL
1851: * TEMPORARY" </li>
1852: * </ol>
1853: *
1854: * @return a ResultSet with one row per table type in the format defined
1855: * above.
1856: * @throws SQLException
1857: * a database error occurred
1858: */
1859: public ResultSet getTableTypes() throws SQLException;
1860:
1861: /**
1862: * Answers a list of time and date functions available for the database.
1863: *
1864: * @return a String contain a comma separated list of the time and date
1865: * functions.
1866: * @throws SQLException
1867: * a database error occurred
1868: */
1869: public String getTimeDateFunctions() throws SQLException;
1870:
1871: /**
1872: * Get a list of the standard SQL Types supported by this database. The list
1873: * is returned as a ResultSet, with one row for each type, ordered by the
1874: * <code>DATA_TYPE</code> value, where the data in each row is structured
1875: * into the following columns:
1876: * <ol>
1877: * <li><code>TYPE_NAMR</code> - String : the Type name</li>
1878: * <li><code>DATA_TYPE</code> - int : the SQL data type value as defined
1879: * in <code>java.sql.Types</code></li>
1880: * <li><code>PRECISION</code> - int - the maximum precision of the type</li>
1881: * <li><code>LITERAL_PREFIX</code> - String : the prefix to be used when
1882: * quoting a literal value (possibly <code>null</code>)</li>
1883: * <li><code>LITERAL_SUFFIX</code> - String : the suffix to be used when
1884: * quoting a literal value (possibly <code>null</code>)</li>
1885: * <li><code>CREATE_PARAMS</code> - String : params used when creating
1886: * the type (possibly <code>null</code>)</li>
1887: * <li><code>NULLABLE</code> - short : shows if the value is null-able:
1888: * <ul>
1889: * <li>DatabaseMetaData.typeNoNulls : <code>NULL</code>s not permitted</li>
1890: * <li>DatabaseMetaData.typeNullable : <code>NULL</code>s are permitted
1891: * </li>
1892: * <li>DatabaseMetaData.typeNullableUnknown : <code>NULL</code> status
1893: * unknown </li>
1894: * </ul>
1895: * </li>
1896: * <li>CASE_SENSITIVE - boolean : true if the type is case sensitive</li>
1897: * <li>SEARCHABLE - short : how this type can be used with WHERE clauses:
1898: * <ul>
1899: * <li>DatabaseMetaData.typePredNone - cannot be used </li>
1900: * <li>DatabaseMetaData.typePredChar - support for WHERE...LIKE only</li>
1901: * <li>DatabaseMetaData.typePredBasic - support except for WHERE...LIKE</li>
1902: * <li>DatabaseMetaData.typeSearchable - support for all WHERE clauses</li>
1903: * </ul>
1904: * </li>
1905: * <li>UNSIGNED_ATTRIBUTE - boolean - the type is unsigned or not </li>
1906: * <li>FIXED_PREC_SCALE - boolean - fixed precision = it can be used as a
1907: * money value </li>
1908: * <li>AUTO_INCREMENT - boolean - can be used as an auto-increment value
1909: * </li>
1910: * <li>LOCAL_<code>TYPE_NAME</code> - String - a localized version of
1911: * the type name (possibly null)</li>
1912: * <li>MINIMUM_SCALE - short - the minimum scale supported </li>
1913: * <li>MAXIMUM_SCALE - short - the maximum scale supported </li>
1914: * <li>SQL_<code>DATA_TYPE</code> - int - not used </li>
1915: * <li>SQL_DATETIME_SUB - int - not used </li>
1916: * <li>NUM_PREC_RADIX - int - number radix (typically 2 or 10) </li>
1917: * </ol>
1918: *
1919: * @return a ResultSet which is structured as described above
1920: * @throws SQLException
1921: * a database error occurred
1922: */
1923: public ResultSet getTypeInfo() throws SQLException;
1924:
1925: /**
1926: * Answers a description of the User Defined Types (UDTs) defined in a given
1927: * schema, which includes the types DISTINCT, STRUCT and JAVA_OBJECT.
1928: * <p>
1929: * The types matching the supplied the specified Catalog, Schema, Type Name
1930: * and Type are returned as rows in a ResultSet with columns of information
1931: * as follows:
1932: * <ol>
1933: * <li><code>TABLE_CAT</code> - String - Catalog name (possibly null)</li>
1934: * <li><code>TABLE_SCHEM</code> - String - Schema name (possibly null)
1935: * </li>
1936: * <li><code>TABLE_NAME</code> - String - The Table name </li>
1937: * <li><code>CLASS_NAME</code> - String - The Java class name</li>
1938: * <li><code>DATA_TYPE</code> - int - The SQL type as specified in
1939: * <code>java.sql.Types</code>. One of DISTINCT, STRUCT and JAVA_OBJECT</li>
1940: * <li><code>REMARKS</code> - String - A comment which describes the type
1941: * </li>
1942: * <li><code>BASE_TYPE</code> - short - A type code. For a DISTINCT type,
1943: * the source type. For a structured type this is the type that implements
1944: * the user generated reference type of the
1945: * <code>SELF_REFERENCING_COLUMN</code>. This is defined in
1946: * <code>java.sql.Types</code>, and will be <code>null</code> if the
1947: * <code>DATA_TYPE</code> does not match these criteria.</li>
1948: * </ol>
1949: * If the driver does not support UDTs, the ResultSet will be empty.
1950: *
1951: * @param catalog
1952: * a Catalog Name. null is used to imply no narrowing of the
1953: * search using Catalog Name. Otherwise, the name must match a
1954: * Catalog Name held in the database, with "" used to retrieve
1955: * those without a Catalog Name.
1956: * @param schemaPattern
1957: * a Schema Name Pattern. <code>null</code> is used to imply no
1958: * narrowing of the search using Schema Name. Otherwise, the name
1959: * must match a Schema name in the database, with "" used to
1960: * retrieve those without a Schema name.
1961: * @param typeNamePattern
1962: * a Type Name, which should match a Type name as stored in the
1963: * database. It may be fully qualified.
1964: * @param types
1965: * a list of the UDT types to include in the list - one of
1966: * DISTINCT, STRUCT or JAVA_OBJECT.
1967: * @return a ResultSet in the format described above
1968: * @throws SQLException
1969: * a database error occurred
1970: */
1971: public ResultSet getUDTs(String catalog, String schemaPattern,
1972: String typeNamePattern, int[] types) throws SQLException;
1973:
1974: /**
1975: * Answers the URL for this database.
1976: *
1977: * @return the URL for the database. <code>null</code> if it cannot be
1978: * generated.
1979: * @throws SQLException
1980: * a database error occurred
1981: */
1982: public String getURL() throws SQLException;
1983:
1984: /**
1985: * Determine the user name as known by the database.
1986: *
1987: * @return the user name
1988: * @throws SQLException
1989: * a database error occurred
1990: */
1991: public String getUserName() throws SQLException;
1992:
1993: /**
1994: * Answers which of a table's columns are automatically updated when any
1995: * value in a row is updated.
1996: * <p>
1997: * The result is laid-out in the following columns:
1998: * <ol>
1999: * <li><code>SCOPE</code> - short - not used </li>
2000: * <li><code>COLUMN_NAME</code> - String - Column name</li>
2001: * <li><code>DATA_TYPE</code> - int - The SQL data type, as defined in
2002: * <code>java.sql.Types</code> </li>
2003: * <li><code>TYPE_NAME</code> - String - The SQL type name, data source
2004: * dependent </li>
2005: * <li><code>COLUMN_SIZE</code> - int - Precision for numeric types </li>
2006: * <li><code>BUFFER_LENGTH</code> - int - Length of a column value in
2007: * bytes </li>
2008: * <li><code>DECIMAL_DIGITS</code> - short - Number of digits after the
2009: * decimal point </li>
2010: * <li><code>PSEUDO_COLUMN</code> - short - If this is a pseudo-column
2011: * (for example, an Oracle ROWID):
2012: * <ul>
2013: * <li>DatabaseMetaData.bestRowUnknown - don't know whether this is a
2014: * pseudo column</li>
2015: * <li>DatabaseMetaData.bestRowNotPseudo - column is not pseudo</li>
2016: * <li>DatabaseMetaData.bestRowPseudo - column is a pseudo column</li>
2017: * </ul>
2018: * </li>
2019: * </ol>
2020: *
2021: * @param catalog
2022: * a Catalog Name. <code>null</code> is used to imply no
2023: * narrowing of the search using Catalog Name. Otherwise, the
2024: * name must match a Catalog Name held in the database, with ""
2025: * used to retrieve those without a Catalog Name.
2026: * @param schema
2027: * a Schema Name Pattern. <code>null</code> is used to imply no
2028: * narrowing of the search using Schema Name. Otherwise, the name
2029: * must match a Schema name in the database, with "" used to
2030: * retrieve those without a Schema name.
2031: * @param table
2032: * a table name. It must match the name of a table in the
2033: * database.
2034: * @return a ResultSet containing the descriptions, one row for each column,
2035: * in the format defined above.
2036: * @throws SQLException
2037: * a database error occurred
2038: */
2039: public ResultSet getVersionColumns(String catalog, String schema,
2040: String table) throws SQLException;
2041:
2042: /**
2043: * Determine if a visible row insert can be detected by calling
2044: * ResultSet.rowInserted.
2045: *
2046: * @param type
2047: * the ResultSet type. This may be one of
2048: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> or
2049: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code> or
2050: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2051: * @return <code>true</code> if ResultSet.rowInserted detects a visible
2052: * row insert otherwise <code>false</code>.
2053: * @throws SQLException
2054: * a database error occurred
2055: */
2056: public boolean insertsAreDetected(int type) throws SQLException;
2057:
2058: /**
2059: * Determine whether a fully qualified table name is prefixed or suffixed to
2060: * a fully qualified table name.
2061: *
2062: * @return <code>true</code> if the catalog appears at the start of a
2063: * fully qualified table name, <code>false</code> otherwise.
2064: * @throws SQLException
2065: * a database error occurred
2066: */
2067: public boolean isCatalogAtStart() throws SQLException;
2068:
2069: /**
2070: * Determine if the database is in read-only mode.
2071: *
2072: * @return <code>true</code> if the database is in read-only mode,
2073: * <code>false</code> otherwise.
2074: * @throws SQLException
2075: * a database error occurred
2076: */
2077: public boolean isReadOnly() throws SQLException;
2078:
2079: /**
2080: * Determine if updates are made to a copy of, or directly on, Large Objects
2081: * (LOBs).
2082: *
2083: * @return <code>true</code> if updates are made to a copy of the Large
2084: * Object, <code>false</code> otherwise
2085: * @throws SQLException
2086: * a database error occurred
2087: */
2088: public boolean locatorsUpdateCopy() throws SQLException;
2089:
2090: /**
2091: * Determine if the database handles concatenations between
2092: * <code>NULL</code> and non-<code>NULL</code> values by producing a
2093: * <code>NULL</code> output.
2094: *
2095: * @return <code>true</code> if <code>NULL</code> to non-<code>NULL</code>
2096: * concatenations produce a <code>NULL</code> result,
2097: * <code>false</code> otherwise.
2098: * @throws SQLException
2099: * a database error occurred
2100: */
2101: public boolean nullPlusNonNullIsNull() throws SQLException;
2102:
2103: /**
2104: * Determine if <code>NULL</code> values are always sorted to the end of
2105: * sorted results regardless of requested sort order. This means that they
2106: * will appear at the end of sorted lists whatever other non-<code>NULL</code>
2107: * values may be present.
2108: *
2109: * @return <code>true</code> if <code>NULL</code> values are sorted at
2110: * the end, <code>false</code> otherwise
2111: * @throws SQLException
2112: * a database error occurred
2113: */
2114: public boolean nullsAreSortedAtEnd() throws SQLException;
2115:
2116: /**
2117: * Determine if <code>NULL</code> values are always sorted at the start of
2118: * the sorted list, irrespective of the sort order. This means that they
2119: * appear at the start of sorted lists, whatever other values may be
2120: * present.
2121: *
2122: * @return <code>true</code> if <code>NULL</code> values are sorted at
2123: * the start, <code>false</code> otherwise
2124: * @throws SQLException
2125: * a database error occurred
2126: */
2127: public boolean nullsAreSortedAtStart() throws SQLException;
2128:
2129: /**
2130: * Determine if <code>NULL</code> values are sorted high - i.e. they are
2131: * sorted as if they are higher than any other values.
2132: *
2133: * @return <code>true</code> if <code>NULL</code> values are sorted
2134: * high, <code>false</code> otherwise.
2135: * @throws SQLException
2136: * a database error occurred
2137: */
2138: public boolean nullsAreSortedHigh() throws SQLException;
2139:
2140: /**
2141: * Determine if <code>NULL</code> values are sorted low - ie they are
2142: * sorted as if they are lower than any other values.
2143: *
2144: * @return <code>true</code> if <code>NULL</code> values are sorted low,
2145: * <code>false</code> otherwise.
2146: * @throws SQLException
2147: * a database error occurred
2148: */
2149: public boolean nullsAreSortedLow() throws SQLException;
2150:
2151: /**
2152: * Determine if deletes made by others are visible, for a specified
2153: * ResultSet type.
2154: *
2155: * @param type
2156: * the type of the ResultSet. It may be either
2157: * <code>ResultSet.TYPE_FORWARD_ONLY</code> or
2158: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2159: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>)
2160: * @return <code>true</code> if others' deletes are visible,
2161: * <code>false</code> otherwise.
2162: * @throws SQLException
2163: * a database error occurred
2164: */
2165: public boolean othersDeletesAreVisible(int type)
2166: throws SQLException;
2167:
2168: /**
2169: * Determine if inserts made by others are visible, for a specified
2170: * ResultSet type.
2171: *
2172: * @param type
2173: * the type of the ResultSet. May be
2174: * <code>ResultSet.TYPE_FORWARD_ONLY</code>, or
2175: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2176: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2177: * @return <code>true</code> if others' inserts are visible otherwise
2178: * <code>false</code>.
2179: * @throws SQLException
2180: * a database error occurred
2181: */
2182: public boolean othersInsertsAreVisible(int type)
2183: throws SQLException;
2184:
2185: /**
2186: * Determine if updates made by others are visible, for a specified
2187: * ResultSet type.
2188: *
2189: * @param type
2190: * the type of the ResultSet. May be
2191: * <code>ResultSet.TYPE_FORWARD_ONLY</code>, or
2192: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2193: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2194: * @return <code>true</code> if others' inserts are visible otherwise
2195: * <code>false</code>.
2196: * @throws SQLException
2197: * a database error occurred
2198: */
2199: public boolean othersUpdatesAreVisible(int type)
2200: throws SQLException;
2201:
2202: /**
2203: * Determine if a ResultSet's own deletes are visible, for a specified
2204: * ResultSet type.
2205: *
2206: * @param type
2207: * the type of the ResultSet:
2208: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2209: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2210: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2211: * @return <code>true</code> if the delete's are seen by the own ResultSet
2212: * otherwise <code>false</code>.
2213: * @throws SQLException
2214: * a database error occurred
2215: */
2216: public boolean ownDeletesAreVisible(int type) throws SQLException;
2217:
2218: /**
2219: * Determine if its own inserts are visible to a given ResultSet type.
2220: *
2221: * @param type
2222: * the type of the ResultSet:
2223: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2224: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2225: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2226: * @return <code>true</code> if inserts are visible for this type
2227: * <code>false</code> otherwise.
2228: * @throws SQLException
2229: * a database error occurred
2230: */
2231: public boolean ownInsertsAreVisible(int type) throws SQLException;
2232:
2233: /**
2234: * Determine if for a supplied type of ResultSet, the ResultSet's own
2235: * updates are visible.
2236: *
2237: * @param type
2238: * the type of the ResultSet:
2239: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2240: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2241: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2242: * @return <code>true</code> if updates are visible to in this ResultSet
2243: * type otherwise <code>false</code>.
2244: * @throws SQLException
2245: * a database error occurred
2246: */
2247: public boolean ownUpdatesAreVisible(int type) throws SQLException;
2248:
2249: /**
2250: * Determine whether the database treats SQL identifiers that are in mixed
2251: * case (and unquoted) as case insensitive. If true then the database stores
2252: * them in lower case.
2253: *
2254: * @return <code>true</code> if unquoted SQL identifiers are stored in
2255: * lower case, <code>false</code> otherwise.
2256: * @throws SQLException
2257: * a database error occurred
2258: */
2259: public boolean storesLowerCaseIdentifiers() throws SQLException;
2260:
2261: /**
2262: * Determine whether the database considers mixed case quoted SQL
2263: * identifiers as case insensitive and stores them in lower case.
2264: *
2265: * @return <code>true</code> if quoted SQL identifiers are stored in lower
2266: * case, <code>false</code> otherwise.
2267: * @throws SQLException
2268: * a database error occurred
2269: */
2270: public boolean storesLowerCaseQuotedIdentifiers()
2271: throws SQLException;
2272:
2273: /**
2274: * Determine whether the database considers mixed case unquoted SQL
2275: * identifiers as case insensitive and stores them in mixed case.
2276: *
2277: * @return <code>true</code> if unquoted SQL identifiers as stored in
2278: * mixed case, <code>false</code> otherwise.
2279: * @throws SQLException
2280: * a database error occurred
2281: */
2282: public boolean storesMixedCaseIdentifiers() throws SQLException;
2283:
2284: /**
2285: * Determine whether the database considers identifiers as case insensitive
2286: * if they are mixed case quoted SQL. The database stores them in mixed
2287: * case.
2288: *
2289: * @return <code>true</code> if quoted SQL identifiers are stored in mixed
2290: * case, <code>false</code> otherwise.
2291: * @throws SQLException
2292: * a database error occurred
2293: */
2294: public boolean storesMixedCaseQuotedIdentifiers()
2295: throws SQLException;
2296:
2297: /**
2298: * Determine whether the database considers mixed case unquoted SQL
2299: * identifiers as case insensitive and stores them in upper case.
2300: *
2301: * @return <code>true</code> if unquoted SQL identifiers are stored in
2302: * upper case, <code>false</code> otherwise.
2303: * @throws SQLException
2304: * a database error occurred
2305: */
2306: public boolean storesUpperCaseIdentifiers() throws SQLException;
2307:
2308: /**
2309: * Determine whether the database considers mixed case quoted SQL
2310: * identifiers as case insensitive and stores them in upper case.
2311: *
2312: * @return <code>true</code> if quoted SQL identifiers are stored in upper
2313: * case, <code>false</code> otherwise.
2314: * @throws SQLException
2315: * a database error occurred
2316: */
2317: public boolean storesUpperCaseQuotedIdentifiers()
2318: throws SQLException;
2319:
2320: /**
2321: * Determine if the database supports ALTER TABLE operation with add column.
2322: *
2323: * @return <code>true</code> if ALTER TABLE with add column is supported,
2324: * <code>false</code> otherwise.
2325: * @throws SQLException
2326: * a database error occurred
2327: */
2328: public boolean supportsAlterTableWithAddColumn()
2329: throws SQLException;
2330:
2331: /**
2332: * Determine if the database supports ALTER TABLE operation with drop
2333: * column.
2334: *
2335: * @return <code>true</code> if ALTER TABLE with drop column is supported,
2336: * <code>false</code> otherwise.
2337: * @throws SQLException
2338: * a database error occurred
2339: */
2340: public boolean supportsAlterTableWithDropColumn()
2341: throws SQLException;
2342:
2343: /**
2344: * Determine if the database supports the ANSI92 entry level SQL grammar.
2345: *
2346: * @return <code>true</code> if the ANSI92 entry level SQL grammar is
2347: * supported, <code>false</code> otherwise.
2348: * @throws SQLException
2349: * a database error occurred
2350: */
2351: public boolean supportsANSI92EntryLevelSQL() throws SQLException;
2352:
2353: /**
2354: * Determine if the database supports the ANSI92 full SQL grammar.
2355: *
2356: * @return <code>true</code> if the ANSI92 full SQL grammar is supported,
2357: * <code>false</code> otherwise.
2358: * @throws SQLException
2359: * a database error occurred
2360: */
2361: public boolean supportsANSI92FullSQL() throws SQLException;
2362:
2363: /**
2364: * Determine if the database supports the ANSI92 intermediate SQL Grammar.
2365: *
2366: * @return <code>true</code> if the ANSI92 intermediate SQL grammar is
2367: * supported, <code>false</code> otherwise.
2368: * @throws SQLException
2369: * a database error occurred
2370: */
2371: public boolean supportsANSI92IntermediateSQL() throws SQLException;
2372:
2373: /**
2374: * Determine if the database supports Batch Updates.
2375: *
2376: * @return <code>true</code> if batch updates are supported,
2377: * <code>false</code> otherwise.
2378: * @throws SQLException
2379: * a database error occurred
2380: */
2381: public boolean supportsBatchUpdates() throws SQLException;
2382:
2383: /**
2384: * Determine whether catalog names may be used in data manipulation
2385: * statements.
2386: *
2387: * @return <code>true</code> if catalog names can be used in data
2388: * manipulation statements, <code>false</code> otherwise.
2389: * @throws SQLException
2390: * a database error occurred
2391: */
2392: public boolean supportsCatalogsInDataManipulation()
2393: throws SQLException;
2394:
2395: /**
2396: * Determine if catalog names can be used in Index Definition statements.
2397: *
2398: * @return <code>true</code> if catalog names can be used in Index
2399: * Definition statements, <code>false</code> otherwise.
2400: * @throws SQLException
2401: * a database error occurred
2402: */
2403: public boolean supportsCatalogsInIndexDefinitions()
2404: throws SQLException;
2405:
2406: /**
2407: * Determine if catalog names can be used in privilege definition
2408: * statements.
2409: *
2410: * @return <code>true</code> if catalog names can be used in privilege
2411: * definition statements, <code>false</code> otherwise.
2412: * @throws SQLException
2413: * a database error occurred
2414: */
2415: public boolean supportsCatalogsInPrivilegeDefinitions()
2416: throws SQLException;
2417:
2418: /**
2419: * Determine if catalog names can be used in procedure call statements.
2420: *
2421: * @return <code>true</code> if catalog names can be used in procedure
2422: * call statements.
2423: * @throws SQLException
2424: * a database error occurred
2425: */
2426: public boolean supportsCatalogsInProcedureCalls()
2427: throws SQLException;
2428:
2429: /**
2430: * Determine if catalog names may be used in table definition statements.
2431: *
2432: * @return <code>true</code> if catalog names can be used in definition
2433: * statements, <code>false</code> otherwise.
2434: * @throws SQLException
2435: * a database error occurred
2436: */
2437: public boolean supportsCatalogsInTableDefinitions()
2438: throws SQLException;
2439:
2440: /**
2441: * Determine if the database supports column aliasing.
2442: * <p>
2443: * If aliasing is supported, then the SQL AS clause is used to provide names
2444: * for computed columns and provide alias names for columns.
2445: *
2446: * @return <code>true</code> if column aliasing is supported,
2447: * <code>false</code> otherwise.
2448: * @throws SQLException
2449: * a database error occurred
2450: */
2451: public boolean supportsColumnAliasing() throws SQLException;
2452:
2453: /**
2454: * Determine if the database supports the CONVERT operation between SQL
2455: * types.
2456: *
2457: * @return <code>true</code> if the CONVERT operation is supported,
2458: * <code>false</code> otherwise.
2459: * @throws SQLException
2460: * a database error occurred
2461: */
2462: public boolean supportsConvert() throws SQLException;
2463:
2464: /**
2465: * Determine if the database supports CONVERT operation for two supplied SQL
2466: * types.
2467: *
2468: * @param fromType
2469: * the Type to convert from, as defined by
2470: * <code>java.sql.Types</code>
2471: * @param toType
2472: * the Type to convert to, as defined by
2473: * <code>java.sql.Types</code>
2474: * @return <code>true</code> if the CONVERT operation is supported for
2475: * these types, <code>false</code> otherwise.
2476: * @throws SQLException
2477: * a database error occurred
2478: */
2479: public boolean supportsConvert(int fromType, int toType)
2480: throws SQLException;
2481:
2482: /**
2483: * Determine if the database supports the Core SQL Grammar for ODBC.
2484: *
2485: * @return <code>true</code> if the Core SQL Grammar is supported,
2486: * <code>false</code> otherwise.
2487: * @throws SQLException
2488: * a database error occurred
2489: */
2490: public boolean supportsCoreSQLGrammar() throws SQLException;
2491:
2492: /**
2493: * Determine if the database supports correlated sub-queries.
2494: *
2495: * @return <code>true</code> if the database does support correlated
2496: * sub-queries and <code>false</code> otherwise.
2497: * @throws SQLException
2498: * a database error occurred
2499: */
2500: public boolean supportsCorrelatedSubqueries() throws SQLException;
2501:
2502: /**
2503: * Determine if the database allows both data definition and data
2504: * manipulation statements inside a transaction.
2505: *
2506: * @return <code>true</code> if both types of statement are permitted,
2507: * <code>false</code> otherwise.
2508: * @throws SQLException
2509: * a database error occurred
2510: */
2511: public boolean supportsDataDefinitionAndDataManipulationTransactions()
2512: throws SQLException;
2513:
2514: /**
2515: * Determine if the database only allows data manipulation statements inside
2516: * a transaction.
2517: *
2518: * @return <code>true</code> if only data manipulation statements are
2519: * permitted, <code>false</code> otherwise.
2520: * @throws SQLException
2521: * a database error occurred
2522: */
2523: public boolean supportsDataManipulationTransactionsOnly()
2524: throws SQLException;
2525:
2526: /**
2527: * Determine if table correlation names are restricted to be different from
2528: * the names of the tables, when they are supported.
2529: *
2530: * @return <code>true</code> if correlation names must be different to
2531: * table names, <code>false</code> otherwise.
2532: * @throws SQLException
2533: * a database error occurred
2534: */
2535: public boolean supportsDifferentTableCorrelationNames()
2536: throws SQLException;
2537:
2538: /**
2539: * Determine whether expressions in ORDER BY lists are supported.
2540: *
2541: * @return <code>true</code> if expressions in ORDER BY lists are
2542: * supported.
2543: * @throws SQLException
2544: * a database error occurred
2545: */
2546: public boolean supportsExpressionsInOrderBy() throws SQLException;
2547:
2548: /**
2549: * Determine whether the Extended SQL Grammar for ODBC is supported.
2550: *
2551: * @return <code>true</code> if the Extended SQL Grammar is supported,
2552: * <code>false</code> otherwise.
2553: * @throws SQLException
2554: * a database error occurred
2555: */
2556: public boolean supportsExtendedSQLGrammar() throws SQLException;
2557:
2558: /**
2559: * Determine if the database supports full nested outer joins.
2560: *
2561: * @return <code>true</code> if full nested outer joins are supported,
2562: * <code>false</code> otherwise.
2563: * @throws SQLException
2564: * a database error occurred
2565: */
2566: public boolean supportsFullOuterJoins() throws SQLException;
2567:
2568: /**
2569: * Determine if auto generated keys can be returned when a statement
2570: * executes.
2571: *
2572: * @return <code>true</code> if auto generated keys can be returned,
2573: * <code>false</code> otherwise.
2574: * @throws SQLException
2575: * a database error occurred
2576: */
2577: public boolean supportsGetGeneratedKeys() throws SQLException;
2578:
2579: /**
2580: * Determine if the database supports a form of GROUP BY clause.
2581: *
2582: * @return <code>true</code> if a form of GROUP BY clause is supported,
2583: * <code>false</code> otherwise.
2584: * @throws SQLException
2585: * a database error occurred
2586: */
2587: public boolean supportsGroupBy() throws SQLException;
2588:
2589: /**
2590: * Determine if the database supports using a column name in a GROUP BY
2591: * clause not included in the SELECT statement as long as all of the columns
2592: * in the SELECT statement are used in the GROUP BY clause.
2593: *
2594: * @return <code>true</code> if GROUP BY clauses can use column names in
2595: * this way, <code>false</code> otherwise.
2596: * @throws SQLException
2597: * a database error occurred
2598: */
2599: public boolean supportsGroupByBeyondSelect() throws SQLException;
2600:
2601: /**
2602: * Determine if the database supports using a column name in a GROUP BY
2603: * clause that is not in the SELECT statement.
2604: *
2605: * @return <code>true</code> if GROUP BY clause can use a column name not
2606: * in the SELECT statement, <code>false</code> otherwise.
2607: * @throws SQLException
2608: * a database error occurred
2609: */
2610: public boolean supportsGroupByUnrelated() throws SQLException;
2611:
2612: /**
2613: * Determine whether the database supports SQL Integrity Enhancement
2614: * Facility.
2615: *
2616: * @return <code>true</code> if the Integrity Enhancement Facility is
2617: * supported, <code>false</code> otherwise.
2618: * @throws SQLException
2619: * a database error occurred
2620: */
2621: public boolean supportsIntegrityEnhancementFacility()
2622: throws SQLException;
2623:
2624: /**
2625: * Determine if the database supports using a LIKE escape clause.
2626: *
2627: * @return <code>true</code> if LIKE escape clause is supported,
2628: * <code>false</code> otherwise
2629: * @throws SQLException
2630: * a database error occurred
2631: */
2632: public boolean supportsLikeEscapeClause() throws SQLException;
2633:
2634: /**
2635: * Determine if the database provides limited support for outer Join
2636: * operations.
2637: *
2638: * @return <code>true</code> if there is limited support for outer Join
2639: * operations, <code>false</code> otherwise. This will be
2640: * <code>true</code> if <code>supportsFullOuterJoins</code>
2641: * returns <code>true</code>.
2642: * @throws SQLException
2643: * a database error occurred
2644: */
2645: public boolean supportsLimitedOuterJoins() throws SQLException;
2646:
2647: /**
2648: * Determine if the database supports Minimum SQL Grammar for ODBC.
2649: *
2650: * @return <code>true</code> if the Minimum SQL Grammar is supported,
2651: * <code>false</code> otherwise.
2652: * @throws SQLException
2653: * a database error occurred
2654: */
2655: public boolean supportsMinimumSQLGrammar() throws SQLException;
2656:
2657: /**
2658: * Determine if the database treats mixed case unquoted SQL identifiers as
2659: * case sensitive storing them in mixed case.
2660: *
2661: * @return <code>true</code> if unquoted SQL identifiers are stored in
2662: * mixed case, <code>false</code> otherwise.
2663: * @throws SQLException
2664: * a database error occurred
2665: */
2666: public boolean supportsMixedCaseIdentifiers() throws SQLException;
2667:
2668: /**
2669: * Determine whether the database considers mixed case quoted SQL
2670: * identifiers as case sensitive, storing them in mixed case.
2671: *
2672: * @return <code>true</code> if quoted SQL identifiers are stored in mixed
2673: * case, <code>false</code> otherwise.
2674: * @throws SQLException
2675: * a database error occurred
2676: */
2677: public boolean supportsMixedCaseQuotedIdentifiers()
2678: throws SQLException;
2679:
2680: /**
2681: * Determine if it is possible for a single CallableStatement to return
2682: * multiple ResultSets simultaneously.
2683: *
2684: * @return <code>true</code> if a single CallableStatement can return
2685: * multiple ResultSets simultaneously, <code>false</code>
2686: * otherwise.
2687: * @throws SQLException
2688: * a database error occurred
2689: */
2690: public boolean supportsMultipleOpenResults() throws SQLException;
2691:
2692: /**
2693: * Determine whether retrieving multiple ResultSets from a single call to
2694: * the <code>execute</code> method is supported.
2695: *
2696: * @return <code>true</code> if multiple ResultSets can be retrieved,
2697: * <code>false</code> otherwise.
2698: * @throws SQLException
2699: * a database error occurred
2700: */
2701: public boolean supportsMultipleResultSets() throws SQLException;
2702:
2703: /**
2704: * Determine whether multiple transactions in progress at at time on
2705: * different connections are supported.
2706: *
2707: * @return <code>true</code> if multiple open transactions are supported,
2708: * <code>false</code> otherwise.
2709: * @throws SQLException
2710: * a database error occurred
2711: */
2712: public boolean supportsMultipleTransactions() throws SQLException;
2713:
2714: /**
2715: * Determine whether call-able statements with named parameters is
2716: * supported.
2717: *
2718: * @return <code>true</code> if named parameters can be used with
2719: * call-able statements, <code>false</code> otherwise.
2720: * @throws SQLException
2721: * a database error occurred
2722: */
2723: public boolean supportsNamedParameters() throws SQLException;
2724:
2725: /**
2726: * Determine if columns in the database can be defined as non-nullable.
2727: *
2728: * @return <code>true</code> if Columns can be defined non-nullable,
2729: * <code>false</code> otherwise.
2730: * @throws SQLException
2731: * a database error occurred
2732: */
2733: public boolean supportsNonNullableColumns() throws SQLException;
2734:
2735: /**
2736: * Determine whether keeping Cursors open across Commit operations is
2737: * supported.
2738: *
2739: * @return <code>true</code> if Cursors can be kept open across Commit
2740: * operations, <code>false</code> if they might get closed.
2741: * @throws SQLException
2742: * a database error occurred
2743: */
2744: public boolean supportsOpenCursorsAcrossCommit()
2745: throws SQLException;
2746:
2747: /**
2748: * Determine if the database can keep Cursors open across Rollback
2749: * operations.
2750: *
2751: * @return <code>true</code> if Cursors can be kept open across Rollback
2752: * operations, <code>false</code> if they might get closed.
2753: * @throws SQLException
2754: * a database error occurred
2755: */
2756: public boolean supportsOpenCursorsAcrossRollback()
2757: throws SQLException;
2758:
2759: /**
2760: * Determine whether keeping Statements open across Commit operations is
2761: * supported.
2762: *
2763: * @return <code>true</code> if Statements can be kept open,
2764: * <code>false</code> if they might not.
2765: * @throws SQLException
2766: * a database error occurred
2767: */
2768: public boolean supportsOpenStatementsAcrossCommit()
2769: throws SQLException;
2770:
2771: /**
2772: * Determine whether keeping Statements open across Rollback operations is
2773: * supported.
2774: *
2775: * @return <code>true</code> if Statements can be kept open,
2776: * <code>false</code> if they might not.
2777: * @throws SQLException
2778: * a database error occurred
2779: */
2780: public boolean supportsOpenStatementsAcrossRollback()
2781: throws SQLException;
2782:
2783: /**
2784: * Determine whether using a column in an ORDER BY clause that is not in the
2785: * SELECT statement is supported.
2786: *
2787: * @return <code>true</code> if it is possible to ORDER using a column not
2788: * in the SELECT, <code>false</code> otherwise.
2789: * @throws SQLException
2790: * a database error occurred
2791: */
2792: public boolean supportsOrderByUnrelated() throws SQLException;
2793:
2794: /**
2795: * Determine whether outer join operations are supported.
2796: *
2797: * @return <code>true</code> if outer join operations are supported,
2798: * <code>false</code> otherwise.
2799: * @throws SQLException
2800: * a database error occurred
2801: */
2802: public boolean supportsOuterJoins() throws SQLException;
2803:
2804: /**
2805: * Determine whether positioned DELETE statements are supported.
2806: *
2807: * @return <code>true</code> if the database supports positioned DELETE
2808: * statements.
2809: * @throws SQLException
2810: * a database error occurred
2811: */
2812: public boolean supportsPositionedDelete() throws SQLException;
2813:
2814: /**
2815: * Determine whether positioned UPDATE statements are supported.
2816: *
2817: * @return <code>true</code> if the database supports positioned UPDATE
2818: * statements, <code>false</code> otherwise.
2819: * @throws SQLException
2820: * a database error occurred
2821: */
2822: public boolean supportsPositionedUpdate() throws SQLException;
2823:
2824: /**
2825: * Determine whether there is support for a given concurrency style for the
2826: * given ResultSet.
2827: *
2828: * @param type
2829: * the ResultSet type, as defined in
2830: * <code>java.sql.ResultSet</code>:
2831: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2832: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2833: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2834: * @param concurrency
2835: * a concurrency type, which may be one of
2836: * <code>ResultSet.CONCUR_READ_ONLY</code> or
2837: * <code>ResultSet.CONCUR_UPDATABLE</code>.
2838: * @return <code>true</code> if that concurrency and ResultSet type
2839: * pairing is supported otherwise <code>false</code>.
2840: * @throws SQLException
2841: * a database error occurred
2842: */
2843: public boolean supportsResultSetConcurrency(int type,
2844: int concurrency) throws SQLException;
2845:
2846: /**
2847: * Determine whether the supplied ResultSet holdability is supported.
2848: *
2849: * @param holdability
2850: * as specified in java.sql.ResultSet:
2851: * ResultSet.HOLD_CURSORS_OVER_COMMIT or
2852: * ResultSet.CLOSE_CURSORS_AT_COMMIT
2853: * @return <code>true</code> if the given ResultSet holdability is
2854: * supported and if it isn't then <code>false</code>.
2855: * @throws SQLException
2856: * a database error occurred
2857: */
2858: public boolean supportsResultSetHoldability(int holdability)
2859: throws SQLException;
2860:
2861: /**
2862: * Determine whether the supplied ResultSet type is supported.
2863: *
2864: * @param type
2865: * the ResultSet type as defined in java.sql.ResultSet:
2866: * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2867: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2868: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2869: * @return <code>true</code> if the ResultSet type is supported,
2870: * <code>false</code> otherwise.
2871: * @throws SQLException
2872: * a database error occurred
2873: */
2874: public boolean supportsResultSetType(int type) throws SQLException;
2875:
2876: /**
2877: * Determine whether Savepoints for transactions are supported.
2878: *
2879: * @return <code>true</code> if Savepoints are supported,
2880: * <code>false</code> otherwise.
2881: * @throws SQLException
2882: * a database error occurred
2883: */
2884: public boolean supportsSavepoints() throws SQLException;
2885:
2886: /**
2887: * Determine whether a schema name may be used in a data manipulation
2888: * statement.
2889: *
2890: * @return <code>true</code> if a schema name can be used in a data
2891: * manipulation otherwise <code>false</code>.
2892: * @throws SQLException
2893: * a database error occurred
2894: */
2895: public boolean supportsSchemasInDataManipulation()
2896: throws SQLException;
2897:
2898: /**
2899: * Determine whether a schema name may be used in an index definition
2900: * statement.
2901: *
2902: * @return <code>true</code> if a schema name can be used in an index
2903: * definition otherwise <code>false</code>.
2904: * @throws SQLException
2905: * a database error occurred
2906: */
2907: public boolean supportsSchemasInIndexDefinitions()
2908: throws SQLException;
2909:
2910: /**
2911: * Determine whether a database schema name can be used in a privilege
2912: * definition statement.
2913: *
2914: * @return <code>true</code> if a database schema name may be used in a
2915: * privilege definition otherwise <code>false</code>
2916: * @throws SQLException
2917: * a database error occurred
2918: */
2919: public boolean supportsSchemasInPrivilegeDefinitions()
2920: throws SQLException;
2921:
2922: /**
2923: * Determine if a procedure call statement may be contain in a schema name.
2924: *
2925: * @return <code>true</code> if a schema name can be used in a procedure
2926: * call otherwise <code>false</code>.
2927: * @throws SQLException
2928: * a database error occurred
2929: */
2930: public boolean supportsSchemasInProcedureCalls()
2931: throws SQLException;
2932:
2933: /**
2934: * Determine if a schema name can be used in a table definition statement.
2935: *
2936: * @return <code>true</code> if a schema name can be used in a table
2937: * definition otherwise <code>false</code>.
2938: * @throws SQLException
2939: * a database error occurred
2940: */
2941: public boolean supportsSchemasInTableDefinitions()
2942: throws SQLException;
2943:
2944: /**
2945: * Determine if this <code>SELECT FOR UPDATE</code> statements ar
2946: * supported.
2947: *
2948: * @return <code>true</code> if <code>SELECT FOR UPDATE</code>
2949: * statements are supported otherwise <code>false</code>.
2950: * @throws SQLException
2951: * a database error occurred
2952: */
2953: public boolean supportsSelectForUpdate() throws SQLException;
2954:
2955: /**
2956: * Determine whether statement pooling is supported.
2957: *
2958: * @return <code>true</code> of the database does support statement
2959: * pooling otherwise <code>false</code>.
2960: * @throws SQLException
2961: * a database error occurred
2962: */
2963: public boolean supportsStatementPooling() throws SQLException;
2964:
2965: /**
2966: * Determine whether stored procedure calls using the stored procedure
2967: * escape syntax is supported.
2968: *
2969: * @return <code>true</code> if stored procedure calls using the stored
2970: * procedure escape syntax are supported otherwise
2971: * <code>false</code>.
2972: * @throws SQLException
2973: * a database error occurred
2974: */
2975: public boolean supportsStoredProcedures() throws SQLException;
2976:
2977: /**
2978: * Determine whether subqueries in comparison expressions are supported.
2979: *
2980: * @return <code>true</code> if subqueries are supported in comparison
2981: * expressions.
2982: * @throws SQLException
2983: * a database error occurred
2984: */
2985: public boolean supportsSubqueriesInComparisons()
2986: throws SQLException;
2987:
2988: /**
2989: * Determine whether subqueries in EXISTS expressions are supported.
2990: *
2991: * @return <code>true</code> if subqueries are supported in EXISTS
2992: * expressions otherwise <code>false</code>.
2993: * @throws SQLException
2994: * a database error occurred
2995: */
2996: public boolean supportsSubqueriesInExists() throws SQLException;
2997:
2998: /**
2999: * Determine whether subqueries in <code>IN</code> statements are
3000: * supported.
3001: *
3002: * @return <code>true</code> if subqueries are supported in IN statements
3003: * otherwise <code>false</code>.
3004: * @throws SQLException
3005: * a database error occurred
3006: */
3007: public boolean supportsSubqueriesInIns() throws SQLException;
3008:
3009: /**
3010: * Determine whether subqueries in quantified expressions are supported.
3011: *
3012: * @return <code>true</code> if subqueries are supported otherwise
3013: * <code>false</code>.
3014: * @throws SQLException
3015: * a database error occurred
3016: */
3017: public boolean supportsSubqueriesInQuantifieds()
3018: throws SQLException;
3019:
3020: /**
3021: * Determine whether the database has table correlation names support.
3022: *
3023: * @return <code>true</code> if table correlation names are supported
3024: * otherwise <code>false</code>.
3025: * @throws SQLException
3026: * a database error occurred
3027: */
3028: public boolean supportsTableCorrelationNames() throws SQLException;
3029:
3030: /**
3031: * Determine whether a specified transaction isolation level is supported.
3032: *
3033: * @param level
3034: * the transaction isolation level, as specified in
3035: * <code>java.sql.Connection</code>:
3036: * <code>TRANSACTION_NONE</code>,
3037: * <code>TRANSACTION_READ_COMMITTED</code>,
3038: * <code>TRANSACTION_READ_UNCOMMITTED</code>,
3039: * <code>TRANSACTION_REPEATABLE_READ</code>,
3040: * <code>TRANSACTION_SERIALIZABLE</code>
3041: * @return <code>true</code> if the specific isolation level is supported
3042: * otherwise <code>false</code>.
3043: * @throws SQLException
3044: * a database error occurred
3045: */
3046: public boolean supportsTransactionIsolationLevel(int level)
3047: throws SQLException;
3048:
3049: /**
3050: * Determine whether transactions are supported.
3051: * <p>
3052: * If transactions are not supported, then the <code>commit</code> method
3053: * does nothing and the transaction isolation level is always
3054: * <code>TRANSACTION_NONE</code>.
3055: *
3056: * @return <code>true</code> if transactions are supported otherwise
3057: * <code>false</code>.
3058: * @throws SQLException
3059: * a database error occurred
3060: */
3061: public boolean supportsTransactions() throws SQLException;
3062:
3063: /**
3064: * Determine whether the <code>SQL UNION</code> operation is supported.
3065: *
3066: * @return <code>true</code> of the database does support
3067: * <code>UNION</code> otherwise <code>false</code>.
3068: * @throws SQLException
3069: * a database error occurred
3070: */
3071: public boolean supportsUnion() throws SQLException;
3072:
3073: /**
3074: * Determine whether the <code>SQL UNION ALL</code> operation is
3075: * supported.
3076: *
3077: * @return <code>true</code> if the database does support UNION ALL
3078: * otherwise <code>false</code>.
3079: * @throws SQLException
3080: * a database error occurred
3081: */
3082: public boolean supportsUnionAll() throws SQLException;
3083:
3084: /**
3085: * Determine if the method <code>ResultSet.rowUpdated</code> can detect a
3086: * visible row update.
3087: *
3088: * @param type
3089: * ResultSet type: <code>ResultSet.TYPE_FORWARD_ONLY</code>,
3090: * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
3091: * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
3092: * @return <code>true</code> detecting changes is possible otherwise
3093: * <code>false</code>.
3094: * @throws SQLException
3095: * a database error occurred
3096: */
3097: public boolean updatesAreDetected(int type) throws SQLException;
3098:
3099: /**
3100: * Determine if this database uses a file for each table.
3101: *
3102: * @return <code>true</code> if the database uses one file for each table
3103: * otherwise <code>false</code>.
3104: * @throws SQLException
3105: * a database error occurred
3106: */
3107: public boolean usesLocalFilePerTable() throws SQLException;
3108:
3109: /**
3110: * Determine whether this database uses a local file to store tables.
3111: *
3112: * @return <code>true</code> of the database does store tables in a local
3113: * file otherwise <code>false</code>.
3114: * @throws SQLException
3115: * a database error occurred
3116: */
3117: public boolean usesLocalFiles() throws SQLException;
3118: }
|