KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > DatabaseMetaData


1 /*
2  * @(#)DatabaseMetaData.java 1.53 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8
9 package java.sql;
10
11 /**
12  * Comprehensive information about the database as a whole.
13  * <P>
14  * This interface is implemented by driver vendors to let users know the capabilities
15  * of a Database Management System (DBMS) in combination with
16  * the driver based on JDBC<sup><font size=-2>TM</font></sup> technology
17  * ("JDBC driver") that is used with it. Different relational DBMSs often support
18  * different features, implement features in different ways, and use different
19  * data types. In addition, a driver may implement a feature on top of what the
20  * DBMS offers. Information returned by methods in this interface applies
21  * to the capabilities of a particular driver and a particular DBMS working
22  * together. Note that as used in this documentation, the term "database" is
23  * used generically to refer to both the driver and DBMS.
24  * <P>
25  * A user for this interface is commonly a tool that needs to discover how to
26  * deal with the underlying DBMS. This is especially true for applications
27  * that are intended to be used with more than one DBMS. For example, a tool might use the method
28  * <code>getTypeInfo</code> to find out what data types can be used in a
29  * <code>CREATE TABLE</code> statement. Or a user might call the method
30  * <code>supportsCorrelatedSubqueries</code> to see if it is possible to use
31  * a correlated subquery or <code>supportsBatchUpdates</code> to see if it is
32  * possible to use batch updates.
33  * <P>
34  * Some <code>DatabaseMetaData</code> methods return lists of information
35  * in the form of <code>ResultSet</code> objects.
36  * Regular <code>ResultSet</code> methods, such as
37  * <code>getString</code> and <code>getInt</code>, can be used
38  * to retrieve the data from these <code>ResultSet</code> objects. If
39  * a given form of metadata is not available, the <code>ResultSet</code>
40  * getter methods throw an <code>SQLException</code>.
41  * <P>
42  * Some <code>DatabaseMetaData</code> methods take arguments that are
43  * String patterns. These arguments all have names such as fooPattern.
44  * Within a pattern String, "%" means match any substring of 0 or more
45  * characters, and "_" means match any one character. Only metadata
46  * entries matching the search pattern are returned. If a search pattern
47  * argument is set to <code>null</code>, that argument's criterion will
48  * be dropped from the search.
49  * <P>
50  * A method that gets information about a feature that the driver does not
51  * support will throw an <code>SQLException</code>.
52  * In the case of methods that return a <code>ResultSet</code>
53  * object, either a <code>ResultSet</code> object (which may be empty) is
54  * returned or an <code>SQLException</code> is thrown.
55  */

56 public interface DatabaseMetaData {
57
58     //----------------------------------------------------------------------
59
// First, a variety of minor information about the target database.
60

61     /**
62      * Retrieves whether the current user can call all the procedures
63      * returned by the method <code>getProcedures</code>.
64      *
65      * @return <code>true</code> if so; <code>false</code> otherwise
66      * @exception SQLException if a database access error occurs
67      */

68     boolean allProceduresAreCallable() throws SQLException JavaDoc;
69
70     /**
71      * Retrieves whether the current user can use all the tables returned
72      * by the method <code>getTables</code> in a <code>SELECT</code>
73      * statement.
74      *
75      * @return <code>true</code> if so; <code>false</code> otherwise
76      * @exception SQLException if a database access error occurs
77      */

78     boolean allTablesAreSelectable() throws SQLException JavaDoc;
79
80     /**
81      * Retrieves the URL for this DBMS.
82      *
83      * @return the URL for this DBMS or <code>null</code> if it cannot be
84      * generated
85      * @exception SQLException if a database access error occurs
86      */

87     String JavaDoc getURL() throws SQLException JavaDoc;
88
89     /**
90      * Retrieves the user name as known to this database.
91      *
92      * @return the database user name
93      * @exception SQLException if a database access error occurs
94      */

95     String JavaDoc getUserName() throws SQLException JavaDoc;
96
97     /**
98      * Retrieves whether this database is in read-only mode.
99      *
100      * @return <code>true</code> if so; <code>false</code> otherwise
101      * @exception SQLException if a database access error occurs
102      */

103     boolean isReadOnly() throws SQLException JavaDoc;
104
105     /**
106      * Retrieves whether <code>NULL</code> values are sorted high.
107      * Sorted high means that <code>NULL</code> values
108      * sort higher than any other value in a domain. In an ascending order,
109      * if this method returns <code>true</code>, <code>NULL</code> values
110      * will appear at the end. By contrast, the method
111      * <code>nullsAreSortedAtEnd</code> indicates whether <code>NULL</code> values
112      * are sorted at the end regardless of sort order.
113      *
114      * @return <code>true</code> if so; <code>false</code> otherwise
115      * @exception SQLException if a database access error occurs
116      */

117     boolean nullsAreSortedHigh() throws SQLException JavaDoc;
118
119     /**
120      * Retrieves whether <code>NULL</code> values are sorted low.
121      * Sorted low means that <code>NULL</code> values
122      * sort lower than any other value in a domain. In an ascending order,
123      * if this method returns <code>true</code>, <code>NULL</code> values
124      * will appear at the beginning. By contrast, the method
125      * <code>nullsAreSortedAtStart</code> indicates whether <code>NULL</code> values
126      * are sorted at the beginning regardless of sort order.
127      *
128      * @return <code>true</code> if so; <code>false</code> otherwise
129      * @exception SQLException if a database access error occurs
130      */

131     boolean nullsAreSortedLow() throws SQLException JavaDoc;
132
133     /**
134      * Retrieves whether <code>NULL</code> values are sorted at the start regardless
135      * of sort order.
136      *
137      * @return <code>true</code> if so; <code>false</code> otherwise
138      * @exception SQLException if a database access error occurs
139      */

140     boolean nullsAreSortedAtStart() throws SQLException JavaDoc;
141
142     /**
143      * Retrieves whether <code>NULL</code> values are sorted at the end regardless of
144      * sort order.
145      *
146      * @return <code>true</code> if so; <code>false</code> otherwise
147      * @exception SQLException if a database access error occurs
148      */

149     boolean nullsAreSortedAtEnd() throws SQLException JavaDoc;
150
151     /**
152      * Retrieves the name of this database product.
153      *
154      * @return database product name
155      * @exception SQLException if a database access error occurs
156      */

157     String JavaDoc getDatabaseProductName() throws SQLException JavaDoc;
158
159     /**
160      * Retrieves the version number of this database product.
161      *
162      * @return database version number
163      * @exception SQLException if a database access error occurs
164      */

165     String JavaDoc getDatabaseProductVersion() throws SQLException JavaDoc;
166
167     /**
168      * Retrieves the name of this JDBC driver.
169      *
170      * @return JDBC driver name
171      * @exception SQLException if a database access error occurs
172      */

173     String JavaDoc getDriverName() throws SQLException JavaDoc;
174
175     /**
176      * Retrieves the version number of this JDBC driver as a <code>String</code>.
177      *
178      * @return JDBC driver version
179      * @exception SQLException if a database access error occurs
180      */

181     String JavaDoc getDriverVersion() throws SQLException JavaDoc;
182
183     /**
184      * Retrieves this JDBC driver's major version number.
185      *
186      * @return JDBC driver major version
187      */

188     int getDriverMajorVersion();
189
190     /**
191      * Retrieves this JDBC driver's minor version number.
192      *
193      * @return JDBC driver minor version number
194      */

195     int getDriverMinorVersion();
196
197     /**
198      * Retrieves whether this database stores tables in a local file.
199      *
200      * @return <code>true</code> if so; <code>false</code> otherwise
201      * @exception SQLException if a database access error occurs
202      */

203     boolean usesLocalFiles() throws SQLException JavaDoc;
204
205     /**
206      * Retrieves whether this database uses a file for each table.
207      *
208      * @return <code>true</code> if this database uses a local file for each table;
209      * <code>false</code> otherwise
210      * @exception SQLException if a database access error occurs
211      */

212     boolean usesLocalFilePerTable() throws SQLException JavaDoc;
213
214     /**
215      * Retrieves whether this database treats mixed case unquoted SQL identifiers as
216      * case sensitive and as a result stores them in mixed case.
217      *
218      * @return <code>true</code> if so; <code>false</code> otherwise
219      * @exception SQLException if a database access error occurs
220      */

221     boolean supportsMixedCaseIdentifiers() throws SQLException JavaDoc;
222
223     /**
224      * Retrieves whether this database treats mixed case unquoted SQL identifiers as
225      * case insensitive and stores them in upper case.
226      *
227      * @return <code>true</code> if so; <code>false</code> otherwise
228      * @exception SQLException if a database access error occurs
229      */

230     boolean storesUpperCaseIdentifiers() throws SQLException JavaDoc;
231
232     /**
233      * Retrieves whether this database treats mixed case unquoted SQL identifiers as
234      * case insensitive and stores them in lower case.
235      *
236      * @return <code>true</code> if so; <code>false</code> otherwise
237      * @exception SQLException if a database access error occurs
238      */

239     boolean storesLowerCaseIdentifiers() throws SQLException JavaDoc;
240
241     /**
242      * Retrieves whether this database treats mixed case unquoted SQL identifiers as
243      * case insensitive and stores them in mixed case.
244      *
245      * @return <code>true</code> if so; <code>false</code> otherwise
246      * @exception SQLException if a database access error occurs
247      */

248     boolean storesMixedCaseIdentifiers() throws SQLException JavaDoc;
249
250     /**
251      * Retrieves whether this database treats mixed case quoted SQL identifiers as
252      * case sensitive and as a result stores them in mixed case.
253      *
254      * @return <code>true</code> if so; <code>false</code> otherwise
255      * @exception SQLException if a database access error occurs
256      */

257     boolean supportsMixedCaseQuotedIdentifiers() throws SQLException JavaDoc;
258
259     /**
260      * Retrieves whether this database treats mixed case quoted SQL identifiers as
261      * case insensitive and stores them in upper case.
262      *
263      * @return <code>true</code> if so; <code>false</code> otherwise
264      * @exception SQLException if a database access error occurs
265      */

266     boolean storesUpperCaseQuotedIdentifiers() throws SQLException JavaDoc;
267
268     /**
269      * Retrieves whether this database treats mixed case quoted SQL identifiers as
270      * case insensitive and stores them in lower case.
271      *
272      * @return <code>true</code> if so; <code>false</code> otherwise
273      * @exception SQLException if a database access error occurs
274      */

275     boolean storesLowerCaseQuotedIdentifiers() throws SQLException JavaDoc;
276
277     /**
278      * Retrieves whether this database treats mixed case quoted SQL identifiers as
279      * case insensitive and stores them in mixed case.
280      *
281      * @return <code>true</code> if so; <code>false</code> otherwise
282      * @exception SQLException if a database access error occurs
283      */

284     boolean storesMixedCaseQuotedIdentifiers() throws SQLException JavaDoc;
285
286     /**
287      * Retrieves the string used to quote SQL identifiers.
288      * This method returns a space " " if identifier quoting is not supported.
289      *
290      * @return the quoting string or a space if quoting is not supported
291      * @exception SQLException if a database access error occurs
292      */

293     String JavaDoc getIdentifierQuoteString() throws SQLException JavaDoc;
294
295     /**
296      * Retrieves a comma-separated list of all of this database's SQL keywords
297      * that are NOT also SQL92 keywords.
298      *
299      * @return the list of this database's keywords that are not also
300      * SQL92 keywords
301      * @exception SQLException if a database access error occurs
302      */

303     String JavaDoc getSQLKeywords() throws SQLException JavaDoc;
304
305     /**
306      * Retrieves a comma-separated list of math functions available with
307      * this database. These are the Open /Open CLI math function names used in
308      * the JDBC function escape clause.
309      *
310      * @return the list of math functions supported by this database
311      * @exception SQLException if a database access error occurs
312      */

313     String JavaDoc getNumericFunctions() throws SQLException JavaDoc;
314
315     /**
316      * Retrieves a comma-separated list of string functions available with
317      * this database. These are the Open Group CLI string function names used
318      * in the JDBC function escape clause.
319      *
320      * @return the list of string functions supported by this database
321      * @exception SQLException if a database access error occurs
322      */

323     String JavaDoc getStringFunctions() throws SQLException JavaDoc;
324
325     /**
326      * Retrieves a comma-separated list of system functions available with
327      * this database. These are the Open Group CLI system function names used
328      * in the JDBC function escape clause.
329      *
330      * @return a list of system functions supported by this database
331      * @exception SQLException if a database access error occurs
332      */

333     String JavaDoc getSystemFunctions() throws SQLException JavaDoc;
334
335     /**
336      * Retrieves a comma-separated list of the time and date functions available
337      * with this database.
338      *
339      * @return the list of time and date functions supported by this database
340      * @exception SQLException if a database access error occurs
341      */

342     String JavaDoc getTimeDateFunctions() throws SQLException JavaDoc;
343
344     /**
345      * Retrieves the string that can be used to escape wildcard characters.
346      * This is the string that can be used to escape '_' or '%' in
347      * the catalog search parameters that are a pattern (and therefore use one
348      * of the wildcard characters).
349      *
350      * <P>The '_' character represents any single character;
351      * the '%' character represents any sequence of zero or
352      * more characters.
353      *
354      * @return the string used to escape wildcard characters
355      * @exception SQLException if a database access error occurs
356      */

357     String JavaDoc getSearchStringEscape() throws SQLException JavaDoc;
358
359     /**
360      * Retrieves all the "extra" characters that can be used in unquoted
361      * identifier names (those beyond a-z, A-Z, 0-9 and _).
362      *
363      * @return the string containing the extra characters
364      * @exception SQLException if a database access error occurs
365      */

366     String JavaDoc getExtraNameCharacters() throws SQLException JavaDoc;
367
368     //--------------------------------------------------------------------
369
// Functions describing which features are supported.
370

371     /**
372      * Retrieves whether this database supports <code>ALTER TABLE</code>
373      * with add column.
374      *
375      * @return <code>true</code> if so; <code>false</code> otherwise
376      * @exception SQLException if a database access error occurs
377      */

378     boolean supportsAlterTableWithAddColumn() throws SQLException JavaDoc;
379
380     /**
381      * Retrieves whether this database supports <code>ALTER TABLE</code>
382      * with drop column.
383      *
384      * @return <code>true</code> if so; <code>false</code> otherwise
385      * @exception SQLException if a database access error occurs
386      */

387     boolean supportsAlterTableWithDropColumn() throws SQLException JavaDoc;
388
389     /**
390      * Retrieves whether this database supports column aliasing.
391      *
392      * <P>If so, the SQL AS clause can be used to provide names for
393      * computed columns or to provide alias names for columns as
394      * required.
395      *
396      * @return <code>true</code> if so; <code>false</code> otherwise
397      * @exception SQLException if a database access error occurs
398      */

399     boolean supportsColumnAliasing() throws SQLException JavaDoc;
400
401     /**
402      * Retrieves whether this database supports concatenations between
403      * <code>NULL</code> and non-<code>NULL</code> values being
404      * <code>NULL</code>.
405      *
406      * @return <code>true</code> if so; <code>false</code> otherwise
407      * @exception SQLException if a database access error occurs
408      */

409     boolean nullPlusNonNullIsNull() throws SQLException JavaDoc;
410
411     /**
412      * Retrieves whether this database supports the <code>CONVERT</code>
413      * function between SQL types.
414      *
415      * @return <code>true</code> if so; <code>false</code> otherwise
416      * @exception SQLException if a database access error occurs
417      */

418     boolean supportsConvert() throws SQLException JavaDoc;
419
420     /**
421      * Retrieves whether this database supports the <code>CONVERT</code>
422      * for two given SQL types.
423      *
424      * @param fromType the type to convert from; one of the type codes from
425      * the class <code>java.sql.Types</code>
426      * @param toType the type to convert to; one of the type codes from
427      * the class <code>java.sql.Types</code>
428      * @return <code>true</code> if so; <code>false</code> otherwise
429      * @exception SQLException if a database access error occurs
430      * @see Types
431      */

432     boolean supportsConvert(int fromType, int toType) throws SQLException JavaDoc;
433
434     /**
435      * Retrieves whether this database supports table correlation names.
436      *
437      * @return <code>true</code> if so; <code>false</code> otherwise
438      * @exception SQLException if a database access error occurs
439      */

440     boolean supportsTableCorrelationNames() throws SQLException JavaDoc;
441
442     /**
443      * Retrieves whether, when table correlation names are supported, they
444      * are restricted to being different from the names of the tables.
445      *
446      * @return <code>true</code> if so; <code>false</code> otherwise
447      * @exception SQLException if a database access error occurs
448      */

449     boolean supportsDifferentTableCorrelationNames() throws SQLException JavaDoc;
450
451     /**
452      * Retrieves whether this database supports expressions in
453      * <code>ORDER BY</code> lists.
454      *
455      * @return <code>true</code> if so; <code>false</code> otherwise
456      * @exception SQLException if a database access error occurs
457      */

458     boolean supportsExpressionsInOrderBy() throws SQLException JavaDoc;
459
460     /**
461      * Retrieves whether this database supports using a column that is
462      * not in the <code>SELECT</code> statement in an
463      * <code>ORDER BY</code> clause.
464      *
465      * @return <code>true</code> if so; <code>false</code> otherwise
466      * @exception SQLException if a database access error occurs
467      */

468     boolean supportsOrderByUnrelated() throws SQLException JavaDoc;
469
470     /**
471      * Retrieves whether this database supports some form of
472      * <code>GROUP BY</code> clause.
473      *
474      * @return <code>true</code> if so; <code>false</code> otherwise
475      * @exception SQLException if a database access error occurs
476      */

477     boolean supportsGroupBy() throws SQLException JavaDoc;
478
479     /**
480      * Retrieves whether this database supports using a column that is
481      * not in the <code>SELECT</code> statement in a
482      * <code>GROUP BY</code> clause.
483      *
484      * @return <code>true</code> if so; <code>false</code> otherwise
485      * @exception SQLException if a database access error occurs
486      */

487     boolean supportsGroupByUnrelated() throws SQLException JavaDoc;
488
489     /**
490      * Retrieves whether this database supports using columns not included in
491      * the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
492      * provided that all of the columns in the <code>SELECT</code> statement
493      * are included in the <code>GROUP BY</code> clause.
494      *
495      * @return <code>true</code> if so; <code>false</code> otherwise
496      * @exception SQLException if a database access error occurs
497      */

498     boolean supportsGroupByBeyondSelect() throws SQLException JavaDoc;
499
500     /**
501      * Retrieves whether this database supports specifying a
502      * <code>LIKE</code> escape clause.
503      *
504      * @return <code>true</code> if so; <code>false</code> otherwise
505      * @exception SQLException if a database access error occurs
506      */

507     boolean supportsLikeEscapeClause() throws SQLException JavaDoc;
508
509     /**
510      * Retrieves whether this database supports getting multiple
511      * <code>ResultSet</code> objects from a single call to the
512      * method <code>execute</code>.
513      *
514      * @return <code>true</code> if so; <code>false</code> otherwise
515      * @exception SQLException if a database access error occurs
516      */

517     boolean supportsMultipleResultSets() throws SQLException JavaDoc;
518
519     /**
520      * Retrieves whether this database allows having multiple
521      * transactions open at once (on different connections).
522      *
523      * @return <code>true</code> if so; <code>false</code> otherwise
524      * @exception SQLException if a database access error occurs
525      */

526     boolean supportsMultipleTransactions() throws SQLException JavaDoc;
527
528     /**
529      * Retrieves whether columns in this database may be defined as non-nullable.
530      *
531      * @return <code>true</code> if so; <code>false</code> otherwise
532      * @exception SQLException if a database access error occurs
533      */

534     boolean supportsNonNullableColumns() throws SQLException JavaDoc;
535
536     /**
537      * Retrieves whether this database supports the ODBC Minimum SQL grammar.
538      *
539      * @return <code>true</code> if so; <code>false</code> otherwise
540      * @exception SQLException if a database access error occurs
541      */

542     boolean supportsMinimumSQLGrammar() throws SQLException JavaDoc;
543
544     /**
545      * Retrieves whether this database supports the ODBC Core SQL grammar.
546      *
547      * @return <code>true</code> if so; <code>false</code> otherwise
548      * @exception SQLException if a database access error occurs
549      */

550     boolean supportsCoreSQLGrammar() throws SQLException JavaDoc;
551
552     /**
553      * Retrieves whether this database supports the ODBC Extended SQL grammar.
554      *
555      * @return <code>true</code> if so; <code>false</code> otherwise
556      * @exception SQLException if a database access error occurs
557      */

558     boolean supportsExtendedSQLGrammar() throws SQLException JavaDoc;
559
560     /**
561      * Retrieves whether this database supports the ANSI92 entry level SQL
562      * grammar.
563      *
564      * @return <code>true</code> if so; <code>false</code> otherwise
565      * @exception SQLException if a database access error occurs
566      */

567     boolean supportsANSI92EntryLevelSQL() throws SQLException JavaDoc;
568
569     /**
570      * Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
571      *
572      * @return <code>true</code> if so; <code>false</code> otherwise
573      * @exception SQLException if a database access error occurs
574      */

575     boolean supportsANSI92IntermediateSQL() throws SQLException JavaDoc;
576
577     /**
578      * Retrieves whether this database supports the ANSI92 full SQL grammar supported.
579      *
580      * @return <code>true</code> if so; <code>false</code> otherwise
581      * @exception SQLException if a database access error occurs
582      */

583     boolean supportsANSI92FullSQL() throws SQLException JavaDoc;
584
585     /**
586      * Retrieves whether this database supports the SQL Integrity
587      * Enhancement Facility.
588      *
589      * @return <code>true</code> if so; <code>false</code> otherwise
590      * @exception SQLException if a database access error occurs
591      */

592     boolean supportsIntegrityEnhancementFacility() throws SQLException JavaDoc;
593
594     /**
595      * Retrieves whether this database supports some form of outer join.
596      *
597      * @return <code>true</code> if so; <code>false</code> otherwise
598      * @exception SQLException if a database access error occurs
599      */

600     boolean supportsOuterJoins() throws SQLException JavaDoc;
601
602     /**
603      * Retrieves whether this database supports full nested outer joins.
604      *
605      * @return <code>true</code> if so; <code>false</code> otherwise
606      * @exception SQLException if a database access error occurs
607      */

608     boolean supportsFullOuterJoins() throws SQLException JavaDoc;
609
610     /**
611      * Retrieves whether this database provides limited support for outer
612      * joins. (This will be <code>true</code> if the method
613      * <code>supportsFullOuterJoins</code> returns <code>true</code>).
614      *
615      * @return <code>true</code> if so; <code>false</code> otherwise
616      * @exception SQLException if a database access error occurs
617      */

618     boolean supportsLimitedOuterJoins() throws SQLException JavaDoc;
619
620     /**
621      * Retrieves the database vendor's preferred term for "schema".
622      *
623      * @return the vendor term for "schema"
624      * @exception SQLException if a database access error occurs
625      */

626     String JavaDoc getSchemaTerm() throws SQLException JavaDoc;
627
628     /**
629      * Retrieves the database vendor's preferred term for "procedure".
630      *
631      * @return the vendor term for "procedure"
632      * @exception SQLException if a database access error occurs
633      */

634     String JavaDoc getProcedureTerm() throws SQLException JavaDoc;
635
636     /**
637      * Retrieves the database vendor's preferred term for "catalog".
638      *
639      * @return the vendor term for "catalog"
640      * @exception SQLException if a database access error occurs
641      */

642     String JavaDoc getCatalogTerm() throws SQLException JavaDoc;
643
644     /**
645      * Retrieves whether a catalog appears at the start of a fully qualified
646      * table name. If not, the catalog appears at the end.
647      *
648      * @return <code>true</code> if the catalog name appears at the beginning
649      * of a fully qualified table name; <code>false</code> otherwise
650      * @exception SQLException if a database access error occurs
651      */

652     boolean isCatalogAtStart() throws SQLException JavaDoc;
653
654     /**
655      * Retrieves the <code>String</code> that this database uses as the
656      * separator between a catalog and table name.
657      *
658      * @return the separator string
659      * @exception SQLException if a database access error occurs
660      */

661     String JavaDoc getCatalogSeparator() throws SQLException JavaDoc;
662
663     /**
664      * Retrieves whether a schema name can be used in a data manipulation statement.
665      *
666      * @return <code>true</code> if so; <code>false</code> otherwise
667      * @exception SQLException if a database access error occurs
668      */

669     boolean supportsSchemasInDataManipulation() throws SQLException JavaDoc;
670
671     /**
672      * Retrieves whether a schema name can be used in a procedure call statement.
673      *
674      * @return <code>true</code> if so; <code>false</code> otherwise
675      * @exception SQLException if a database access error occurs
676      */

677     boolean supportsSchemasInProcedureCalls() throws SQLException JavaDoc;
678
679     /**
680      * Retrieves whether a schema name can be used in a table definition statement.
681      *
682      * @return <code>true</code> if so; <code>false</code> otherwise
683      * @exception SQLException if a database access error occurs
684      */

685     boolean supportsSchemasInTableDefinitions() throws SQLException JavaDoc;
686
687     /**
688      * Retrieves whether a schema name can be used in an index definition statement.
689      *
690      * @return <code>true</code> if so; <code>false</code> otherwise
691      * @exception SQLException if a database access error occurs
692      */

693     boolean supportsSchemasInIndexDefinitions() throws SQLException JavaDoc;
694
695     /**
696      * Retrieves whether a schema name can be used in a privilege definition statement.
697      *
698      * @return <code>true</code> if so; <code>false</code> otherwise
699      * @exception SQLException if a database access error occurs
700      */

701     boolean supportsSchemasInPrivilegeDefinitions() throws SQLException JavaDoc;
702
703     /**
704      * Retrieves whether a catalog name can be used in a data manipulation statement.
705      *
706      * @return <code>true</code> if so; <code>false</code> otherwise
707      * @exception SQLException if a database access error occurs
708      */

709     boolean supportsCatalogsInDataManipulation() throws SQLException JavaDoc;
710
711     /**
712      * Retrieves whether a catalog name can be used in a procedure call statement.
713      *
714      * @return <code>true</code> if so; <code>false</code> otherwise
715      * @exception SQLException if a database access error occurs
716      */

717     boolean supportsCatalogsInProcedureCalls() throws SQLException JavaDoc;
718
719     /**
720      * Retrieves whether a catalog name can be used in a table definition statement.
721      *
722      * @return <code>true</code> if so; <code>false</code> otherwise
723      * @exception SQLException if a database access error occurs
724      */

725     boolean supportsCatalogsInTableDefinitions() throws SQLException JavaDoc;
726
727     /**
728      * Retrieves whether a catalog name can be used in an index definition statement.
729      *
730      * @return <code>true</code> if so; <code>false</code> otherwise
731      * @exception SQLException if a database access error occurs
732      */

733     boolean supportsCatalogsInIndexDefinitions() throws SQLException JavaDoc;
734
735     /**
736      * Retrieves whether a catalog name can be used in a privilege definition statement.
737      *
738      * @return <code>true</code> if so; <code>false</code> otherwise
739      * @exception SQLException if a database access error occurs
740      */

741     boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException JavaDoc;
742
743
744     /**
745      * Retrieves whether this database supports positioned <code>DELETE</code>
746      * statements.
747      *
748      * @return <code>true</code> if so; <code>false</code> otherwise
749      * @exception SQLException if a database access error occurs
750      */

751     boolean supportsPositionedDelete() throws SQLException JavaDoc;
752
753     /**
754      * Retrieves whether this database supports positioned <code>UPDATE</code>
755      * statements.
756      *
757      * @return <code>true</code> if so; <code>false</code> otherwise
758      * @exception SQLException if a database access error occurs
759      */

760     boolean supportsPositionedUpdate() throws SQLException JavaDoc;
761
762     /**
763      * Retrieves whether this database supports <code>SELECT FOR UPDATE</code>
764      * statements.
765      *
766      * @return <code>true</code> if so; <code>false</code> otherwise
767      * @exception SQLException if a database access error occurs
768      */

769     boolean supportsSelectForUpdate() throws SQLException JavaDoc;
770
771     /**
772      * Retrieves whether this database supports stored procedure calls
773      * that use the stored procedure escape syntax.
774      *
775      * @return <code>true</code> if so; <code>false</code> otherwise
776      * @exception SQLException if a database access error occurs
777      */

778     boolean supportsStoredProcedures() throws SQLException JavaDoc;
779
780     /**
781      * Retrieves whether this database supports subqueries in comparison
782      * expressions.
783      *
784      * @return <code>true</code> if so; <code>false</code> otherwise
785      * @exception SQLException if a database access error occurs
786      */

787     boolean supportsSubqueriesInComparisons() throws SQLException JavaDoc;
788
789     /**
790      * Retrieves whether this database supports subqueries in
791      * <code>EXISTS</code> expressions.
792      *
793      * @return <code>true</code> if so; <code>false</code> otherwise
794      * @exception SQLException if a database access error occurs
795      */

796     boolean supportsSubqueriesInExists() throws SQLException JavaDoc;
797
798     /**
799      * Retrieves whether this database supports subqueries in
800      * <code>IN</code> statements.
801      *
802      * @return <code>true</code> if so; <code>false</code> otherwise
803      * @exception SQLException if a database access error occurs
804      */

805     boolean supportsSubqueriesInIns() throws SQLException JavaDoc;
806
807     /**
808      * Retrieves whether this database supports subqueries in quantified
809      * expressions.
810      *
811      * @return <code>true</code> if so; <code>false</code> otherwise
812      * @exception SQLException if a database access error occurs
813      */

814     boolean supportsSubqueriesInQuantifieds() throws SQLException JavaDoc;
815
816     /**
817      * Retrieves whether this database supports correlated subqueries.
818      *
819      * @return <code>true</code> if so; <code>false</code> otherwise
820      * @exception SQLException if a database access error occurs
821      */

822     boolean supportsCorrelatedSubqueries() throws SQLException JavaDoc;
823
824     /**
825      * Retrieves whether this database supports SQL <code>UNION</code>.
826      *
827      * @return <code>true</code> if so; <code>false</code> otherwise
828      * @exception SQLException if a database access error occurs
829      */

830     boolean supportsUnion() throws SQLException JavaDoc;
831
832     /**
833      * Retrieves whether this database supports SQL <code>UNION ALL</code>.
834      *
835      * @return <code>true</code> if so; <code>false</code> otherwise
836      * @exception SQLException if a database access error occurs
837      */

838     boolean supportsUnionAll() throws SQLException JavaDoc;
839
840     /**
841      * Retrieves whether this database supports keeping cursors open
842      * across commits.
843      *
844      * @return <code>true</code> if cursors always remain open;
845      * <code>false</code> if they might not remain open
846      * @exception SQLException if a database access error occurs
847      */

848     boolean supportsOpenCursorsAcrossCommit() throws SQLException JavaDoc;
849
850     /**
851      * Retrieves whether this database supports keeping cursors open
852      * across rollbacks.
853      *
854      * @return <code>true</code> if cursors always remain open;
855      * <code>false</code> if they might not remain open
856      * @exception SQLException if a database access error occurs
857      */

858     boolean supportsOpenCursorsAcrossRollback() throws SQLException JavaDoc;
859
860     /**
861      * Retrieves whether this database supports keeping statements open
862      * across commits.
863      *
864      * @return <code>true</code> if statements always remain open;
865      * <code>false</code> if they might not remain open
866      * @exception SQLException if a database access error occurs
867      */

868     boolean supportsOpenStatementsAcrossCommit() throws SQLException JavaDoc;
869
870     /**
871      * Retrieves whether this database supports keeping statements open
872      * across rollbacks.
873      *
874      * @return <code>true</code> if statements always remain open;
875      * <code>false</code> if they might not remain open
876      * @exception SQLException if a database access error occurs
877      */

878     boolean supportsOpenStatementsAcrossRollback() throws SQLException JavaDoc;
879
880     
881
882     //----------------------------------------------------------------------
883
// The following group of methods exposes various limitations
884
// based on the target database with the current driver.
885
// Unless otherwise specified, a result of zero means there is no
886
// limit, or the limit is not known.
887

888     /**
889      * Retrieves the maximum number of hex characters this database allows in an
890      * inline binary literal.
891      *
892      * @return max the maximum length (in hex characters) for a binary literal;
893      * a result of zero means that there is no limit or the limit
894      * is not known
895      * @exception SQLException if a database access error occurs
896      */

897     int getMaxBinaryLiteralLength() throws SQLException JavaDoc;
898
899     /**
900      * Retrieves the maximum number of characters this database allows
901      * for a character literal.
902      *
903      * @return the maximum number of characters allowed for a character literal;
904      * a result of zero means that there is no limit or the limit is
905      * not known
906      * @exception SQLException if a database access error occurs
907      */

908     int getMaxCharLiteralLength() throws SQLException JavaDoc;
909
910     /**
911      * Retrieves the maximum number of characters this database allows
912      * for a column name.
913      *
914      * @return the maximum number of characters allowed for a column name;
915      * a result of zero means that there is no limit or the limit
916      * is not known
917      * @exception SQLException if a database access error occurs
918      */

919     int getMaxColumnNameLength() throws SQLException JavaDoc;
920
921     /**
922      * Retrieves the maximum number of columns this database allows in a
923      * <code>GROUP BY</code> clause.
924      *
925      * @return the maximum number of columns allowed;
926      * a result of zero means that there is no limit or the limit
927      * is not known
928      * @exception SQLException if a database access error occurs
929      */

930     int getMaxColumnsInGroupBy() throws SQLException JavaDoc;
931
932     /**
933      * Retrieves the maximum number of columns this database allows in an index.
934      *
935      * @return the maximum number of columns allowed;
936      * a result of zero means that there is no limit or the limit
937      * is not known
938      * @exception SQLException if a database access error occurs
939      */

940     int getMaxColumnsInIndex() throws SQLException JavaDoc;
941
942     /**
943      * Retrieves the maximum number of columns this database allows in an
944      * <code>ORDER BY</code> clause.
945      *
946      * @return the maximum number of columns allowed;
947      * a result of zero means that there is no limit or the limit
948      * is not known
949      * @exception SQLException if a database access error occurs
950      */

951     int getMaxColumnsInOrderBy() throws SQLException JavaDoc;
952
953     /**
954      * Retrieves the maximum number of columns this database allows in a
955      * <code>SELECT</code> list.
956      *
957      * @return the maximum number of columns allowed;
958      * a result of zero means that there is no limit or the limit
959      * is not known
960      * @exception SQLException if a database access error occurs
961      */

962     int getMaxColumnsInSelect() throws SQLException