DatabaseMetaData.java revision 7ae5f6927b1b186bb54b94e7907cb245f0979fde
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18package java.sql;
19
20/**
21 * An interface which provides comprehensive information about the database
22 * management system and its supported features.
23 * <p>
24 * This interface is implemented by JDBC driver vendors in order to provide
25 * information about the underlying database capabilities in association with
26 * the JDBC driver.
27 * <p>
28 * Some of the methods in this interface take string parameters which are
29 * patterns. Within these string patterns, {@code '%'} and {@code '_'}
30 * characters have special meanings. {@code '%'} means
31 * "match any substring of 0 or more characters". {@code '_'} means
32 * "match any character". Only metadata entries that match the pattern are
33 * returned. If such a search pattern string is set to {@code null}, that
34 * argument's criteria are dropped from the search.
35 */
36public interface DatabaseMetaData {
37
38    /**
39     * States that it may not be permitted to store {@code NULL} values.
40     */
41    public static final short attributeNoNulls = 0;
42
43    /**
44     * States that {@code NULL} values are definitely permitted.
45     */
46    public static final short attributeNullable = 1;
47
48    /**
49     * States that whether {@code NULL} values are permitted is unknown.
50     */
51    public static final short attributeNullableUnknown = 2;
52
53    /**
54     * States the best row identifier is <em>NOT</em> a pseudo column.
55     */
56    public static final int bestRowNotPseudo = 1;
57
58    /**
59     * States that the best row identifier is a pseudo column.
60     */
61    public static final int bestRowPseudo = 2;
62
63    /**
64     * States that the remainder of the current session is used as the scope for
65     * the best row identifier.
66     */
67    public static final int bestRowSession = 2;
68
69    /**
70     * States that best row identifier scope lasts only while the row is being
71     * used.
72     */
73    public static final int bestRowTemporary = 0;
74
75    /**
76     * States that the remainder of the current transaction is used as the scope
77     * for the best row identifier.
78     */
79    public static final int bestRowTransaction = 1;
80
81    /**
82     * States that the best row identifier may or may not be a pseudo column.
83     */
84    public static final int bestRowUnknown = 0;
85
86    /**
87     * States that the column must not allow {@code NULL} values.
88     */
89    public static final int columnNoNulls = 0;
90
91    /**
92     * States that the column definitely allows {@code NULL} values.
93     */
94    public static final int columnNullable = 1;
95
96    /**
97     * States that it is unknown whether the columns may be nulled.
98     */
99    public static final int columnNullableUnknown = 2;
100
101    /**
102     * For the column {@code UPDATE_RULE}, states that when the primary key is
103     * updated, the foreign key (imported key) is changed accordingly.
104     */
105    public static final int importedKeyCascade = 0;
106
107    /**
108     * States that the evaluation of foreign key constraints is deferred (delayed
109     * until commit).
110     */
111    public static final int importedKeyInitiallyDeferred = 5;
112
113    /**
114     * States that the evaluation of foreign key constraint is {@code IMMEDIATE}
115     * .
116     */
117    public static final int importedKeyInitiallyImmediate = 6;
118
119    /**
120     * For the columns {@code UPDATE_RULE} and {@code DELETE_RULE}, states that
121     * if the primary key has been imported, it cannot be updated or deleted.
122     */
123    public static final int importedKeyNoAction = 3;
124
125    /**
126     * States that the evaluation of foreign key constraint must not be {@code
127     * DEFERRED}.
128     */
129    public static final int importedKeyNotDeferrable = 7;
130
131    /**
132     * States that a primary key must not be updated when imported as a foreign
133     * key by some other table. Used for the column {@code UPDATE_RULE}.
134     */
135    public static final int importedKeyRestrict = 1;
136
137    /**
138     * States that when the primary key is modified (updated or deleted) the
139     * foreign (imported) key is changed to its default value. Applies to the
140     * {@code UPDATE_RULE} and {@code DELETE_RULE} columns.
141     */
142    public static final int importedKeySetDefault = 4;
143
144    /**
145     * States that when the primary key is modified (updated or deleted) the
146     * foreign (imported) key is changed to {@code NULL}. Applies to the {@code
147     * UPDATE_RULE} and {@code DELETE_RULE} columns.
148     */
149    public static final int importedKeySetNull = 2;
150
151    /**
152     * States that the column stores {@code IN} type parameters.
153     */
154    public static final int procedureColumnIn = 1;
155
156    /**
157     * States that this column stores {@code INOUT} type parameters.
158     */
159    public static final int procedureColumnInOut = 2;
160
161    /**
162     * States that this column stores {@code OUT} type parameters.
163     */
164    public static final int procedureColumnOut = 4;
165
166    /**
167     * States that the column stores results.
168     */
169    public static final int procedureColumnResult = 3;
170
171    /**
172     * States that the column stores return values.
173     */
174    public static final int procedureColumnReturn = 5;
175
176    /**
177     * States that type of the column is unknown.
178     */
179    public static final int procedureColumnUnknown = 0;
180
181    /**
182     * States that {@code NULL} values are not permitted.
183     */
184    public static final int procedureNoNulls = 0;
185
186    /**
187     * States that the procedure does not return a result.
188     */
189    public static final int procedureNoResult = 1;
190
191    /**
192     * States that {@code NULL} values are permitted.
193     */
194    public static final int procedureNullable = 1;
195
196    /**
197     * States that it is unknown whether {@code NULL} values are permitted.
198     */
199    public static final int procedureNullableUnknown = 2;
200
201    /**
202     * States that it is unknown whether or not the procedure returns a result.
203     */
204    public static final int procedureResultUnknown = 0;
205
206    /**
207     * States that the procedure returns a result.
208     */
209    public static final int procedureReturnsResult = 2;
210
211    /**
212     * States that the value is an SQL99 {@code SQLSTATE} value.
213     */
214    public static final int sqlStateSQL99 = 2;
215
216    /**
217     * States that the value is an SQL {@code CLI SQLSTATE} value as defined by
218     * the X/Open standard.
219     */
220    public static final int sqlStateXOpen = 1;
221
222    /**
223     * States that this table index is a clustered index.
224     */
225    public static final short tableIndexClustered = 1;
226
227    /**
228     * States that this table index is a hashed index.
229     */
230    public static final short tableIndexHashed = 2;
231
232    /**
233     * States this table's index is neither a clustered index, not a hashed
234     * index, and not a table statistics index; i.e. it is something else.
235     */
236    public static final short tableIndexOther = 3;
237
238    /**
239     * States this column has the table's statistics, and that it is returned in
240     * conjunction with the table's index description.
241     */
242    public static final short tableIndexStatistic = 0;
243
244    /**
245     * States that a {@code NULL} value is <em>NOT</em> permitted for
246     * this data type.
247     */
248    public static final int typeNoNulls = 0;
249
250    /**
251     * States that a {@code NULL} value is permitted for this data type.
252     */
253    public static final int typeNullable = 1;
254
255    /**
256     * States that it is unknown if a {@code NULL} value is permitted for
257     * this data type.
258     */
259    public static final int typeNullableUnknown = 2;
260
261    /**
262     * States that this column shall not be used for {@code WHERE} statements
263     * with a {@code LIKE} clause.
264     */
265    public static final int typePredBasic = 2;
266
267    /**
268     * States that this column can only be used in a {@code WHERE...LIKE}
269     * statement.
270     */
271    public static final int typePredChar = 1;
272
273    /**
274     * States that this column does not support searches.
275     */
276    public static final int typePredNone = 0;
277
278    /**
279     * States that the column is searchable.
280     */
281    public static final int typeSearchable = 3;
282
283    /**
284     * States that the version column is known to be not a pseudo column.
285     */
286    public static final int versionColumnNotPseudo = 1;
287
288    /**
289     * States that this version column is known to be a pseudo column.
290     */
291    public static final int versionColumnPseudo = 2;
292
293    /**
294     * States that the version column may be a pseudo column or not.
295     */
296    public static final int versionColumnUnknown = 0;
297
298    /**
299     * Returns whether all procedures returned by {@link #getProcedures} can be
300     * called by the current user.
301     *
302     * @return {@code true} if all procedures can be called by the current user,
303     *         {@code false} otherwise.
304     * @throws SQLException
305     *             if there is a database error.
306     */
307    public boolean allProceduresAreCallable() throws SQLException;
308
309    /**
310     * Returns whether all the tables returned by {@code getTables} can be used
311     * by the current user in a {@code SELECT} statement.
312     *
313     * @return {@code true} if all the tables can be used,{@code false}
314     *         otherwise.
315     * @throws SQLException
316     *             if there is a database error.
317     */
318    public boolean allTablesAreSelectable() throws SQLException;
319
320    /**
321     * Returns whether a data definition statement in a transaction forces a {@code
322     * commit} of the transaction.
323     *
324     * @return {@code true} if the statement forces a commit, {@code false}
325     *         otherwise.
326     * @throws SQLException
327     *             if there is a database error.
328     */
329    public boolean dataDefinitionCausesTransactionCommit() throws SQLException;
330
331    /**
332     * Returns whether the database ignores data definition statements within a
333     * transaction.
334     *
335     * @return {@code true} if the database ignores a data definition statement,
336     *         {@code false} otherwise.
337     * @throws SQLException
338     *             if there is a database error.
339     */
340    public boolean dataDefinitionIgnoredInTransactions() throws SQLException;
341
342    /**
343     * Returns whether a visible row delete can be detected by calling
344     * {@link ResultSet#rowDeleted}.
345     *
346     * @param type
347     *            the type of the {@code ResultSet} involved: {@code
348     *            ResultSet.TYPE_FORWARD_ONLY}, {@code
349     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
350     *            ResultSet.TYPE_SCROLL_SENSITIVE}
351     * @return {@code true} if the visible row delete can be detected, {@code
352     *         false} otherwise.
353     * @throws SQLException
354     *             if there is a database error.
355     */
356    public boolean deletesAreDetected(int type) throws SQLException;
357
358    /**
359     * Returns whether the return value of {@code getMaxRowSize} includes the
360     * SQL data types {@code LONGVARCHAR} and {@code LONGVARBINARY}.
361     *
362     * @return {@code true} if the return value includes {@code LONGVARBINARY}
363     *         and {@code LONGVARCHAR}, otherwise {@code false}.
364     * @throws SQLException
365     *             if there is a database error.
366     */
367    public boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
368
369    /**
370     * Returns a {@code ResultSet} describing a subset of the attributes of a
371     * specified SQL User Defined Type (UDT) for a specified schema and catalog.
372     * The subset is determined by restricting to those attributes whose
373     * name matches the {@code attributeNamePattern} and whose type name
374     * matches the {@code typeNamePattern}. Each row of the {@code ResultSet}
375     * describes one attribute, and the rows are ordered by the columns {@code TYPE_SCHEM},
376     * {@code TYPE_NAME} and {@code ORDINAL_POSITION}. Inherited attributes
377     * are not included.
378     * <p>
379     * The columns of the returned {@code ResultSet} object have the following
380     * names and meanings:
381     * <ol>
382     * <li>{@code TYPE_CAT} - String - the type catalog name (possibly {@code
383     * null})</li>
384     * <li>{@code TYPE_SCHEM} - String - the type schema name (possibly {@code
385     * null})</li>
386     * <li>{@code TYPE_NAME} - String - the type name</li>
387     * <li>{@code ATTR_NAME} - String - the attribute name</li>
388     * <li>{@code DATA_TYPE} - int - the attribute type as defined in {@code
389     * java.sql.Types}</li>
390     * <li>{@code ATTR_TYPE_NAME} - String - the attribute type name. This
391     * depends on the data source. For a {@code UDT} the name is fully
392     * qualified. For a {@code REF} it is both fully qualified and represents
393     * the target type of the reference.</li>
394     * <li>{@code ATTR_SIZE} - int - the column size. When referring to char and
395     * date types this value is the maximum number of characters. When referring
396     * to numeric types is is the precision.</li>
397     * <li>{@code DECIMAL_DIGITS} - int - how many fractional digits are
398     * supported</li>
399     * <li>{@code NUM_PREC_RADIX} - int - numeric values radix</li>
400     * <li>{@code NULLABLE} - int - whether {@code NULL} is permitted:
401     * <ul>
402     * <li>DatabaseMetaData.attributeNoNulls - {@code NULL} values not permitted</li>
403     * <li>DatabaseMetaData.attributeNullable - {@code NULL} values definitely
404     * permitted</li>
405     * <li>DatabaseMetaData.attributeNullableUnknown - unknown</li>
406     * </ul>
407     * </li>
408     * <li>{@code REMARKS} - String - a comment describing the attribute
409     * (possibly {@code null})</li>
410     * <li>ATTR_DEF - String - Default value for the attribute (possibly {@code
411     * null})</li>
412     * <li>{@code SQL_DATA_TYPE} - int - not used</li>
413     * <li>SQL_DATETIME_SUB - int - not used</li>
414     * <li>CHAR_OCTET_LENGTH - int - for {@code CHAR} types, the max number of
415     * bytes in the column</li>
416     * <li>ORDINAL_POSITION - int - The index of the column in the table (where
417     * the count starts from 1, not 0)</li>
418     * <li>IS_NULLABLE - String - {@code "NO"} = the column does not allow {@code
419     * NULL}s, {@code "YES"} = the column allows {@code NULL}s, "" = status unknown</li>
420     * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
421     * this gives the catalog of the table corresponding to the attribute's scope.
422     * NULL if the {@code DATA_TYPE} is not REF.</li>
423     * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
424     * this gives the schema of the table corresponding to the attribute's scope.
425     * NULL if the {@code DATA_TYPE} is not REF.</li>
426     * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
427     * this gives the name of the table corresponding to the attribute's scope.
428     * NULL if the {@code DATA_TYPE} is not REF.</li>
429     * <li>{@code SOURCE_DATA_TYPE} - String - The source type for a user
430     * generated REF type or for a Distinct type. ({@code NULL} if {@code
431     * DATA_TYPE} is not DISTINCT or a user generated REF)</li>
432     * </ol>
433     *
434     * @param catalog
435     *            a catalog name. {@code null} is used to imply no narrowing of
436     *            the search by catalog name. Otherwise, the name must match a
437     *            catalog name held in the database, with "" used to retrieve
438     *            those without a catalog name.
439     * @param schemaPattern
440     *            a schema name pattern. {@code null} is used to imply no
441     *            narrowing of the search by a schema name. Otherwise, the name
442     *            must match a schema name in the database, with "" used to
443     *            retrieve those without a schema name.
444     * @param typeNamePattern
445     *            a type name. This pattern must match the type name stored in
446     *            the database.
447     * @param attributeNamePattern
448     *            an Attribute name. This pattern must match the attribute name as stored in
449     *            the database.
450     * @return a {@code ResultSet}, where each row is an attribute description.
451     * @throws SQLException
452     *             if there is a database error.
453     */
454    public ResultSet getAttributes(String catalog, String schemaPattern,
455            String typeNamePattern, String attributeNamePattern)
456            throws SQLException;
457
458    /**
459     * Returns a list of a table's optimal set of columns that uniquely
460     * identify the rows. The results are ordered by {@code SCOPE} (see below).
461     * <p>
462     * The results are returned as a table, with one entry for each column, as
463     * follows:
464     * <ol>
465     * <li>{@code SCOPE} - short - the {@code SCOPE} of the result, as follows:
466     * <ul>
467     * <li>{@code DatabaseMetaData.bestRowTemporary} - the result is very temporary,
468     * only valid while on the current row</li>
469     * <li>{@code DatabaseMetaData.bestRowTransaction} - the result is good for remainder of
470     * current transaction</li>
471     * <li>{@code DatabaseMetaData.bestRowSession} - the result is good for remainder of
472     * database session</li>
473     * </ul>
474     * </li>
475     * <li>{@code COLUMN_NAME} - String - the column name</li>
476     * <li>{@code DATA_TYPE} - int - the Type of the data, as defined in {@code
477     * java.sql.Types}</li>
478     * <li>{@code TYPE_NAME} - String - the Name of the type - database dependent.
479     * For UDT types the name is fully qualified</li>
480     * <li>{@code COLUMN_SIZE} - int - the precision of the data in the column</li>
481     * <li>{@code BUFFER_LENGTH} - int - not used</li>
482     * <li>{@code DECIMAL_DIGITS} - short - number of fractional digits</li>
483     * <li>{@code PSEUDO_COLUMN} - short - whether this is a pseudo column (e.g.
484     * an Oracle {@code ROWID}):
485     * <ul>
486     * <li>{@code DatabaseMetaData.bestRowUnknown} - it is not known whether this is
487     * a pseudo column</li>
488     * <li>{@code DatabaseMetaData.bestRowNotPseudo} - the column is not pseudo</li>
489     * <li>{@code DatabaseMetaData.bestRowPseudo} - the column is a pseudo column</li>
490     * </ul>
491     * </li>
492     * </ol>
493     *
494     * @param catalog
495     *            a catalog name. {@code null} is used to imply no narrowing of
496     *            the search by catalog name. Otherwise, the name must match a
497     *            catalog name held in the database, with "" used to retrieve
498     *            those without a catalog name.
499     * @param schema
500     *            a schema name pattern. {@code null} is used to imply no
501     *            narrowing of the search by schema name. Otherwise, the name
502     *            must match a schema name in the database, with "" used to
503     *            retrieve those without a schema name.
504     * @param table
505     *            the table name. This must match the name of the table as
506     *            declared in the database.
507     * @param scope
508     *            the {@code SCOPE} of interest, values as defined above.
509     * @param nullable
510     *            {@code true} = include columns that are nullable, {@code
511     *            false} = do not include nullable columns.
512     * @return a {@code ResultSet} where each row is a description of a column
513     *         and the complete set of rows is the optimal set for this table.
514     * @throws SQLException
515     *             if there is a database error.
516     */
517    public ResultSet getBestRowIdentifier(String catalog, String schema,
518            String table, int scope, boolean nullable) throws SQLException;
519
520    /**
521     * Returns the set of catalog names available in this database. The set is
522     * returned ordered by catalog name.
523     *
524     * @return a {@code ResultSet} containing the catalog names, with each row
525     *         containing one catalog name (as a {@code String}) in the
526     *         single column named {@code TABLE_CAT}.
527     * @throws SQLException
528     *             if there is a database error.
529     */
530    public ResultSet getCatalogs() throws SQLException;
531
532    /**
533     * Returns the separator that this database uses between a catalog name and
534     * table name.
535     *
536     * @return a String containing the separator.
537     * @throws SQLException
538     *             if there is a database error.
539     */
540    public String getCatalogSeparator() throws SQLException;
541
542    /**
543     * Returns the term that the database vendor prefers term for "catalog".
544     *
545     * @return a String with the vendor's term for "catalog".
546     * @throws SQLException
547     *             if there is a database error.
548     */
549    public String getCatalogTerm() throws SQLException;
550
551    /**
552     * Returns a description of access rights for a table's columns. Only access
553     * rights matching the criteria for the column name are returned.
554     * <p>
555     * The description is returned as a {@code ResultSet} with rows of data for
556     * each access right, with columns as follows:
557     * <ol>
558     * <li>{@code TABLE_CAT} - String - the catalog name (possibly {@code null})</li>
559     * <li>{@code TABLE_SCHEM} - String - the schema name (possibly {@code null})</li>
560     * <li>{@code TABLE_NAME} - String - the table name</li>
561     * <li>{@code COLUMN_NAME} - String - the Column name</li>
562     * <li>{@code GRANTOR} - String - the grantor of access (possibly {@code
563     * null})</li>
564     * <li>{@code PRIVILEGE} - String - Access right - one of SELECT, INSERT,
565     * UPDATE, REFERENCES,...</li>
566     * <li>{@code IS_GRANTABLE} - String - {@code "YES"} implies that the
567     * receiver can grant access to others, {@code "NO"} if the receiver cannot
568     * grant access to others, {@code null} if unknown.</li>
569     * </ol>
570     *
571     * @param catalog
572     *            a catalog name. {@code null} is used to imply no narrowing of
573     *            the search by catalog name. Otherwise, the name must match a
574     *            catalog name held in the database, with "" used to retrieve
575     *            those without a catalog name.
576     * @param schema
577     *            a schema name pattern. {@code null} is used to imply no
578     *            narrowing of the search by schema name. Otherwise, the name
579     *            must match a schema name in the database, with "" used to
580     *            retrieve those without a schema name.
581     * @param table
582     *            the table name. This must match the name of the table as
583     *            declared in the database.
584     * @param columnNamePattern
585     *            the column name. This must match the name of a column in the
586     *            table in the database.
587     * @return a {@code ResultSet} containing the access rights, one row for
588     *         each privilege description.
589     * @throws SQLException
590     *             if there is a database error.
591     */
592    public ResultSet getColumnPrivileges(String catalog, String schema,
593            String table, String columnNamePattern) throws SQLException;
594
595    /**
596     * Returns a description of table columns available in a specified catalog.
597     * Only descriptions meeting the specified catalog, schema, table, and column
598     * names are returned.
599     * <p>
600     * The descriptions are returned as a {@code ResultSet} conforming to the
601     * following data layout, with one row per table column:
602     * <ol>
603     * <li>{@code TABLE_CAT} - String - the catalog name (possibly {@code null})</li>
604     * <li>{@code TABLE_SCHEM} - String - the schema name (possibly {@code null})</li>
605     * <li>{@code TABLE_NAME} - String - the table name</li>
606     * <li>{@code COLUMN_NAME} - String - the column name</li>
607     * <li>{@code DATA_TYPE} - int - the SQL type as specified in {@code
608     * java.sql.Types}</li>
609     * <li>{@code TYPE_NAME} - String - the name of the data type, (database-dependent,
610     * UDT names are fully qualified)</li>
611     * <li>{@code COLUMN_SIZE} - int - the column size (the precision for numeric
612     * types, max characters for {@code char} and {@code date} types)</li>
613     * <li>{@code BUFFER_LENGTH} - int - Not used</li>
614     * <li>{@code DECIMAL_DIGITS} - int - maximum number of fractional digits</li>
615     * <li>{@code NUM_PREC_RADIX} - int - the radix for numerical types</li>
616     * <li>{@code NULLABLE} - int - whether the column allows {@code null}s:
617     * <ul>
618     * <li>DatabaseMetaData.columnNoNulls = may not allow {@code NULL}s</li>
619     * <li>DatabaseMetaData.columnNullable = does allow {@code NULL}s</li>
620     * <li>DatabaseMetaData.columnNullableUnknown = unknown {@code NULL} status</li>
621     * </ul>
622     * </li>
623     * <li>{@code REMARKS} - String - A description of the column (possibly
624     * {@code null})</li>
625     * <li>{@code COLUMN_DEF} - String - Default value for the column (possibly
626     * {@code null})</li>
627     * <li>{@code SQL_DATA_TYPE} - int - not used</li>
628     * <li>{@code SQL_DATETIME_SUB} - int - not used</li>
629     * <li>{@code CHAR_OCTET_LENGTH} - int - maximum number of bytes in the
630     * {@code char} type columns</li>
631     * <li>{@code ORDINAL_POSITION} - int - the column index in the table (1 based)</li>
632     * <li>{@code IS_NULLABLE} - String - {@code "NO"} = column does not allow
633     * NULLs, {@code "YES"} = column allows NULLs, "" = {@code NULL} status
634     * unknown</li>
635     * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
636     * this gives the catalog of the table corresponding to the attribute's scope.
637     * NULL if the {@code DATA_TYPE} is not REF.</li>
638     * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
639     * this gives the schema of the table corresponding to the attribute's scope.
640     * NULL if the {@code DATA_TYPE} is not REF.</li>
641     * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
642     * this gives the name of the table corresponding to the attribute's scope.
643     * NULL if the {@code DATA_TYPE} is not REF.</li>
644     * <li>{@code SOURCE_DATA_TYPE} - String - The source type for a user
645     * generated REF type or for a Distinct type. ({@code NULL} if {@code
646     * DATA_TYPE} is not DISTINCT or a user generated REF)</li>
647     * </ol>
648     *
649     * @param catalog
650     *            a catalog name. {@code null} is used to imply no narrowing of
651     *            the search by catalog name. Otherwise, the name must match a
652     *            catalog name held in the database, with "" used to retrieve
653     *            those without a catalog name.
654     * @param schemaPattern
655     *            a schema name pattern. {@code null} is used to imply no
656     *            narrowing of the search by schema name. Otherwise, the name
657     *            must match a schema name in the database, with "" used to
658     *            retrieve those without a schema name.
659     * @param tableNamePattern
660     *            the table name. This must match the name of the table as
661     *            declared in the database.
662     * @param columnNamePattern
663     *            the column name. This must match the name of a column in the
664     *            table in the database.
665     * @return the descriptions as a {@code ResultSet} with rows in the form
666     *         defined above.
667     * @throws SQLException
668     *             if there is a database error.
669     */
670    public ResultSet getColumns(String catalog, String schemaPattern,
671            String tableNamePattern, String columnNamePattern)
672            throws SQLException;
673
674    /**
675     * Returns the database connection that created this metadata.
676     *
677     * @return the connection to the database.
678     * @throws SQLException
679     *             if there is a database error.
680     */
681    public Connection getConnection() throws SQLException;
682
683    /**
684     * Returns a list of foreign key columns in a given foreign key table that
685     * reference the primary key columns of a supplied primary key table. This
686     * describes how one table imports the key of another table. It would be
687     * expected to return a single foreign key - primary key pair in most cases.
688     * <p>
689     * The descriptions are returned as a {@code ResultSet} with one row for
690     * each foreign key, with the following layout:
691     * <ol>
692     * <li>{@code PKTABLE_CAT} - String - from the primary key table : Catalog
693     * (possibly {@code null})</li>
694     * <li>{@code PKTABLE_SCHEM} - String - from the primary key table : Schema
695     * (possibly {@code null})</li>
696     * <li>{@code PKTABLE_NAME} - String - from the primary key table : name</li>
697     * <li>{@code PKCOLUMN_NAME} - String - from the primary key column : name</li>
698     * <li>{@code FKTABLE_CAT} - String - from the foreign key table : the
699     * catalog name being exported (possibly {@code null})</li>
700     * <li>{@code FKTABLE_SCHEM} - String - from the foreign key table : the schema name
701     * being exported (possibly {@code null})</li>
702     * <li>{@code FKTABLE_NAME} - String - from the foreign key table : the name being
703     * exported</li>
704     * <li>{@code FKCOLUMN_NAME} - String - from the foreign key column : the name being
705     * exported</li>
706     * <li>{@code KEY_SEQ} - short - the sequence number (in the foreign key)</li>
707     * <li>{@code UPDATE_RULE} - short - a value giving the rule for how to treat the corresponding foreign key when a primary
708     * key is updated:
709     * <ul>
710     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
711     * primary key to be updated if it is imported as a foreign key</li>
712     * <li>{@code DatabaseMetaData.importedKeyCascade} - change the imported key to
713     * match the updated primary key</li>
714     * <li>{@code DatabaseMetaData.importedKeySetNull} - set the imported key to
715     * {@code null}</li>
716     * <li>{@code DatabaseMetaData.importedKeySetDefault} - set the imported key
717     * to its default value</li>
718     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as {@code
719     * importedKeyNoAction}</li>
720     * </ul>
721     * </li>
722     * <li>{@code DELETE_RULE} - short - a value giving the rule for how to treat the foreign key when the corresponding primary
723     * key is deleted:
724     * <ul>
725     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
726     * primary key to be deleted if it is imported as a foreign key</li>
727     * <li>{@code DatabaseMetaData.importedKeyCascade} - delete those rows that
728     * import a deleted key</li>
729     * <li>{@code DatabaseMetaData.importedKeySetNull} - set the imported key to
730     * {@code null}</li>
731     * <li>{@code DatabaseMetaData.importedKeySetDefault} - set the imported key
732     * to its default value</li>
733     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as
734     * importedKeyNoAction</li>
735     * </ul>
736     * </li>
737     * <li>{@code FK_NAME} - String - the foreign key name (possibly {@code null})</li>
738     * <li>{@code PK_NAME} - String - the primary key name (possibly {@code null})</li>
739     * <li>{@code DEFERRABILITY} - short - whether foreign key constraints can be
740     * deferred until commit (see the SQL92 specification for definitions):
741     * <ul>
742     * <li>{@code DatabaseMetaData.importedKeyInitiallyDeferred}</li>
743     * <li>{@code DatabaseMetaData.importedKeyInitiallyImmediate}</li>
744     * <li>{@code DatabaseMetaData.importedKeyNotDeferrable}</li>
745     * </ul>
746     * </li>
747     * </ol>
748     *
749     * @param primaryCatalog
750     *            a catalog name for the primary key table. {@code null} is used to imply no narrowing of
751     *            the search by catalog name. Otherwise, the name must match a
752     *            catalog name held in the database, with "" used to retrieve
753     *            those without a catalog name.
754     * @param primarySchema
755     *            a schema name for the primary key table. {@code null} is used to imply no narrowing of
756     *            the search by schema name. Otherwise, the name must match a
757     *            schema name in the database, with "" used to retrieve those
758     *            without a schema name.
759     * @param primaryTable
760     *            the name of the table which exports the key. It must match the
761     *            name of the table in the database.
762     * @param foreignCatalog
763     *            a catalog name for the foreign key table. {@code null} is used to imply no narrowing of
764     *            the search by catalog name. Otherwise, the name must match a
765     *            catalog name held in the database, with "" used to retrieve
766     *            those without a catalog name.
767     * @param foreignSchema
768     *            a schema name for the foreign key table. {@code null} is used to imply no narrowing of
769     *            the search by schema name. Otherwise, the name must match a
770     *            schema name in the database, with "" used to retrieve those
771     *            without a schema name.
772     * @param foreignTable
773     *            the name of the table importing the key. It must match the
774     *            name of the table in the database.
775     * @return a {@code ResultSet} containing rows with the descriptions of the
776     *         foreign keys laid out according to the format defined above.
777     * @throws SQLException
778     *             if there is a database error.
779     */
780    public ResultSet getCrossReference(String primaryCatalog,
781            String primarySchema, String primaryTable, String foreignCatalog,
782            String foreignSchema, String foreignTable) throws SQLException;
783
784    /**
785     * Returns the major version number of the database software.
786     *
787     * @return the major version number of the database software.
788     * @throws SQLException
789     *             a database error occurred.
790     */
791    public int getDatabaseMajorVersion() throws SQLException;
792
793    /**
794     * Returns the minor version number of the database software.
795     *
796     * @return the minor version number of the database software.
797     * @throws SQLException
798     *             a database error occurred.
799     */
800    public int getDatabaseMinorVersion() throws SQLException;
801
802    /**
803     * Returns the name of the database software.
804     *
805     * @return a {@code String} with the name of the database software.
806     * @throws SQLException
807     *             a database error occurred.
808     */
809    public String getDatabaseProductName() throws SQLException;
810
811    /**
812     * Returns the version number of this database software.
813     *
814     * @return a {@code String} with the version number of the database
815     *         software.
816     * @throws SQLException
817     *             a database error occurred.
818     */
819    public String getDatabaseProductVersion() throws SQLException;
820
821    /**
822     * Returns the default transaction isolation level for this database.
823     *
824     * @return the default transaction isolation level. One of the following values:
825     *         <ul>
826     *         <li>{@code TRANSACTION_NONE}</li>
827     *         <li>{@code TRANSACTION_READ_COMMITTED}</li>
828     *         <li>{@code TRANSACTION_READ_UNCOMMITTED}</li>
829     *         <li>{@code TRANSACTION_REPEATABLE_READ}</li>
830     *         <li>{@code TRANSACTION_SERIALIZABLE}</li>
831     *         </ul>
832     * @throws SQLException
833     *             a database error occurred.
834     */
835    public int getDefaultTransactionIsolation() throws SQLException;
836
837    /**
838     * Returns the JDBC driver's major version number.
839     *
840     * @return the driver's major version number.
841     */
842    public int getDriverMajorVersion();
843
844    /**
845     * Returns the JDBC driver's minor version number.
846     *
847     * @return the driver's minor version number.
848     */
849    public int getDriverMinorVersion();
850
851    /**
852     * Returns the name of this JDBC driver.
853     *
854     * @return a {@code String} containing the name of the JDBC driver
855     * @throws SQLException
856     *             a database error occurred.
857     */
858    public String getDriverName() throws SQLException;
859
860    /**
861     * Returns the version number of this JDBC driver.
862     *
863     * @return a {@code String} containing the complete version number of the
864     *         JDBC driver.
865     * @throws SQLException
866     *             a database error occurred.
867     */
868    public String getDriverVersion() throws SQLException;
869
870    /**
871     * Returns a list of the foreign key columns that reference the primary key
872     * columns of a specified table (the foreign keys exported by a table).
873     * <p>
874     * The list is returned as a {@code ResultSet} with a row for each of the
875     * foreign key columns, ordered by {@code FKTABLE_CAT}, {@code
876     * FKTABLE_SCHEM}, {@code FKTABLE_NAME}, and {@code KEY_SEQ}, with the
877     * format for each row being:
878     * <ol>
879     * <li>{@code PKTABLE_CAT} - String - from the primary key table : the catalog (possibly
880     * {@code null})</li>
881     * <li>{@code PKTABLE_SCHEM} - String - from the primary key table : the schema (possibly
882     * {@code null})</li>
883     * <li>{@code PKTABLE_NAME} - String - from the primary key table : the name</li>
884     * <li>{@code PKCOLUMN_NAME} - String - from the primary key column : the name</li>
885     * <li>{@code FKTABLE_CAT} - String - from the foreign key table : the catalog name being
886     * exported (possibly {@code null})</li>
887     * <li>{@code FKTABLE_SCHEM} - String - from the foreign key table : the schema name
888     * being exported (possibly {@code null})</li>
889     * <li>{@code FKTABLE_NAME} - String - from the foreign key table : the name being
890     * exported</li>
891     * <li>{@code FKCOLUMN_NAME} - String - from the foreign key column : the name being
892     * exported</li>
893     * <li>{@code KEY_SEQ} - short - the sequence number (in the foreign key)</li>
894     * <li>{@code UPDATE_RULE} - short - a value giving the rule for how to treat the foreign key when the corresponding primary
895     * key is updated:
896     * <ul>
897     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
898     * primary key to be updated if it is imported as a foreign key</li>
899     * <li>{@code DatabaseMetaData.importedKeyCascade} - change the imported key to
900     * match the primary key update</li>
901     * <li>{@code DatabaseMetaData.importedKeySetNull} - set the imported key to
902     * {@code null}</li>
903     * <li>{@code DatabaseMetaData.importedKeySetDefault} - set the imported key
904     * to its default value</li>
905     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as
906     * importedKeyNoAction</li>
907     * </ul>
908     * </li>
909     * <li>{@code DELETE_RULE} - short - how to treat the foreign key when the corresponding primary
910     * key is deleted:
911     * <ul>
912     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
913     * primary key to be deleted if it is imported as a foreign key</li>
914     * <li>{@code DatabaseMetaData.importedKeyCascade} - the deletion should
915     * also delete rows that import a deleted key</li>
916     * <li>{@code DatabaseMetaData.importedKeySetNull} - the deletion sets the
917     * imported key to {@code null}</li>
918     * <li>{@code DatabaseMetaData.importedKeySetDefault} - the deletion sets the
919     * imported key to its default value</li>
920     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as
921     * importedKeyNoAction</li>
922     * </ul>
923     * </li>
924     * <li>{@code FK_NAME} - String - the foreign key name (possibly {@code null})</li>
925     * <li>{@code PK_NAME} - String - the primary key name (possibly {@code null})</li>
926     * <li>{@code DEFERRABILITY} - short - defines whether the foreign key
927     * constraints can be deferred until commit (see the SQL92 specification for
928     * definitions):
929     * <ul>
930     * <li>{@code DatabaseMetaData.importedKeyInitiallyDeferred}</li>
931     * <li>{@code DatabaseMetaData.importedKeyInitiallyImmediate}</li>
932     * <li>{@code DatabaseMetaData.importedKeyNotDeferrable}</li>
933     * </ul>
934     * </li>
935     * </ol>
936     *
937     * @param catalog
938     *            a catalog name. {@code null} is used to imply no narrowing of
939     *            the search by catalog name. Otherwise, the name must match a
940     *            catalog name held in the database, with "" used to retrieve
941     *            those without a catalog name.
942     * @param schema
943     *            a schema name. {@code null} is used to imply no narrowing of
944     *            the search by schema name. Otherwise, the name must match a
945     *            schema name in the database, with "" used to retrieve those
946     *            without a schema name.
947     * @param table
948     *            a table name, which must match the name of a table in the
949     *            database
950     * @return a {@code ResultSet} containing a row for each of the foreign key
951     *         columns, as defined above
952     * @throws SQLException
953     *             a database error occurred
954     */
955    public ResultSet getExportedKeys(String catalog, String schema, String table)
956            throws SQLException;
957
958    /**
959     * Returns a string of characters that may be used in unquoted identifier
960     * names. The characters {@code a-z}, {@code A-Z}, {@code 0-9} and {@code _}
961     * are always permitted.
962     *
963     * @return a String containing all the additional permitted characters.
964     * @throws SQLException
965     *             a database error occurred.
966     */
967    public String getExtraNameCharacters() throws SQLException;
968
969    /**
970     * Returns the string used to quote SQL identifiers. Returns " " (space) if
971     * identifier quoting not supported.
972     *
973     * @return the String used to quote SQL identifiers.
974     * @throws SQLException
975     *             a database error occurred.
976     */
977    public String getIdentifierQuoteString() throws SQLException;
978
979    /**
980     * Returns a list columns in a table that are both primary keys and
981     * referenced by the table's foreign key columns (that is, the primary keys
982     * imported by a table).
983     * <p>
984     * The list returned is a {@code ResultSet} with a row entry for each
985     * primary key column, ordered by {@code PKTABLE_CAT}, {@code PKTABLE_SCHEM},
986     * {@code PKTABLE_NAME}, and {@code KEY_SEQ}, with the following format:
987     * <ol>
988     * <li>{@code PKTABLE_CAT} - String - primary key catalog name being
989     * imported (possibly {@code null})</li>
990     * <li>{@code PKTABLE_SCHEM} - String - primary key schema name being
991     * imported (possibly {@code null})</li>
992     * <li>{@code PKTABLE_NAME} - String - primary key table name being imported
993     * </li>
994     * <li>{@code PKCOLUMN_NAME} - String - primary key column name being
995     * imported</li>
996     * <li>{@code FKTABLE_CAT} - String - foreign key table catalog name
997     * (possibly {@code null})</li>
998     * <li>{@code FKTABLE_SCHEM} - String - foreign key table schema name
999     * (possibly {@code null})</li>
1000     * <li>{@code FKTABLE_NAME} - String - foreign key table name</li>
1001     * <li>{@code FKCOLUMN_NAME} - String - foreign key column name</li>
1002     * <li>{@code KEY_SEQ} - short - sequence number (in the foreign key)</li>
1003     * <li>{@code UPDATE_RULE} - short - how to treat the foreign key when the corresponding primary
1004     * key is updated:
1005     * <ul>
1006     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow any update of
1007     * the primary key if it is imported as a foreign key</li>
1008     * <li>{@code DatabaseMetaData.importedKeyCascade} - change imported key to
1009     * match the primary key update</li>
1010     * <li>{@code DatabaseMetaData.importedKeySetNull} - set the imported key to
1011     * {@code null}</li>
1012     * <li>{@code DatabaseMetaData.importedKeySetDefault} - set the imported key
1013     * to its default value</li>
1014     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as
1015     * importedKeyNoAction</li>
1016     * </ul>
1017     * </li>
1018     * <li>{@code DELETE_RULE} - short - how to treat the foreign key when the corresponding primary
1019     * key is deleted:
1020     * <ul>
1021     * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the primary key to be deleted
1022     * if it is imported as a foreign key</li>
1023     * <li>{@code DatabaseMetaData.importedKeyCascade} - delete those rows that
1024     * import a deleted key</li>
1025     * <li>{@code DatabaseMetaData.importedKeySetNull} - set the imported key to
1026     * {@code null}</li>
1027     * <li>{@code DatabaseMetaData.importedKeySetDefault} - set the imported key
1028     * to its default value</li>
1029     * <li>{@code DatabaseMetaData.importedKeyRestrict} - same as {@code
1030     * importedKeyNoAction}</li>
1031     * </ul>
1032     * </li>
1033     * <li>{@code FK_NAME} - String - foreign key name (possibly {@code null})</li>
1034     * <li>{@code PK_NAME} - String - primary key name (possibly {@code null})</li>
1035     * <li>{@code DEFERRABILITY} - short - defines whether foreign key
1036     * constraints can be deferred until commit (see SQL92 specification for
1037     * definitions):
1038     * <ul>
1039     * <li>{@code DatabaseMetaData.importedKeyInitiallyDeferred}</li>
1040     * <li>{@code DatabaseMetaData.importedKeyInitiallyImmediate}</li>
1041     * <li>{@code DatabaseMetaData.importedKeyNotDeferrable}</li>
1042     * </ul>
1043     * </li>
1044     * </ol>
1045     *
1046     * @param catalog
1047     *            a catalog name. {@code null} is used to imply no narrowing of
1048     *            the search by catalog name. Otherwise, the name must match a
1049     *            catalog name held in the database, with "" used to retrieve
1050     *            those without a catalog name.
1051     * @param schema
1052     *            a schema name. {@code null} is used to imply no narrowing of
1053     *            the search by schema name. Otherwise, the name must match a
1054     *            schema name in the database, with "" used to retrieve those
1055     *            without a schema name.
1056     * @param table
1057     *            a table name, which must match the name of a table in the
1058     *            database.
1059     * @return a {@code ResultSet} containing the list of primary key columns as
1060     *         rows in the format defined above.
1061     * @throws SQLException
1062     *             a database error occurred.
1063     */
1064    public ResultSet getImportedKeys(String catalog, String schema, String table)
1065            throws SQLException;
1066
1067    /**
1068     * Returns a list of indices and statistics for a specified table.
1069     * <p>
1070     * The list is returned as a {@code ResultSet}, with one row for each index
1071     * or statistic. The list is ordered by {@code NON_UNIQUE}, {@code TYPE},
1072     * {@code INDEX_NAME}, and {@code ORDINAL_POSITION}. Each row has the
1073     * following format:
1074     * <ol>
1075     * <li>{@code TABLE_CAT} - String - table catalog name (possibly {@code
1076     * null})</li>
1077     * <li>{@code TABLE_SCHEM} - String - table schema name (possibly {@code
1078     * null})</li>
1079     * <li>{@code TABLE_NAME} - String - The table name</li>
1080     * <li>{@code NON_UNIQUE} - boolean - {@code true} when index values can be
1081     * non-unique. Must be {@code false} when the TYPE is tableIndexStatistic</li>
1082     * <li>{@code INDEX_QUALIFIER} - String : index catalog name. {@code null}
1083     * when the TYPE is 'tableIndexStatistic'</li>
1084     * <li>{@code INDEX_NAME} - String : index name. {@code null} when TYPE is
1085     * 'tableIndexStatistic'</li>
1086     * <li>{@code TYPE} - short - the index type. One of:
1087     * <ul>
1088     * <li>{@code DatabaseMetaData.tableIndexStatistic} - table statistics
1089     * returned with Index descriptions</li>
1090     * <li>{@code DatabaseMetaData.tableIndexClustered} - a clustered Index</li>
1091     * <li>{@code DatabaseMetaData.tableIndexHashed} - a hashed Index</li>
1092     * <li>{@code DatabaseMetaData.tableIndexOther} - other style of Index</li>
1093     * </ul>
1094     * </li>
1095     * <li>{@code ORDINAL_POSITION} - short - column sequence within Index. 0
1096     * when TYPE is tableIndexStatistic</li>
1097     * <li>{@code COLUMN_NAME} - String - the column name. {@code null} when
1098     * TYPE is tableIndexStatistic</li>
1099     * <li>{@code ASC_OR_DESC} - String - column sort sequence. {@code null} if
1100     * sequencing not supported or TYPE is tableIndexStatistic; otherwise "A"
1101     * means sort ascending and "D" means sort descending.</li>
1102     * <li>{@code CARDINALITY} - int - Number of unique values in the Index. If
1103     * TYPE is tableIndexStatistic, this is number of rows in the table.</li>
1104     * <li>{@code PAGES} - int - Number of pages for current Index. If TYPE is
1105     * tableIndexStatistic, this is number of pages used for the table.</li>
1106     * <li>{@code FILTER_CONDITION} - String - Filter condition. (possibly null)
1107     * </li>
1108     * </ol>
1109     *
1110     * @param catalog
1111     *            a catalog name. {@code null} is used to imply no narrowing of
1112     *            the search by catalog name. Otherwise, the name must match a
1113     *            catalog name held in the database, with "" used to retrieve
1114     *            those without a catalog name.
1115     * @param schema
1116     *            a schema name. {@code null} is used to imply no narrowing of
1117     *            the search by schema name. Otherwise, the name must match a
1118     *            schema name in the database, with "" used to retrieve those
1119     *            without a schema name.
1120     * @param table
1121     *            a table name, which must match the name of a table in the
1122     *            database.
1123     * @param unique
1124     *            {@code true} means only return indices for unique values,
1125     *            {@code false} implies that they can be returned even if not
1126     *            unique.
1127     * @param approximate
1128     *            {@code true} implies that the list can contain approximate or
1129     *            "out of data" values, {@code false} implies that all values
1130     *            must be precisely accurate
1131     * @return a {@code ResultSet} containing the list of indices and statistics
1132     *         for the table, in the format defined above.
1133     * @throws SQLException
1134     *             a database error occurred.
1135     */
1136    public ResultSet getIndexInfo(String catalog, String schema, String table,
1137            boolean unique, boolean approximate) throws SQLException;
1138
1139    /**
1140     * Returns this driver's major JDBC version number.
1141     *
1142     * @return the major JDBC version number.
1143     * @throws SQLException
1144     *             a database error occurred.
1145     */
1146    public int getJDBCMajorVersion() throws SQLException;
1147
1148    /**
1149     * Returns the minor JDBC version number for this driver.
1150     *
1151     * @return the Minor JDBC Version Number.
1152     * @throws SQLException
1153     *             a database error occurred.
1154     */
1155    public int getJDBCMinorVersion() throws SQLException;
1156
1157    /**
1158     * Get the maximum number of hex characters in an in-line binary literal for
1159     * this database.
1160     *
1161     * @return the maximum number of hex characters in an in-line binary
1162     *         literal. If the number is unlimited then the result is zero.
1163     * @throws SQLException
1164     *             a database error occurred.
1165     */
1166    public int getMaxBinaryLiteralLength() throws SQLException;
1167
1168    /**
1169     * Returns the maximum size of a catalog name in this database.
1170     *
1171     * @return the maximum size in characters for a catalog name. If the limit
1172     *         is unknown, or the value is unlimited, then the result is zero.
1173     * @throws SQLException
1174     *             a database error occurred.
1175     */
1176    public int getMaxCatalogNameLength() throws SQLException;
1177
1178    /**
1179     * Returns the maximum size for a character literal in this database.
1180     *
1181     * @return the maximum size in characters for a character literal. If the
1182     *         limit is unknown, or the value is unlimited, then the result is
1183     *         zero.
1184     * @throws SQLException
1185     *             a database error occurred.
1186     */
1187    public int getMaxCharLiteralLength() throws SQLException;
1188
1189    /**
1190     * Returns the maximum size for a Column name for this database.
1191     *
1192     * @return the maximum number of characters for a Column name. If the limit
1193     *         is unknown, or the value is unlimited, then the result is zero.
1194     * @throws SQLException
1195     *             a database error occurred.
1196     */
1197    public int getMaxColumnNameLength() throws SQLException;
1198
1199    /**
1200     * Get the maximum number of columns in a {@code GROUP BY} clause for this
1201     * database.
1202     *
1203     * @return the maximum number of columns in a {@code GROUP BY} clause. If
1204     *         the limit is unknown, or the value is unlimited, then the result
1205     *         is zero.
1206     * @throws SQLException
1207     *             a database error occurred.
1208     */
1209    public int getMaxColumnsInGroupBy() throws SQLException;
1210
1211    /**
1212     * Returns the maximum number of columns in an Index for this database.
1213     *
1214     * @return the maximum number of columns in an Index. If the limit is
1215     *         unknown, or the value is unlimited, then the result is zero.
1216     * @throws SQLException
1217     *             a database error occurred.
1218     */
1219    public int getMaxColumnsInIndex() throws SQLException;
1220
1221    /**
1222     * Returns the maximum number of columns in an {@code ORDER BY} clause for
1223     * this database.
1224     *
1225     * @return the maximum number of columns in an {@code ORDER BY} clause. If
1226     *         the limit is unknown, or the value is unlimited, then the result
1227     *         is zero.
1228     * @throws SQLException
1229     *             a database error occurred.
1230     */
1231    public int getMaxColumnsInOrderBy() throws SQLException;
1232
1233    /**
1234     * Returns the maximum number of columns in a {@code SELECT} list for this
1235     * database.
1236     *
1237     * @return the maximum number of columns in a {@code SELECT} list. If the
1238     *         limit is unknown, or the value is unlimited, then the result is
1239     *         zero.
1240     * @throws SQLException
1241     *             a database error occurred.
1242     */
1243    public int getMaxColumnsInSelect() throws SQLException;
1244
1245    /**
1246     * Returns the maximum number of columns in a table for this database.
1247     *
1248     * @return the maximum number of columns in a table. If the limit is
1249     *         unknown, or the value is unlimited, then the result is zero.
1250     * @throws SQLException
1251     *             a database error occurred.
1252     */
1253    public int getMaxColumnsInTable() throws SQLException;
1254
1255    /**
1256     * Returns the database's maximum number of concurrent connections.
1257     *
1258     * @return the maximum number of connections. If the limit is unknown, or
1259     *         the value is unlimited, then the result is zero.
1260     * @throws SQLException
1261     *             a database error occurred.
1262     */
1263    public int getMaxConnections() throws SQLException;
1264
1265    /**
1266     * Returns the maximum length of a cursor name for this database.
1267     *
1268     * @return the maximum number of characters in a cursor name. If the limit
1269     *         is unknown, or the value is unlimited, then the result is zero.
1270     * @throws SQLException
1271     *             a database error occurred.
1272     */
1273    public int getMaxCursorNameLength() throws SQLException;
1274
1275    /**
1276     * Returns the maximum length in bytes for an Index for this database. This
1277     * covers all the parts of a composite index.
1278     *
1279     * @return the maximum length in bytes for an Index. If the limit is
1280     *         unknown, or the value is unlimited, then the result is zero.
1281     * @throws SQLException
1282     *             a database error occurred.
1283     */
1284    public int getMaxIndexLength() throws SQLException;
1285
1286    /**
1287     * Returns the maximum number of characters for a procedure name in this
1288     * database.
1289     *
1290     * @return the maximum number of character for a procedure name. If the
1291     *         limit is unknown, or the value is unlimited, then the result is
1292     *         zero.
1293     * @throws SQLException
1294     *             a database error occurred.
1295     */
1296    public int getMaxProcedureNameLength() throws SQLException;
1297
1298    /**
1299     * Returns the maximum number of bytes within a single row for this
1300     * database.
1301     *
1302     * @return the maximum number of bytes for a single row. If the limit is
1303     *         unknown, or the value is unlimited, then the result is zero.
1304     * @throws SQLException
1305     *             a database error occurred.
1306     */
1307    public int getMaxRowSize() throws SQLException;
1308
1309    /**
1310     * Returns the maximum number of characters in a schema name for this
1311     * database.
1312     *
1313     * @return the maximum number of characters in a schema name. If the limit
1314     *         is unknown, or the value is unlimited, then the result is zero.
1315     * @throws SQLException
1316     *             a database error occurred.
1317     */
1318    public int getMaxSchemaNameLength() throws SQLException;
1319
1320    /**
1321     * Returns the maximum number of characters in an SQL statement for this
1322     * database.
1323     *
1324     * @return the maximum number of characters in an SQL statement. If the
1325     *         limit is unknown, or the value is unlimited, then the result is
1326     *         zero.
1327     * @throws SQLException
1328     *             a database error occurred.
1329     */
1330    public int getMaxStatementLength() throws SQLException;
1331
1332    /**
1333     * Get the maximum number of simultaneously open active statements for this
1334     * database.
1335     *
1336     * @return the maximum number of open active statements. If the limit is
1337     *         unknown, or the value is unlimited, then the result is zero.
1338     * @throws SQLException
1339     *             a database error occurred.
1340     */
1341    public int getMaxStatements() throws SQLException;
1342
1343    /**
1344     * Returns the maximum size for a table name in the database.
1345     *
1346     * @return the maximum size in characters for a table name. If the limit is
1347     *         unknown, or the value is unlimited, then the result is zero.
1348     * @throws SQLException
1349     *             a database error occurred.
1350     */
1351    public int getMaxTableNameLength() throws SQLException;
1352
1353    /**
1354     * Returns the maximum number of tables permitted in a {@code SELECT}
1355     * statement for the database.
1356     *
1357     * @return the maximum number of tables permitted in a {@code SELECT}
1358     *         statement. If the limit is unknown, or the value is unlimited,
1359     *         then the result is zero.
1360     * @throws SQLException
1361     *             a database error occurred.
1362     */
1363    public int getMaxTablesInSelect() throws SQLException;
1364
1365    /**
1366     * Returns the maximum number of characters in a user name for the database.
1367     *
1368     * @return the maximum number of characters in a user name. If the limit is
1369     *         unknown, or the value is unlimited, then the result is zero.
1370     * @throws SQLException
1371     *             a database error occurred.
1372     */
1373    public int getMaxUserNameLength() throws SQLException;
1374
1375    /**
1376     * Returns a list of the math functions available with this database. These
1377     * are used in the JDBC function escape clause and are the Open Group CLI
1378     * math function names.
1379     *
1380     * @return a String which contains the list of math functions as a comma
1381     *         separated list.
1382     * @throws SQLException
1383     *             a database error occurred.
1384     */
1385    public String getNumericFunctions() throws SQLException;
1386
1387    /**
1388     * Returns a list of the primary key columns of a specified table.
1389     * <p>
1390     * The list is returned as a {@code ResultSet} with one row for each primary
1391     * key column, ordered by {@code COLUMN_NAME}, with each row having the
1392     * structure as follows:
1393     * <ol>
1394     * <li>{@code TABLE_CAT} - String - table catalog name (possibly null)</li>
1395     * <li>{@code TABLE_SCHEM} - String - table schema name (possibly null)</li>
1396     * <li>{@code TABLE_NAME} - String - The table name</li>
1397     * <li>{@code COLUMN_NAME} - String - The column name</li>
1398     * <li>{@code KEY_SEQ} - short - the sequence number for this column in the
1399     * primary key</li>
1400     * <li>{@code PK_NAME} - String - the primary key name (possibly null)</li>
1401     * </ol>
1402     *
1403     * @param catalog
1404     *            a catalog name. {@code null} is used to imply no narrowing of
1405     *            the search by catalog name. Otherwise, the name must match a
1406     *            catalog name held in the database, with the empty string used
1407     *            to retrieve those without a catalog name.
1408     * @param schema
1409     *            a schema name. {@code null} is used to imply no narrowing of
1410     *            the search by schema name. Otherwise, the name must match a
1411     *            schema name in the database, with the empty string used to
1412     *            retrieve those without a schema name.
1413     * @param table
1414     *            the name of a table, which must match the name of a table in
1415     *            the database.
1416     * @return a {@code ResultSet} containing the list of keys in the format
1417     *         defined above.
1418     * @throws SQLException
1419     *             a database error occurred.
1420     */
1421    public ResultSet getPrimaryKeys(String catalog, String schema, String table)
1422            throws SQLException;
1423
1424    /**
1425     * Returns a list of parameter and result columns for the stored procedures
1426     * belonging to a specified catalog.
1427     * <p>
1428     * The list is returned as a {@code ResultSet} with one row for each
1429     * parameter or result column. The data is ordered by {@code
1430     * PROCEDURE_SCHEM} and {@code PROCEDURE_NAME}, while for each procedure,
1431     * the return value (if any) is first, followed by the parameters in the
1432     * order they appear in the stored procedure call, followed by {@code
1433     * ResultSet} columns in column number order. Each row has the following
1434     * structure:
1435     * <ol>
1436     * <li>{@code PROCEDURE_CAT} - String - the procedure catalog name</li>
1437     * <li>{@code PROCEDURE_SCHEM} - String - the procedure schema name
1438     * (possibly null)</li>
1439     * <li>{@code PROCEDURE_NAME} - String - the procedure name</li>
1440     * <li>{@code COLUMN_NAME} - String - the name of the column</li>
1441     * <li>{@code COLUMN_TYPE} - short - the kind of column or parameter, as
1442     * follows:
1443     * <ul>
1444     * <li>{@code DatabaseMetaData.procedureColumnUnknown} - type unknown</li>
1445     * <li>{@code DatabaseMetaData.procedureColumnIn} - an {@code IN} parameter</li>
1446     * <li>{@code DatabaseMetaData.procedureColumnInOut} - an {@code INOUT}
1447     * parameter</li>
1448     * <li>{@code DatabaseMetaData.procedureColumnOut} - an {@code OUT}
1449     * parameter</li>
1450     * <li>{@code DatabaseMetaData.procedureColumnReturn} - a return value</li>
1451     * <li>{@code DatabaseMetaData.procedureReturnsResult} - a result column in
1452     * a result set</li>
1453     * </ul>
1454     * </li>
1455     * <li>{@code DATA_TYPE} - int - the SQL type of the data, as in {@code
1456     * java.sql.Types}</li>
1457     * <li>{@code TYPE_NAME} - String - the SQL type name, for a UDT it is fully
1458     * qualified</li>
1459     * <li>{@code PRECISION} - int - the precision</li>
1460     * <li>{@code LENGTH} - int - the length of the data in bytes</li>
1461     * <li>{@code SCALE} - short - the scale for numeric types</li>
1462     * <li>{@code RADIX} - short - the Radix for numeric data (typically 2 or
1463     * 10)</li>
1464     * <li>{@code NULLABLE} - short - can the data contain {@code null}:
1465     * <ul>
1466     * <li>{@code DatabaseMetaData.procedureNoNulls} - {@code NULL}s not
1467     * permitted</li>
1468     * <li>{@code DatabaseMetaData.procedureNullable} - {@code NULL}s are
1469     * permitted</li>
1470     * <li>{@code DatabaseMetaData.procedureNullableUnknown} - {@code NULL}
1471     * status unknown</li>
1472     * </ul>
1473     * </li>
1474     * <li>{@code REMARKS} - String - an explanatory comment about the data item
1475     * </li>
1476     * </ol>
1477     *
1478     * @param catalog
1479     *            a catalog name. {@code null} is used to imply no narrowing of
1480     *            the search by catalog name. Otherwise, the name must match a
1481     *            catalog name held in the database, with "" used to retrieve
1482     *            those without a catalog name.
1483     * @param schemaPattern
1484     *            a schema name pattern. {@code null} is used to imply no
1485     *            narrowing of the search by schema name. Otherwise, the name
1486     *            must match a schema name in the database, with "" used to
1487     *            retrieve those without a schema name.
1488     * @param procedureNamePattern
1489     *            a pattern that must match the name of the procedure stored in
1490     *            the database.
1491     * @param columnNamePattern
1492     *            a column name pattern. The name must match the column name
1493     *            stored in the database.
1494     * @return a {@code ResultSet} with the list of parameter and result columns
1495     *         in the format defined above.
1496     * @throws SQLException
1497     *             a database error occurred.
1498     */
1499    public ResultSet getProcedureColumns(String catalog, String schemaPattern,
1500            String procedureNamePattern, String columnNamePattern)
1501            throws SQLException;
1502
1503    /**
1504     * Returns a list of the stored procedures available in a specified catalog.
1505     * <p>
1506     * The list is returned as a {@code ResultSet} with one row for each stored
1507     * procedure, ordered by PROCEDURE_SCHEM and PROCEDURE_NAME, with the data
1508     * in each row as follows:
1509     * <ol>
1510     * <li>{@code PROCEDURE_CAT} - String : the procedure catalog name</li>
1511     * <li>{@code PROCEDURE_SCHEM} - String : the procedure schema name
1512     * (possibly {@code null})</li>
1513     * <li>{@code PROCEDURE_NAME} - String : the procedure name</li>
1514     * <li>{@code Reserved}</li>
1515     * <li>{@code Reserved}</li>
1516     * <li>{@code Reserved}</li>
1517     * <li>{@code REMARKS} - String - information about the procedure</li>
1518     * <li>{@code PROCEDURE_TYPE} - short : one of:
1519     * <ul>
1520     * <li>{@code DatabaseMetaData.procedureResultUnknown} - procedure may
1521     * return a result</li>
1522     * <li>{@code DatabaseMetaData.procedureNoResult} - procedure does not
1523     * return a result</li>
1524     * <li>{@code DatabaseMetaData.procedureReturnsResult} - procedure
1525     * definitely returns a result</li>
1526     * </ul>
1527     * </li>
1528     * </ol>
1529     *
1530     * @param catalog
1531     *            a catalog name. {@code null} is used to imply no narrowing of
1532     *            the search by catalog name. Otherwise, the name must match a
1533     *            catalog name held in the database, with "" used to retrieve
1534     *            those without a catalog name.
1535     * @param schemaPattern
1536     *            a schema name pattern. {@code null} is used to imply no
1537     *            narrowing of the search by schema name. Otherwise, the name
1538     *            must match a schema name in the database, with "" used to
1539     *            retrieve those without a schema name.
1540     * @param procedureNamePattern
1541     *            a procedure name pattern, which must match the procedure name
1542     *            stored in the database.
1543     * @return a {@code ResultSet} where each row is a description of a stored
1544     *         procedure in the format defined above.
1545     * @throws SQLException
1546     *             a database error occurred.
1547     */
1548    public ResultSet getProcedures(String catalog, String schemaPattern,
1549            String procedureNamePattern) throws SQLException;
1550
1551    /**
1552     * Returns 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     * Returns the result set's default holdability.
1562     *
1563     * @return one of {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code
1564     *         ResultSet.CLOSE_CURSORS_AT_COMMIT}.
1565     * @throws SQLException
1566     *             a database error occurred.
1567     */
1568    public int getResultSetHoldability() throws SQLException;
1569
1570    /**
1571     * Returns a list of the schema names in the database. The list is returned
1572     * as a {@code ResultSet}, ordered by the schema name, with one row per
1573     * schema in the following format:
1574     * <ol>
1575     * <li>{@code TABLE_SCHEM} - String - the schema name</li> <li>{@code
1576     * TABLE_CATALOG} - String - the catalog name (possibly {@code null}) </li>
1577     * </ol>
1578     *
1579     * @return a {@code ResultSet} with one row for each schema in the format
1580     *         defined above.
1581     * @throws SQLException
1582     *             a database error occurred.
1583     */
1584    public ResultSet getSchemas() throws SQLException;
1585
1586    /**
1587     * Returns the database vendor's preferred term for "schema".
1588     *
1589     * @return a String which is the vendor's preferred term for schema.
1590     * @throws SQLException
1591     *             a database error occurred.
1592     */
1593    public String getSchemaTerm() throws SQLException;
1594
1595    /**
1596     * Returns the string that is used to escape wildcard characters. This
1597     * string is used to escape the {@code '_'} and {@code '%'} wildcard
1598     * characters in catalog search pattern strings. {@code '_'} is used to represent any single
1599     * character while {@code '%'} is used for a sequence of zero or more
1600     * characters.
1601     *
1602     * @return a String used to escape the wildcard characters.
1603     * @throws SQLException
1604     *             a database error occurred.
1605     */
1606    public String getSearchStringEscape() throws SQLException;
1607
1608    /**
1609     * Returns a list of all the SQL keywords that are NOT also SQL92 keywords
1610     * for the database.
1611     *
1612     * @return a String containing the list of SQL keywords in a comma separated
1613     *         format.
1614     * @throws SQLException
1615     *             a database error occurred.
1616     */
1617    public String getSQLKeywords() throws SQLException;
1618
1619    /**
1620     * States the type of {@code SQLState} value returned by {@code
1621     * SQLException.getSQLState}. This can either be the X/Open (now known as
1622     * Open Group) SQL CLI form or the SQL99 form.
1623     *
1624     * @return an integer, which is either {@code
1625     *         DatabaseMetaData.sqlStateSQL99} or {@code
1626     *         DatabaseMetaData.sqlStateXOpen}.
1627     * @throws SQLException
1628     *             a database error occurred.
1629     */
1630    public int getSQLStateType() throws SQLException;
1631
1632    /**
1633     * Returns 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     * Returns 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 tables and corresponding subtables must be defined in the same catalog and schema. The
1650     * list is returned as a {@code ResultSet}, with one row for each table that
1651     * has a super table, in the following format:
1652     * <ol>
1653     * <li>{@code TABLE_CAT} - String - table catalog name (possibly {@code
1654     * null})</li>
1655     * <li>{@code TABLE_SCHEM} - String - Table schema name (possibly {@code
1656     * null})</li>
1657     * <li>{@code TABLE_NAME} - String - The table name</li>
1658     * <li>SUPER{@code TABLE_NAME} - String - The super table name</li>
1659     * </ol>
1660     *
1661     * @param catalog
1662     *            a catalog name. {@code null} is used to imply no narrowing of
1663     *            the search by catalog name. Otherwise, the name must match a
1664     *            catalog name held in the database, with "" used to retrieve
1665     *            those without a catalog name.
1666     * @param schemaPattern
1667     *            a schema name pattern. {@code null} is used to imply no
1668     *            narrowing of the search by schema name. Otherwise, the name
1669     *            must match a schema name in the database, with "" used to
1670     *            retrieve those without a schema name.
1671     * @param tableNamePattern
1672     *            a table name, which should match the table name as stored in
1673     *            the database. it may be a fully qualified name. If it is fully
1674     *            qualified the catalog name and schema name parameters are
1675     *            ignored.
1676     * @return a {@code ResultSet} with one row for each table which has a super
1677     *         table, in the format defined above. An empty {@code ResultSet} is
1678     *         returned if the database does not support table hierarchies.
1679     * @throws SQLException
1680     *             a database error occurred.
1681     */
1682    public ResultSet getSuperTables(String catalog, String schemaPattern,
1683            String tableNamePattern) throws SQLException;
1684
1685    /**
1686     * Returns the User Defined Type (UDT) hierarchies for a given schema. Only
1687     * the immediate parent/child relationship is described. If a UDT does not
1688     * have a direct supertype, it is not listed.
1689     * <p>
1690     * The listing is returned as a {@code ResultSet} where there is one row for
1691     * a specific UDT which describes its supertype, with the data organized in
1692     * columns as follows:
1693     * <ol>
1694     * <li>{@code TYPE_CAT} - String - the UDT catalog name (possibly {@code
1695     * null})</li>
1696     * <li>{@code TYPE_SCHEM} - String - the UDT schema name (possibly {@code
1697     * null})</li>
1698     * <li>{@code TYPE_NAME} - String - the UDT type name</li>
1699     * <li>SUPER{@code TYPE_CAT} - String - direct supertype's catalog name
1700     * (possibly {@code null})</li>
1701     * <li>SUPER{@code TYPE_SCHEM} - String - direct supertype's schema name
1702     * (possibly {@code null})</li>
1703     * <li>SUPER{@code TYPE_NAME} - String - direct supertype's name</li>
1704     * </ol>
1705     *
1706     * @param catalog
1707     *            the catalog name. "" means get the UDTs without a catalog.
1708     *            {@code null} means don't use the catalog name to restrict the
1709     *            search.
1710     * @param schemaPattern
1711     *            the Schema pattern name. "" means get the UDT's without a
1712     *            schema.
1713     * @param typeNamePattern
1714     *            the UDT name pattern. This may be a fully qualified name. When
1715     *            a fully qualified name is specified, the catalog name and
1716     *            schema name parameters are ignored.
1717     * @return a {@code ResultSet} in which each row gives information about a
1718     *         particular UDT in the format defined above. An empty ResultSet is
1719     *         returned for a database that does not support type hierarchies.
1720     * @throws SQLException
1721     *             a database error occurred.
1722     */
1723    public ResultSet getSuperTypes(String catalog, String schemaPattern,
1724            String typeNamePattern) throws SQLException;
1725
1726    /**
1727     * Returns a list of system functions available with the database. These are
1728     * names used in the JDBC function escape clause and are Open Group CLI
1729     * function names.
1730     *
1731     * @return a String containing the list of system functions in a comma
1732     *         separated format.
1733     * @throws SQLException
1734     *             a database error occurred.
1735     */
1736    public String getSystemFunctions() throws SQLException;
1737
1738    /**
1739     * Returns a description of access rights for each table present in a
1740     * catalog. Table privileges can apply to one or more columns in the table -
1741     * but are not guaranteed to apply to all columns.
1742     * <p>
1743     * The privileges are returned as a {@code ResultSet}, with one row for each
1744     * privilege, ordered by {@code TABLE_SCHEM}, {@code TABLE_NAME}, {@code
1745     * PRIVILEGE}, and each row has data as defined in the following column
1746     * definitions:
1747     * <ol>
1748     * <li>{@code TABLE_CAT} - String - table catalog name (possibly {@code
1749     * null})</li>
1750     * <li>{@code TABLE_SCHEM} - String - Table schema name (possibly {@code
1751     * null})</li>
1752     * <li>{@code TABLE_NAME} - String - The table name</li>
1753     * <li>GRANTOR - String - who granted the access</li>
1754     * <li>GRANTEE - String - who received the access grant</li>
1755     * <li>PRIVILEGE - String - the type of access granted - one of SELECT,
1756     * INSERT, UPDATE, REFERENCES,...</li>
1757     * <li>IS_GRANTABLE - String - {@code "YES"} implies the grantee can grant
1758     * access to others, {@code "NO"} implies guarantee cannot grant access to
1759     * others, {@code null} means this status is unknown</li>
1760     * </ol>
1761     *
1762     * @param catalog
1763     *            a catalog name. {@code null} is used to imply no narrowing of
1764     *            the search by catalog name. Otherwise, the name must match a
1765     *            catalog name held in the database, with "" used to retrieve
1766     *            those without a catalog name.
1767     * @param schemaPattern
1768     *            a schema name pattern. {@code null} is used to imply no
1769     *            narrowing of the search by schema name. Otherwise, the name
1770     *            must match a schema name in the database, with "" used to
1771     *            retrieve those without a schema name.
1772     * @param tableNamePattern
1773     *            a Table Name, which should match the table name as stored in
1774     *            the database.
1775     * @return a {@code ResultSet} containing a list with one row for each table
1776     *         in the format defined above.
1777     * @throws SQLException
1778     *             a database error occurred.
1779     */
1780    public ResultSet getTablePrivileges(String catalog, String schemaPattern,
1781            String tableNamePattern) throws SQLException;
1782
1783    /**
1784     * Returns a description of the tables in a specified catalog.
1785     * <p>
1786     * The descriptions are returned as rows in a {@code ResultSet}, one row for
1787     * each Table. The ResultSet is ordered by {@code TABLE_TYPE}, {@code
1788     * TABLE_SCHEM} and {@code TABLE_NAME}. Each row in the ResultSet consists
1789     * of a series of columns as follows:
1790     * <ol>
1791     * <li>{@code TABLE_CAT} - String - table catalog name (possibly {@code
1792     * null})</li>
1793     * <li>{@code TABLE_SCHEM} - String - Table schema name (possibly {@code
1794     * null})</li>
1795     * <li>{@code TABLE_NAME} - String - The table name</li>
1796     * <li>{@code TABLE_TYPE} - String - Typical names include "TABLE", "VIEW",
1797     * "SYSTEM TABLE", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY"</li>
1798     * <li>{@code REMARKS} - String - A comment describing the table</li>
1799     * <li>{@code TYPE_CAT} - String - the 'Types' catalog(possibly {@code null}
1800     * )</li>
1801     * <li>{@code TYPE_SCHEM} - String - the 'Types' schema(possibly {@code
1802     * null})</li>
1803     * <li>{@code TYPE_NAME} - String - the 'Types' name (possibly {@code null})
1804     * </li>
1805     * <li>{@code SELF_REFERENCING_COL_NAME} - String - the name of a designated
1806     * identifier column in a typed table (possibly {@code null})</li>
1807     * <li>REF_GENERATION - String - one of the following values : "SYSTEM" |
1808     * "USER" | "DERIVED" - specifies how values in the {@code
1809     * SELF_REFERENCING_COL_NAME} are created (possibly {@code null})</li>
1810     * </ol>
1811     *
1812     * @param catalog
1813     *            a catalog name. {@code null} is used to imply no narrowing of
1814     *            the search by catalog name. Otherwise, the name must match a
1815     *            catalog name held in the database, with "" used to retrieve
1816     *            those without a catalog name.
1817     * @param schemaPattern
1818     *            a schema name pattern. {@code null} is used to imply no
1819     *            narrowing of the search by schema name. Otherwise, the name
1820     *            must match a schema name in the database, with "" used to
1821     *            retrieve those without a schema name.
1822     * @param tableNamePattern
1823     *            a table name, which should match the table name as stored in
1824     *            the database.
1825     * @param types
1826     *            a list of table types to include in the list. {@code null}
1827     *            implies list all types.
1828     * @return a {@code ResultSet} with one row per table in the format defined
1829     *         above.
1830     * @throws SQLException
1831     *             a database error occurred.
1832     */
1833    public ResultSet getTables(String catalog, String schemaPattern,
1834            String tableNamePattern, String[] types) throws SQLException;
1835
1836    /**
1837     * Returns a list of table types supported by the database.
1838     * <p>
1839     * The list is returned as a {@code ResultSet} with one row per table type,
1840     * ordered by the table type. The information in the {@code ResultSet} is
1841     * structured into a single column per row, as follows:
1842     * <ol>
1843     * <li>{@code TABLE_TYPE} - String - the table type. Typical names include
1844     * {@code "TABLE"}, {@code "VIEW"}, "{@code SYSTEM TABLE"}, {@code "ALIAS"},
1845     * {@code "SYNONYM"}, {@code "GLOBAL TEMPORARY"}</li>
1846     * </ol>
1847     *
1848     * @return a {@code ResultSet} with one row per table type in the format
1849     *         defined above.
1850     * @throws SQLException
1851     *             a database error occurred.
1852     */
1853    public ResultSet getTableTypes() throws SQLException;
1854
1855    /**
1856     * Returns a list of time and date functions available for the database.
1857     *
1858     * @return a string containing a comma separated list of the time and date
1859     *         functions.
1860     * @throws SQLException
1861     *             a database error occurred.
1862     */
1863    public String getTimeDateFunctions() throws SQLException;
1864
1865    /**
1866     * Get a list of the standard SQL types supported by this database. The list
1867     * is returned as a {@code ResultSet}, with one row for each type, ordered
1868     * by the {@code DATA_TYPE} value, where the data in each row is structured
1869     * into the following columns:
1870     * <ol>
1871     * <li>{@code TYPE_NAME} - String : the type name</li>
1872     * <li>{@code DATA_TYPE} - int : the SQL data type value as defined in
1873     * {@code java.sql.Types}</li>
1874     * <li>{@code PRECISION} - int - the maximum precision of the type</li>
1875     * <li>{@code LITERAL_PREFIX} - String : the prefix to be used when quoting
1876     * a literal value (possibly {@code null})</li>
1877     * <li>{@code LITERAL_SUFFIX} - String : the suffix to be used when quoting
1878     * a literal value (possibly {@code null})</li>
1879     * <li>{@code CREATE_PARAMS} - String : params used when creating the type
1880     * (possibly {@code null})</li>
1881     * <li>{@code NULLABLE} - short : shows if the value is nullable:
1882     * <ul>
1883     * <li>{@code DatabaseMetaData.typeNoNulls} : {@code NULL}s not permitted</li>
1884     * <li>{@code DatabaseMetaData.typeNullable} : {@code NULL}s are permitted</li>
1885     * <li>{@code DatabaseMetaData.typeNullableUnknown} : {@code NULL} status
1886     * unknown</li>
1887     * </ul>
1888     * </li>
1889     * <li>{@code CASE_SENSITIVE} - boolean : true if the type is case sensitive
1890     * </li>
1891     * <li>{@code SEARCHABLE} - short : how this type can be used with {@code WHERE}
1892     * clauses:
1893     * <ul>
1894     * <li>{@code DatabaseMetaData.typePredNone} - {@code WHERE} clauses cannot be used</li>
1895     * <li>{@code DatabaseMetaData.typePredChar} - support for {@code
1896     * WHERE...LIKE} only</li>
1897     * <li>{@code DatabaseMetaData.typePredBasic} - support except for {@code
1898     * WHERE...LIKE}</li>
1899     * <li>{@code DatabaseMetaData.typeSearchable} - support for all {@code
1900     * WHERE} clauses</li>
1901     * </ul>
1902     * </li>
1903     * <li>{@code UNSIGNED_ATTRIBUTE} - boolean - the type is unsigned or not</li>
1904     * <li>{@code FIXED_PREC_SCALE} - boolean - fixed precision = it can be used
1905     * as a money value</li>
1906     * <li>{@code AUTO_INCREMENT} - boolean - can be used as an auto-increment
1907     * value</li>
1908     * <li>{@code LOCAL_TYPE_NAME} - String - a localized version of the type
1909     * name (possibly {@code null})</li>
1910     * <li>{@code MINIMUM_SCALE} - short - the minimum scale supported</li>
1911     * <li>{@code MAXIMUM_SCALE} - short - the maximum scale supported</li>
1912     * <li>{@code SQL_DATA_TYPE} - int - not used</li>
1913     * <li>{@code SQL_DATETIME_SUB} - int - not used</li>
1914     * <li>{@code NUM_PREC_RADIX} - int - number radix (typically 2 or 10)</li>
1915     * </ol>
1916     *
1917     * @return a {@code ResultSet} which is structured as described above.
1918     * @throws SQLException
1919     *             a database error occurred.
1920     */
1921    public ResultSet getTypeInfo() throws SQLException;
1922
1923    /**
1924     * Returns a description of the User Defined Types (UDTs) defined in a given
1925     * schema, which includes the types {@code DISTINCT}, {@code STRUCT} and
1926     * {@code JAVA_OBJECT}.
1927     * <p>
1928     * The types matching the supplied the specified catalog, schema, type name
1929     * and type are returned as rows in a {@code ResultSet} with columns of
1930     * information as follows:
1931     * <ol>
1932     * <li>{@code TABLE_CAT} - String - catalog name (possibly {@code null})</li>
1933     * <li>{@code TABLE_SCHEM} - String - schema name (possibly {@code null})</li>
1934     * <li>{@code TABLE_NAME} - String - The table name</li>
1935     * <li>{@code CLASS_NAME} - String - The Java class name</li>
1936     * <li>{@code DATA_TYPE} - int - The SQL type as specified in {@code
1937     * java.sql.Types}. One of DISTINCT, STRUCT, and JAVA_OBJECT</li>
1938     * <li>{@code REMARKS} - String - A comment which describes the type</li>
1939     * <li>{@code BASE_TYPE} - short - A type code. For a DISTINCT type, the
1940     * source type. For a structured type this is the type that implements the
1941     * user generated reference type of the {@code SELF_REFERENCING_COLUMN}.
1942     * This is defined in {@code java.sql.Types}, and will be {@code null} if
1943     * the {@code DATA_TYPE} does not match these criteria.</li>
1944     * </ol>
1945     * <p>
1946     * If the driver does not support UDTs, the {@code ResultSet} is empty.
1947     *
1948     * @param catalog
1949     *            a catalog name. {@code null} is used to imply no narrowing of
1950     *            the search by catalog name. Otherwise, the name must match a
1951     *            catalog name held in the database, with "" used to retrieve
1952     *            those without a catalog name.
1953     * @param schemaPattern
1954     *            a schema name pattern. {@code null} is used to imply no
1955     *            narrowing of the search using schema name. Otherwise, the name
1956     *            must match a schema name in the database, with "" used to
1957     *            retrieve those without a schema name.
1958     * @param typeNamePattern
1959     *            a type name pattern, which should match a type name as stored in the
1960     *            database. It may be fully qualified.
1961     * @param types
1962     *            a list of the UDT types to include in the list - one of
1963     *            {@code DISTINCT}, {@code STRUCT} or {@code JAVA_OBJECT}.
1964     * @return a {@code ResultSet} in the format described above.
1965     * @throws SQLException
1966     *             a database error occurred.
1967     */
1968    public ResultSet getUDTs(String catalog, String schemaPattern,
1969            String typeNamePattern, int[] types) throws SQLException;
1970
1971    /**
1972     * Returns the URL for this database.
1973     *
1974     * @return the URL for the database. {@code null} if it cannot be generated.
1975     * @throws SQLException
1976     *             a database error occurred.
1977     */
1978    public String getURL() throws SQLException;
1979
1980    /**
1981     * Determine the user name as known by the database.
1982     *
1983     * @return the user name.
1984     * @throws SQLException
1985     *             a database error occurred.
1986     */
1987    public String getUserName() throws SQLException;
1988
1989    /**
1990     * Returns which of a table's columns are automatically updated when any
1991     * value in a row is updated.
1992     * <p>
1993     * The result is laid-out in the following columns:
1994     * <ol>
1995     * <li>{@code SCOPE} - short - not used</li>
1996     * <li>{@code COLUMN_NAME} - String - Column name</li>
1997     * <li>{@code DATA_TYPE} - int - The SQL data type, as defined in {@code
1998     * java.sql.Types}</li>
1999     * <li>{@code TYPE_NAME} - String - The SQL type name, data source dependent
2000     * </li>
2001     * <li>{@code COLUMN_SIZE} - int - Precision for numeric types</li>
2002     * <li>{@code BUFFER_LENGTH} - int - Length of a column value in bytes</li>
2003     * <li>{@code DECIMAL_DIGITS} - short - Number of digits after the decimal
2004     * point</li>
2005     * <li>{@code PSEUDO_COLUMN} - short - If this is a pseudo-column (for
2006     * example, an Oracle {@code ROWID}):
2007     * <ul>
2008     * <li>{@code DatabaseMetaData.bestRowUnknown} - don't know whether this is
2009     * a pseudo column</li>
2010     * <li>{@code DatabaseMetaData.bestRowNotPseudo} - column is not pseudo</li>
2011     * <li>{@code DatabaseMetaData.bestRowPseudo} - column is a pseudo column</li>
2012     * </ul>
2013     * </li>
2014     * </ol>
2015     *
2016     * @param catalog
2017     *            a catalog name. {@code null} is used to imply no narrowing of
2018     *            the search using catalog name. Otherwise, the name must match
2019     *            a catalog name held in the database, with "" used to retrieve
2020     *            those without a catalog name.
2021     * @param schema
2022     *            a schema name pattern. {@code null} is used to imply no
2023     *            narrowing of the search using schema names. Otherwise, the
2024     *            name must match a schema name in the database, with "" used to
2025     *            retrieve those without a schema name.
2026     * @param table
2027     *            a table name. It must match the name of a table in the
2028     *            database.
2029     * @return a {@code ResultSet} containing the descriptions, one row for each
2030     *         column, in the format defined above.
2031     * @throws SQLException
2032     *             a database error occurred.
2033     */
2034    public ResultSet getVersionColumns(String catalog, String schema,
2035            String table) throws SQLException;
2036
2037    /**
2038     * Determines whether a visible row insert can be detected by calling {@code
2039     * ResultSet.rowInserted}.
2040     *
2041     * @param type
2042     *            the {@code ResultSet} type. This may be one of {@code
2043     *            ResultSet.TYPE_SCROLL_SENSITIVE} or {@code
2044     *            ResultSet.TYPE_SCROLL_INSENSITIVE} or {@code
2045     *            ResultSet.TYPE_FORWARD_ONLY},
2046     * @return {@code true} if {@code ResultSet.rowInserted} detects a visible
2047     *         row insert otherwise {@code false}.
2048     * @throws SQLException
2049     *             a database error occurred.
2050     * @see ResultSet#rowInserted()
2051     */
2052    public boolean insertsAreDetected(int type) throws SQLException;
2053
2054    /**
2055     * Determine whether a fully qualified table name is prefixed or suffixed to
2056     * a fully qualified table name.
2057     *
2058     * @return {@code true} if the catalog appears at the start of a fully
2059     *         qualified table name, {@code false} otherwise.
2060     * @throws SQLException
2061     *             a database error occurred.
2062     */
2063    public boolean isCatalogAtStart() throws SQLException;
2064
2065    /**
2066     * Determines whether the database is in read-only mode.
2067     *
2068     * @return {@code true} if the database is in read-only mode, {@code false}
2069     *         otherwise.
2070     * @throws SQLException
2071     *             a database error occurred.
2072     */
2073    public boolean isReadOnly() throws SQLException;
2074
2075    /**
2076     * Determines whether updates are made to a copy of, or directly on, Large Objects
2077     * ({@code LOB}s).
2078     *
2079     * @return {@code true} if updates are made to a copy of the Large Object,
2080     *         {@code false} otherwise.
2081     * @throws SQLException
2082     *             a database error occurred.
2083     */
2084    public boolean locatorsUpdateCopy() throws SQLException;
2085
2086    /**
2087     * Determines whether the database handles concatenations between {@code NULL} and
2088     * non-{@code NULL} values by producing a {@code NULL} output.
2089     *
2090     * @return {@code true} if {@code NULL} to non-{@code NULL} concatenations
2091     *         produce a {@code NULL} result, {@code false} otherwise.
2092     * @throws SQLException
2093     *             a database error occurred.
2094     */
2095    public boolean nullPlusNonNullIsNull() throws SQLException;
2096
2097    /**
2098     * Determines whether {@code NULL} values are always sorted to the end of sorted
2099     * results regardless of requested sort order. This means that they will
2100     * appear at the end of sorted lists whatever other non-{@code NULL} values
2101     * may be present.
2102     *
2103     * @return {@code true} if {@code NULL} values are sorted at the end,
2104     *         {@code false} otherwise.
2105     * @throws SQLException
2106     *             a database error occurred.
2107     */
2108    public boolean nullsAreSortedAtEnd() throws SQLException;
2109
2110    /**
2111     * Determines whether {@code NULL} values are always sorted at the start of the
2112     * sorted list, irrespective of the sort order. This means that they appear
2113     * at the start of sorted lists, whatever other values may be present.
2114     *
2115     * @return {@code true} if {@code NULL} values are sorted at the start,
2116     *         {@code false} otherwise.
2117     * @throws SQLException
2118     *             a database error occurred.
2119     */
2120    public boolean nullsAreSortedAtStart() throws SQLException;
2121
2122    /**
2123     * Determines whether {@code NULL} values are sorted high - i.e. they are sorted
2124     * as if they are higher than any other values.
2125     *
2126     * @return {@code true} if {@code NULL} values are sorted high, {@code
2127     *         false} otherwise.
2128     * @throws SQLException
2129     *             a database error occurred.
2130     */
2131    public boolean nullsAreSortedHigh() throws SQLException;
2132
2133    /**
2134     * Determines whether {@code NULL} values are sorted low - i.e. they are sorted as
2135     * if they are lower than any other values.
2136     *
2137     * @return {@code true} if {@code NULL} values are sorted low, {@code false}
2138     *         otherwise.
2139     * @throws SQLException
2140     *             a database error occurred.
2141     */
2142    public boolean nullsAreSortedLow() throws SQLException;
2143
2144    /**
2145     * Determines whether deletes made by others are visible, for a specified {@code
2146     * ResultSet} type.
2147     *
2148     * @param type
2149     *            the type of the {@code ResultSet}. It may be either {@code
2150     *            ResultSet.TYPE_FORWARD_ONLY} or {@code
2151     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2152     *            ResultSet.TYPE_SCROLL_SENSITIVE})
2153     * @return {@code true} if others' deletes are visible, {@code false}
2154     *         otherwise.
2155     * @throws SQLException
2156     *             a database error occurred.
2157     */
2158    public boolean othersDeletesAreVisible(int type) throws SQLException;
2159
2160    /**
2161     * Determines whether inserts made by others are visible, for a specified {@code
2162     * ResultSet} type.
2163     *
2164     * @param type
2165     *            the type of the {@code ResultSet}. May be {@code
2166     *            ResultSet.TYPE_FORWARD_ONLY}, or {@code
2167     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2168     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2169     * @return {@code true} if others' inserts are visible, otherwise {@code
2170     *         false}.
2171     * @throws SQLException
2172     *             a database error occurred.
2173     */
2174    public boolean othersInsertsAreVisible(int type) throws SQLException;
2175
2176    /**
2177     * Determines whether updates made by others are visible, for a specified {@code
2178     * ResultSet} type.
2179     *
2180     * @param type
2181     *            the type of the {@code ResultSet}. May be {@code
2182     *            ResultSet.TYPE_FORWARD_ONLY}, or {@code
2183     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2184     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2185     * @return {@code true} if others' inserts are visible, otherwise {@code
2186     *         false}.
2187     * @throws SQLException
2188     *             a database error occurred.
2189     */
2190    public boolean othersUpdatesAreVisible(int type) throws SQLException;
2191
2192    /**
2193     * Determines whether a {@code ResultSet} can see its own deletes, for a
2194     * specified {@code ResultSet} type.
2195     *
2196     * @param type
2197     *            the type of the {@code ResultSet}: {@code
2198     *            ResultSet.TYPE_FORWARD_ONLY}, {@code
2199     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2200     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2201     * @return {@code true} if the deletes are seen by the {@code
2202     *         ResultSet} itself, otherwise {@code false}.
2203     * @throws SQLException
2204     *             a database error occurred.
2205     */
2206    public boolean ownDeletesAreVisible(int type) throws SQLException;
2207
2208    /**
2209     * Determines whether a {@code ResultSet} can see its own inserts, for a
2210     * specified {@code ResultSet} type.
2211     *
2212     * @param type
2213     *            the type of the {@code ResultSet}: {@code
2214     *            ResultSet.TYPE_FORWARD_ONLY}, {@code
2215     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2216     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2217     * @return {@code true} if the inserts are seen by the {@code
2218     *         ResultSet} itself, otherwise {@code false}.
2219     * @throws SQLException
2220     *             a database error occurred.
2221     */
2222    public boolean ownInsertsAreVisible(int type) throws SQLException;
2223
2224    /**
2225     * Determines whether a {@code ResultSet} can see its own updates, for a
2226     * specified {@code ResultSet} type.
2227     *
2228     * @param type
2229     *            the type of the {@code ResultSet}: {@code
2230     *            ResultSet.TYPE_FORWARD_ONLY}, {@code
2231     *            ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2232     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2233     * @return {@code true} if the updates are seen by the {@code
2234     *         ResultSet} itself, otherwise {@code false}.
2235     * @throws SQLException
2236     *             a database error occurred.
2237     */
2238    public boolean ownUpdatesAreVisible(int type) throws SQLException;
2239
2240    /**
2241     * Determines whether the database treats SQL identifiers that are in mixed
2242     * case (and unquoted) as case insensitive. If {@code true} then the
2243     * database stores them in lower case.
2244     *
2245     * @return {@code true} if unquoted SQL identifiers are stored in lower
2246     *         case, {@code false} otherwise.
2247     * @throws SQLException
2248     *             a database error occurred.
2249     */
2250    public boolean storesLowerCaseIdentifiers() throws SQLException;
2251
2252    /**
2253     * Determines whether the database considers mixed case quoted SQL
2254     * identifiers as case insensitive and stores them in lower case.
2255     *
2256     * @return {@code true} if quoted SQL identifiers are stored in lower case,
2257     *         {@code false} otherwise.
2258     * @throws SQLException
2259     *             a database error occurred.
2260     */
2261    public boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
2262
2263    /**
2264     * Determines whether the database considers mixed case unquoted SQL
2265     * identifiers as case insensitive and stores them in mixed case.
2266     *
2267     * @return {@code true} if unquoted SQL identifiers as stored in mixed case,
2268     *         {@code false} otherwise.
2269     * @throws SQLException
2270     *             a database error occurred.
2271     */
2272    public boolean storesMixedCaseIdentifiers() throws SQLException;
2273
2274    /**
2275     * Determines whether the database considers identifiers as case insensitive
2276     * if they are mixed case quoted SQL. The database stores them in mixed
2277     * case.
2278     *
2279     * @return {@code true} if quoted SQL identifiers are stored in mixed case,
2280     *         {@code false} otherwise.
2281     * @throws SQLException
2282     *             a database error occurred.
2283     */
2284    public boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
2285
2286    /**
2287     * Determines whether the database considers mixed case unquoted SQL
2288     * identifiers as case insensitive and stores them in upper case.
2289     *
2290     * @return {@code true} if unquoted SQL identifiers are stored in upper
2291     *         case, {@code false} otherwise.
2292     * @throws SQLException
2293     *             a database error occurred.
2294     */
2295    public boolean storesUpperCaseIdentifiers() throws SQLException;
2296
2297    /**
2298     * Determines whether the database considers mixed case quoted SQL
2299     * identifiers as case insensitive and stores them in upper case.
2300     *
2301     * @return {@code true} if quoted SQL identifiers are stored in upper case,
2302     *         {@code false} otherwise.
2303     * @throws SQLException
2304     *             a database error occurred.
2305     */
2306    public boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
2307
2308    /**
2309     * Determines whether the database supports {@code ALTER TABLE} operation with
2310     * {@code ADD COLUMN}.
2311     *
2312     * @return {@code true} if {@code ALTER TABLE} with {@code ADD COLUMN} is
2313     *         supported, {@code false} otherwise.
2314     * @throws SQLException
2315     *             a database error occurred.
2316     */
2317    public boolean supportsAlterTableWithAddColumn() throws SQLException;
2318
2319    /**
2320     * Determines whether the database supports {@code ALTER TABLE} operation with
2321     * {@code DROP COLUMN}.
2322     *
2323     * @return {@code true} if {@code ALTER TABLE} with {@code DROP COLUMN} is
2324     *         supported, {@code false} otherwise.
2325     * @throws SQLException
2326     *             a database error occurred.
2327     */
2328    public boolean supportsAlterTableWithDropColumn() throws SQLException;
2329
2330    /**
2331     * Determines whether the database supports the ANSI92 entry level SQL grammar.
2332     *
2333     * @return {@code true} if the ANSI92 entry level SQL grammar is supported,
2334     *         {@code false} otherwise.
2335     * @throws SQLException
2336     *             a database error occurred.
2337     */
2338    public boolean supportsANSI92EntryLevelSQL() throws SQLException;
2339
2340    /**
2341     * Determines whether the database supports the ANSI92 full SQL grammar.
2342     *
2343     * @return {@code true} if the ANSI92 full SQL grammar is supported, {@code
2344     *         false} otherwise.
2345     * @throws SQLException
2346     *             a database error occurred.
2347     */
2348    public boolean supportsANSI92FullSQL() throws SQLException;
2349
2350    /**
2351     * Determines whether the database supports the ANSI92 intermediate SQL Grammar.
2352     *
2353     * @return {@code true} if the ANSI92 intermediate SQL grammar is supported,
2354     *         {@code false} otherwise.
2355     * @throws SQLException
2356     *             a database error occurred.
2357     */
2358    public boolean supportsANSI92IntermediateSQL() throws SQLException;
2359
2360    /**
2361     * Determines whether the database supports batch updates.
2362     *
2363     * @return {@code true} if batch updates are supported, {@code false}
2364     *         otherwise.
2365     * @throws SQLException
2366     *             a database error occurred.
2367     */
2368    public boolean supportsBatchUpdates() throws SQLException;
2369
2370    /**
2371     * Determines whether catalog names may be used in data manipulation
2372     * statements.
2373     *
2374     * @return {@code true} if catalog names can be used in data manipulation
2375     *         statements, {@code false} otherwise.
2376     * @throws SQLException
2377     *             a database error occurred.
2378     */
2379    public boolean supportsCatalogsInDataManipulation() throws SQLException;
2380
2381    /**
2382     * Determines whether catalog names can be used in index definition statements.
2383     *
2384     * @return {@code true} if catalog names can be used in index definition
2385     *         statements, {@code false} otherwise.
2386     * @throws SQLException
2387     *             a database error occurred.
2388     */
2389    public boolean supportsCatalogsInIndexDefinitions() throws SQLException;
2390
2391    /**
2392     * Determines whether catalog names can be used in privilege definition
2393     * statements.
2394     *
2395     * @return {@code true} if catalog names can be used in privilege definition
2396     *         statements, {@code false} otherwise.
2397     * @throws SQLException
2398     *             a database error occurred.
2399     */
2400    public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
2401
2402    /**
2403     * Determines whether catalog names can be used in procedure call statements.
2404     *
2405     * @return {@code true} if catalog names can be used in procedure call
2406     *         statements.
2407     * @throws SQLException
2408     *             a database error occurred.
2409     */
2410    public boolean supportsCatalogsInProcedureCalls() throws SQLException;
2411
2412    /**
2413     * Determines whether catalog names may be used in table definition statements.
2414     *
2415     * @return {@code true} if catalog names can be used in definition
2416     *         statements, {@code false} otherwise.
2417     * @throws SQLException
2418     *             a database error occurred.
2419     */
2420    public boolean supportsCatalogsInTableDefinitions() throws SQLException;
2421
2422    /**
2423     * Determines whether the database supports column aliasing.
2424     * <p>
2425     * If aliasing is supported, then the SQL AS clause is used to provide names
2426     * for computed columns and provide alias names for columns.
2427     *
2428     * @return {@code true} if column aliasing is supported, {@code false}
2429     *         otherwise.
2430     * @throws SQLException
2431     *             a database error occurred.
2432     */
2433    public boolean supportsColumnAliasing() throws SQLException;
2434
2435    /**
2436     * Determines whether the database supports the {@code CONVERT} operation between
2437     * SQL types.
2438     *
2439     * @return {@code true} if the {@code CONVERT} operation is supported,
2440     *         {@code false} otherwise.
2441     * @throws SQLException
2442     *             a database error occurred.
2443     */
2444    public boolean supportsConvert() throws SQLException;
2445
2446    /**
2447     * Determines whether the database supports {@code CONVERT} operation for two
2448     * supplied SQL types.
2449     *
2450     * @param fromType
2451     *            the Type to convert from, as defined by {@code java.sql.Types}
2452     * @param toType
2453     *            the Type to convert to, as defined by {@code java.sql.Types}
2454     * @return {@code true} if the {@code CONVERT} operation is supported for
2455     *         these types, {@code false} otherwise.
2456     * @throws SQLException
2457     *             a database error occurred.
2458     */
2459    public boolean supportsConvert(int fromType, int toType)
2460            throws SQLException;
2461
2462    /**
2463     * Determines whether the database supports the Core SQL Grammar for ODBC.
2464     *
2465     * @return {@code true} if the Core SQL Grammar is supported, {@code false}
2466     *         otherwise.
2467     * @throws SQLException
2468     *             a database error occurred.
2469     */
2470    public boolean supportsCoreSQLGrammar() throws SQLException;
2471
2472    /**
2473     * Determines whether the database supports correlated sub-queries.
2474     *
2475     * @return {@code true} if the database does support correlated sub-queries
2476     *         and {@code false} otherwise.
2477     * @throws SQLException
2478     *             a database error occurred.
2479     */
2480    public boolean supportsCorrelatedSubqueries() throws SQLException;
2481
2482    /**
2483     * Determines whether the database allows both data definition and data
2484     * manipulation statements inside a transaction.
2485     *
2486     * @return {@code true} if both types of statement are permitted, {@code
2487     *         false} otherwise.
2488     * @throws SQLException
2489     *             a database error occurred.
2490     */
2491    public boolean supportsDataDefinitionAndDataManipulationTransactions()
2492            throws SQLException;
2493
2494    /**
2495     * Determines whether the database only allows data manipulation statements inside
2496     * a transaction.
2497     *
2498     * @return {@code true} if data manipulation statements are permitted only within a transaction,
2499     *         {@code false} otherwise.
2500     * @throws SQLException
2501     *             a database error occurred.
2502     */
2503    public boolean supportsDataManipulationTransactionsOnly()
2504            throws SQLException;
2505
2506    /**
2507     * Determines whether table correlation names are required to be different from
2508     * the names of the tables, when they are supported.
2509     *
2510     * @return {@code true} if correlation names must be different from table
2511     *         names, {@code false} otherwise.
2512     * @throws SQLException
2513     *             a database error occurred.
2514     */
2515    public boolean supportsDifferentTableCorrelationNames() throws SQLException;
2516
2517    /**
2518     * Determines whether expressions in {@code ORDER BY} lists are supported.
2519     *
2520     * @return {@code true} if expressions in {@code ORDER BY} lists are
2521     *         supported.
2522     * @throws SQLException
2523     *             a database error occurred.
2524     */
2525    public boolean supportsExpressionsInOrderBy() throws SQLException;
2526
2527    /**
2528     * Determines whether the Extended SQL Grammar for ODBC is supported.
2529     *
2530     * @return {@code true} if the Extended SQL Grammar is supported, {@code
2531     *         false} otherwise.
2532     * @throws SQLException
2533     *             a database error occurred.
2534     */
2535    public boolean supportsExtendedSQLGrammar() throws SQLException;
2536
2537    /**
2538     * Determines whether the database supports full nested outer joins.
2539     *
2540     * @return {@code true} if full nested outer joins are supported, {@code
2541     *         false} otherwise.
2542     * @throws SQLException
2543     *             a database error occurred.
2544     */
2545    public boolean supportsFullOuterJoins() throws SQLException;
2546
2547    /**
2548     * Determines whether auto generated keys can be returned when a statement
2549     * executes.
2550     *
2551     * @return {@code true} if auto generated keys can be returned, {@code
2552     *         false} otherwise.
2553     * @throws SQLException
2554     *             a database error occurred.
2555     */
2556    public boolean supportsGetGeneratedKeys() throws SQLException;
2557
2558    /**
2559     * Determines whether the database supports {@code GROUP BY} clauses.
2560     *
2561     * @return {@code true} if the {@code GROUP BY} clause is supported, {@code
2562     *         false} otherwise.
2563     * @throws SQLException
2564     *             a database error occurred.
2565     */
2566    public boolean supportsGroupBy() throws SQLException;
2567
2568    /**
2569     * Determines whether the database supports using a column name in a {@code GROUP
2570     * BY} clause not included in the {@code SELECT} statement as long as all of
2571     * the columns in the {@code SELECT} statement are used in the {@code GROUP
2572     * BY} clause.
2573     *
2574     * @return {@code true} if {@code GROUP BY} clauses can use column names in
2575     *         this way, {@code false} otherwise.
2576     * @throws SQLException
2577     *             a database error occurred.
2578     */
2579    public boolean supportsGroupByBeyondSelect() throws SQLException;
2580
2581    /**
2582     * Determines whether the database supports using a column name in a {@code GROUP
2583     * BY} clause that is not in the {@code SELECT} statement.
2584     *
2585     * @return {@code true} if {@code GROUP BY} clause can use a column name not
2586     *         in the {@code SELECT} statement, {@code false} otherwise.
2587     * @throws SQLException
2588     *             a database error occurred.
2589     */
2590    public boolean supportsGroupByUnrelated() throws SQLException;
2591
2592    /**
2593     * Determines whether the database supports SQL Integrity Enhancement
2594     * Facility.
2595     *
2596     * @return {@code true} if the Integrity Enhancement Facility is supported,
2597     *         {@code false} otherwise.
2598     * @throws SQLException
2599     *             a database error occurred.
2600     */
2601    public boolean supportsIntegrityEnhancementFacility() throws SQLException;
2602
2603    /**
2604     * Determines whether the database supports a {@code LIKE} escape clause.
2605     *
2606     * @return {@code true} if LIKE escape clause is supported, {@code false}
2607     *         otherwise.
2608     * @throws SQLException
2609     *             a database error occurred.
2610     */
2611    public boolean supportsLikeEscapeClause() throws SQLException;
2612
2613    /**
2614     * Determines whether the database provides limited support for outer join
2615     * operations.
2616     *
2617     * @return {@code true} if there is limited support for outer join
2618     *         operations, {@code false} otherwise. This will be {@code true} if
2619     *         {@code supportsFullOuterJoins} returns {@code true}.
2620     * @throws SQLException
2621     *             a database error occurred.
2622     */
2623    public boolean supportsLimitedOuterJoins() throws SQLException;
2624
2625    /**
2626     * Determines whether the database supports Minimum SQL Grammar for ODBC.
2627     *
2628     * @return {@code true} if the Minimum SQL Grammar is supported, {@code
2629     *         false} otherwise.
2630     * @throws SQLException
2631     *             a database error occurred.
2632     */
2633    public boolean supportsMinimumSQLGrammar() throws SQLException;
2634
2635    /**
2636     * Determines whether the database treats mixed case unquoted SQL identifiers as
2637     * case sensitive storing them in mixed case.
2638     *
2639     * @return {@code true} if unquoted SQL identifiers are stored in mixed
2640     *         case, {@code false} otherwise.
2641     * @throws SQLException
2642     *             a database error occurred.
2643     */
2644    public boolean supportsMixedCaseIdentifiers() throws SQLException;
2645
2646    /**
2647     * Determines whether the database considers mixed case quoted SQL
2648     * identifiers as case sensitive, storing them in mixed case.
2649     *
2650     * @return {@code true} if quoted SQL identifiers are stored in mixed case,
2651     *         {@code false} otherwise.
2652     * @throws SQLException
2653     *             a database error occurred.
2654     */
2655    public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
2656
2657    /**
2658     * Determines whether it is possible for a single {@code CallableStatement} to
2659     * return multiple {@code ResultSet}s simultaneously.
2660     *
2661     * @return {@code true} if a single {@code CallableStatement} can return
2662     *         multiple {@code ResultSet}s simultaneously, {@code false}
2663     *         otherwise.
2664     * @throws SQLException
2665     *             a database error occurred.
2666     */
2667    public boolean supportsMultipleOpenResults() throws SQLException;
2668
2669    /**
2670     * Determines whether retrieving multiple {@code ResultSet}s from a single
2671     * call to the {@code execute} method is supported.
2672     *
2673     * @return {@code true} if multiple {@code ResultSet}s can be retrieved,
2674     *         {@code false} otherwise.
2675     * @throws SQLException
2676     *             a database error occurred.
2677     */
2678    public boolean supportsMultipleResultSets() throws SQLException;
2679
2680    /**
2681     * Determines whether multiple simultaneous transactions on
2682     * different connections are supported.
2683     *
2684     * @return {@code true} if multiple open transactions are supported, {@code
2685     *         false} otherwise.
2686     * @throws SQLException
2687     *             a database error occurred.
2688     */
2689    public boolean supportsMultipleTransactions() throws SQLException;
2690
2691    /**
2692     * Determines whether callable statements with named parameters is supported.
2693     *
2694     * @return {@code true} if named parameters can be used with callable
2695     *         statements, {@code false} otherwise.
2696     * @throws SQLException
2697     *             a database error occurred.
2698     */
2699    public boolean supportsNamedParameters() throws SQLException;
2700
2701    /**
2702     * Determines whether columns in the database can be defined as non-nullable.
2703     *
2704     * @return {@code true} if columns can be defined non-nullable, {@code
2705     *         false} otherwise.
2706     * @throws SQLException
2707     *             a database error occurred.
2708     */
2709    public boolean supportsNonNullableColumns() throws SQLException;
2710
2711    /**
2712     * Determines whether keeping cursors open across commit operations is
2713     * supported.
2714     *
2715     * @return {@code true} if cursors can be kept open across commit
2716     *         operations, {@code false} if they might get closed.
2717     * @throws SQLException
2718     *             a database error occurred.
2719     */
2720    public boolean supportsOpenCursorsAcrossCommit() throws SQLException;
2721
2722    /**
2723     * Determines whether the database can keep cursors open across rollback
2724     * operations.
2725     *
2726     * @return {@code true} if cursors can be kept open across rollback
2727     *         operations, {@code false} if they might get closed.
2728     * @throws SQLException
2729     *             a database error occurred.
2730     */
2731    public boolean supportsOpenCursorsAcrossRollback() throws SQLException;
2732
2733    /**
2734     * Determines whether keeping statements open across commit operations is
2735     * supported.
2736     *
2737     * @return {@code true} if statements can be kept open, {@code false} if
2738     *         they might not.
2739     * @throws SQLException
2740     *             a database error occurred.
2741     */
2742    public boolean supportsOpenStatementsAcrossCommit() throws SQLException;
2743
2744    /**
2745     * Determines whether keeping statements open across rollback operations is
2746     * supported.
2747     *
2748     * @return {@code true} if statements can be kept open, {@code false} if
2749     *         they might not.
2750     * @throws SQLException
2751     *             a database error occurred.
2752     */
2753    public boolean supportsOpenStatementsAcrossRollback() throws SQLException;
2754
2755    /**
2756     * Determines whether using a column in an {@code ORDER BY} clause that is
2757     * not in the {@code SELECT} statement is supported.
2758     *
2759     * @return {@code true} if it is possible to {@code ORDER} using a column
2760     *         not in the {@code SELECT}, {@code false} otherwise.
2761     * @throws SQLException
2762     *             a database error occurred.
2763     */
2764    public boolean supportsOrderByUnrelated() throws SQLException;
2765
2766    /**
2767     * Determines whether outer join operations are supported.
2768     *
2769     * @return {@code true} if outer join operations are supported, {@code
2770     *         false} otherwise.
2771     * @throws SQLException
2772     *             a database error occurred.
2773     */
2774    public boolean supportsOuterJoins() throws SQLException;
2775
2776    /**
2777     * Determines whether positioned {@code DELETE} statements are supported.
2778     *
2779     * @return {@code true} if the database supports positioned {@code DELETE}
2780     *         statements.
2781     * @throws SQLException
2782     *             a database error occurred.
2783     */
2784    public boolean supportsPositionedDelete() throws SQLException;
2785
2786    /**
2787     * Determines whether positioned {@code UPDATE} statements are supported.
2788     *
2789     * @return {@code true} if the database supports positioned {@code UPDATE}
2790     *         statements, {@code false} otherwise.
2791     * @throws SQLException
2792     *             a database error occurred.
2793     */
2794    public boolean supportsPositionedUpdate() throws SQLException;
2795
2796    /**
2797     * Determines whether there is support for a given concurrency style for the
2798     * given {@code ResultSet}.
2799     *
2800     * @param type
2801     *            the {@code ResultSet} type, as defined in {@code
2802     *            java.sql.ResultSet}:
2803     *            <ul>
2804     *            <li>{@code ResultSet.TYPE_FORWARD_ONLY}</li>
2805     *            <li>{@code ResultSet.TYPE_SCROLL_INSENSITIVE}</li>
2806     *            <li>{@code ResultSet.TYPE_SCROLL_SENSITIVE}</li>
2807     *            </ul>
2808     * @param concurrency
2809     *            a concurrency type, which may be one of {@code
2810     *            ResultSet.CONCUR_READ_ONLY} or {@code
2811     *            ResultSet.CONCUR_UPDATABLE}.
2812     * @return {@code true} if that concurrency and {@code ResultSet} type
2813     *         pairing is supported otherwise {@code false}.
2814     * @throws SQLException
2815     *             a database error occurred.
2816     */
2817    public boolean supportsResultSetConcurrency(int type, int concurrency)
2818            throws SQLException;
2819
2820    /**
2821     * Determines whether the supplied {@code ResultSet} holdability mode is
2822     * supported.
2823     *
2824     * @param holdability
2825     *            as specified in {@code java.sql.ResultSet}: {@code
2826     *            ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code
2827     *            ResultSet.CLOSE_CURSORS_AT_COMMIT}
2828     * @return {@code true} if the given ResultSet holdability is supported and
2829     *         if it isn't then {@code false}.
2830     * @throws SQLException
2831     *             a database error occurred.
2832     */
2833    public boolean supportsResultSetHoldability(int holdability)
2834            throws SQLException;
2835
2836    /**
2837     * Determines whether the supplied {@code ResultSet} type is supported.
2838     *
2839     * @param type
2840     *            the {@code ResultSet} type as defined in {@code
2841     *            java.sql.ResultSet}: {@code ResultSet.TYPE_FORWARD_ONLY},
2842     *            {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
2843     *            ResultSet.TYPE_SCROLL_SENSITIVE}
2844     * @return {@code true} if the {@code ResultSet} type is supported, {@code
2845     *         false} otherwise.
2846     * @throws SQLException
2847     *             a database error occurred.
2848     */
2849    public boolean supportsResultSetType(int type) throws SQLException;
2850
2851    /**
2852     * Determines whether savepoints for transactions are supported.
2853     *
2854     * @return {@code true} if savepoints are supported, {@code false}
2855     *         otherwise.
2856     * @throws SQLException
2857     *             a database error occurred.
2858     */
2859    public boolean supportsSavepoints() throws SQLException;
2860
2861    /**
2862     * Determines whether a schema name may be used in a data manipulation
2863     * statement.
2864     *
2865     * @return {@code true} if a schema name can be used in a data manipulation,
2866     *         otherwise {@code false}.
2867     * @throws SQLException
2868     *             a database error occurred.
2869     */
2870    public boolean supportsSchemasInDataManipulation() throws SQLException;
2871
2872    /**
2873     * Determines whether a schema name may be used in an index definition
2874     * statement.
2875     *
2876     * @return {@code true} if a schema name can be used in an index definition,
2877     *         otherwise {@code false}.
2878     * @throws SQLException
2879     *             a database error occurred.
2880     */
2881    public boolean supportsSchemasInIndexDefinitions() throws SQLException;
2882
2883    /**
2884     * Determines whether a database schema name can be used in a privilege
2885     * definition statement.
2886     *
2887     * @return {@code true} if a database schema name may be used in a privilege
2888     *         definition, otherwise {@code false}
2889     * @throws SQLException
2890     *             a database error occurred.
2891     */
2892    public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
2893
2894    /**
2895     * Determines whether a procedure call statement may be contain in a schema name.
2896     *
2897     * @return {@code true} if a schema name can be used in a procedure call,
2898     *         otherwise {@code false}.
2899     * @throws SQLException
2900     *             a database error occurred.
2901     */
2902    public boolean supportsSchemasInProcedureCalls() throws SQLException;
2903
2904    /**
2905     * Determines whether a schema name can be used in a table definition statement.
2906     *
2907     * @return {@code true} if a schema name can be used in a table definition,
2908     *         otherwise {@code false}.
2909     * @throws SQLException
2910     *             a database error occurred.
2911     */
2912    public boolean supportsSchemasInTableDefinitions() throws SQLException;
2913
2914    /**
2915     * Determines whether the {@code SELECT FOR UPDATE} statement is supported.
2916     *
2917     * @return {@code true} if {@code SELECT FOR UPDATE} statements are
2918     *         supported, otherwise {@code false}.
2919     * @throws SQLException
2920     *             a database error occurred.
2921     */
2922    public boolean supportsSelectForUpdate() throws SQLException;
2923
2924    /**
2925     * Determines whether statement pooling is supported.
2926     *
2927     * @return {@code true} of the database does support statement pooling,
2928     *         otherwise {@code false}.
2929     * @throws SQLException
2930     *             a database error occurred.
2931     */
2932    public boolean supportsStatementPooling() throws SQLException;
2933
2934    /**
2935     * Determines whether stored procedure calls using the stored procedure
2936     * escape syntax is supported.
2937     *
2938     * @return {@code true} if stored procedure calls using the stored procedure
2939     *         escape syntax are supported, otherwise {@code false}.
2940     * @throws SQLException
2941     *             a database error occurred.
2942     */
2943    public boolean supportsStoredProcedures() throws SQLException;
2944
2945    /**
2946     * Determines whether subqueries in comparison expressions are supported.
2947     *
2948     * @return {@code true} if subqueries are supported in comparison
2949     *         expressions.
2950     * @throws SQLException
2951     *             a database error occurred.
2952     */
2953    public boolean supportsSubqueriesInComparisons() throws SQLException;
2954
2955    /**
2956     * Determines whether subqueries in {@code EXISTS} expressions are supported.
2957     *
2958     * @return {@code true} if subqueries are supported in {@code EXISTS}
2959     *         expressions, otherwise {@code false}.
2960     * @throws SQLException
2961     *             a database error occurred.
2962     */
2963    public boolean supportsSubqueriesInExists() throws SQLException;
2964
2965    /**
2966     * Determines whether subqueries in {@code IN} statements are supported.
2967     *
2968     * @return {@code true} if subqueries are supported in {@code IN} statements,
2969     *         otherwise {@code false}.
2970     * @throws SQLException
2971     *             a database error occurred.
2972     */
2973    public boolean supportsSubqueriesInIns() throws SQLException;
2974
2975    /**
2976     * Determines whether subqueries in quantified expressions are supported.
2977     *
2978     * @return {@code true} if subqueries are supported, otherwise {@code false}.
2979     * @throws SQLException
2980     *             a database error occurred.
2981     */
2982    public boolean supportsSubqueriesInQuantifieds() throws SQLException;
2983
2984    /**
2985     * Determines whether the database has table correlation names support.
2986     *
2987     * @return {@code true} if table correlation names are supported, otherwise
2988     *         {@code false}.
2989     * @throws SQLException
2990     *             a database error occurred.
2991     */
2992    public boolean supportsTableCorrelationNames() throws SQLException;
2993
2994    /**
2995     * Determines whether a specified transaction isolation level is supported.
2996     *
2997     * @param level
2998     *            the transaction isolation level, as specified in {@code
2999     *            java.sql.Connection}: {@code TRANSACTION_NONE}, {@code
3000     *            TRANSACTION_READ_COMMITTED}, {@code
3001     *            TRANSACTION_READ_UNCOMMITTED}, {@code
3002     *            TRANSACTION_REPEATABLE_READ}, {@code TRANSACTION_SERIALIZABLE}
3003     * @return {@code true} if the specific isolation level is supported,
3004     *         otherwise {@code false}.
3005     * @throws SQLException
3006     *             a database error occurred.
3007     */
3008    public boolean supportsTransactionIsolationLevel(int level)
3009            throws SQLException;
3010
3011    /**
3012     * Determines whether transactions are supported.
3013     * <p>
3014     * If transactions are not supported, then the {@code commit} method does
3015     * nothing and the transaction isolation level is always {@code
3016     * TRANSACTION_NONE}.
3017     *
3018     * @return {@code true} if transactions are supported, otherwise {@code
3019     *         false}.
3020     * @throws SQLException
3021     *             a database error occurred.
3022     */
3023    public boolean supportsTransactions() throws SQLException;
3024
3025    /**
3026     * Determines whether the {@code SQL UNION} operation is supported.
3027     *
3028     * @return {@code true} of the database does support {@code UNION}, otherwise
3029     *         {@code false}.
3030     * @throws SQLException
3031     *             a database error occurred.
3032     */
3033    public boolean supportsUnion() throws SQLException;
3034
3035    /**
3036     * Determines whether the {@code SQL UNION ALL} operation is supported.
3037     *
3038     * @return {@code true} if the database does support {@code UNION ALL},
3039     *         otherwise {@code false}.
3040     * @throws SQLException
3041     *             a database error occurred.
3042     */
3043    public boolean supportsUnionAll() throws SQLException;
3044
3045    /**
3046     * Determines whether the method {@code ResultSet.rowUpdated} can detect a visible
3047     * row update for the specified {@code ResultSet} type.
3048     *
3049     * @param type
3050     *            {@code ResultSet} type: {@code ResultSet.TYPE_FORWARD_ONLY},
3051     *            {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
3052     *            ResultSet.TYPE_SCROLL_SENSITIVE}
3053     * @return {@code true} detecting changes is possible, otherwise {@code
3054     *         false}.
3055     * @throws SQLException
3056     *             a database error occurred.
3057     */
3058    public boolean updatesAreDetected(int type) throws SQLException;
3059
3060    /**
3061     * Determines whether this database uses a file for each table.
3062     *
3063     * @return {@code true} if the database uses one file for each table,
3064     *         otherwise {@code false}.
3065     * @throws SQLException
3066     *             a database error occurred.
3067     */
3068    public boolean usesLocalFilePerTable() throws SQLException;
3069
3070    /**
3071     * Determines whether this database uses a local file to store tables.
3072     *
3073     * @return {@code true} if the database stores tables in a local file,
3074     *         otherwise {@code false}.
3075     * @throws SQLException
3076     *             a database error occurred.
3077     */
3078    public boolean usesLocalFiles() throws SQLException;
3079}
3080