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 JavaDoc;
963
964     /**
965      * Retrieves the maximum number of columns this database allows in a table.
966      *
967      * @return the maximum number of columns allowed;
968      * a result of zero means that there is no limit or the limit
969      * is not known
970      * @exception SQLException if a database access error occurs
971      */

972     int getMaxColumnsInTable() throws SQLException JavaDoc;
973
974     /**
975      * Retrieves the maximum number of concurrent connections to this
976      * database that are possible.
977      *
978      * @return the maximum number of active connections possible at one time;
979      * a result of zero means that there is no limit or the limit
980      * is not known
981      * @exception SQLException if a database access error occurs
982      */

983     int getMaxConnections() throws SQLException JavaDoc;
984
985     /**
986      * Retrieves the maximum number of characters that this database allows in a
987      * cursor name.
988      *
989      * @return the maximum number of characters allowed in a cursor name;
990      * a result of zero means that there is no limit or the limit
991      * is not known
992      * @exception SQLException if a database access error occurs
993      */

994     int getMaxCursorNameLength() throws SQLException JavaDoc;
995
996     /**
997      * Retrieves the maximum number of bytes this database allows for an
998      * index, including all of the parts of the index.
999      *
1000     * @return the maximum number of bytes allowed; this limit includes the
1001     * composite of all the constituent parts of the index;
1002     * a result of zero means that there is no limit or the limit
1003     * is not known
1004     * @exception SQLException if a database access error occurs
1005     */

1006    int getMaxIndexLength() throws SQLException JavaDoc;
1007
1008    /**
1009     * Retrieves the maximum number of characters that this database allows in a
1010     * schema name.
1011     *
1012     * @return the maximum number of characters allowed in a schema name;
1013     * a result of zero means that there is no limit or the limit
1014     * is not known
1015     * @exception SQLException if a database access error occurs
1016     */

1017    int getMaxSchemaNameLength() throws SQLException JavaDoc;
1018
1019    /**
1020     * Retrieves the maximum number of characters that this database allows in a
1021     * procedure name.
1022     *
1023     * @return the maximum number of characters allowed in a procedure name;
1024     * a result of zero means that there is no limit or the limit
1025     * is not known
1026     * @exception SQLException if a database access error occurs
1027     */

1028    int getMaxProcedureNameLength() throws SQLException JavaDoc;
1029
1030    /**
1031     * Retrieves the maximum number of characters that this database allows in a
1032     * catalog name.
1033     *
1034     * @return the maximum number of characters allowed in a catalog name;
1035     * a result of zero means that there is no limit or the limit
1036     * is not known
1037     * @exception SQLException if a database access error occurs
1038     */

1039    int getMaxCatalogNameLength() throws SQLException JavaDoc;
1040
1041    /**
1042     * Retrieves the maximum number of bytes this database allows in
1043     * a single row.
1044     *
1045     * @return the maximum number of bytes allowed for a row; a result of
1046     * zero means that there is no limit or the limit is not known
1047     * @exception SQLException if a database access error occurs
1048     */

1049    int getMaxRowSize() throws SQLException JavaDoc;
1050
1051    /**
1052     * Retrieves whether the return value for the method
1053     * <code>getMaxRowSize</code> includes the SQL data types
1054     * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
1055     *
1056     * @return <code>true</code> if so; <code>false</code> otherwise
1057     * @exception SQLException if a database access error occurs
1058     */

1059    boolean doesMaxRowSizeIncludeBlobs() throws SQLException JavaDoc;
1060
1061    /**
1062     * Retrieves the maximum number of characters this database allows in
1063     * an SQL statement.
1064     *
1065     * @return the maximum number of characters allowed for an SQL statement;
1066     * a result of zero means that there is no limit or the limit
1067     * is not known
1068     * @exception SQLException if a database access error occurs
1069     */

1070    int getMaxStatementLength() throws SQLException JavaDoc;
1071
1072    /**
1073     * Retrieves the maximum number of active statements to this database
1074     * that can be open at the same time.
1075     *
1076     * @return the maximum number of statements that can be open at one time;
1077     * a result of zero means that there is no limit or the limit
1078     * is not known
1079     * @exception SQLException if a database access error occurs
1080     */

1081    int getMaxStatements() throws SQLException JavaDoc;
1082
1083    /**
1084     * Retrieves the maximum number of characters this database allows in
1085     * a table name.
1086     *
1087     * @return the maximum number of characters allowed for a table name;
1088     * a result of zero means that there is no limit or the limit
1089     * is not known
1090     * @exception SQLException if a database access error occurs
1091     */

1092    int getMaxTableNameLength() throws SQLException JavaDoc;
1093
1094    /**
1095     * Retrieves the maximum number of tables this database allows in a
1096     * <code>SELECT</code> statement.
1097     *
1098     * @return the maximum number of tables allowed in a <code>SELECT</code>
1099     * statement; a result of zero means that there is no limit or
1100     * the limit is not known
1101     * @exception SQLException if a database access error occurs
1102     */

1103    int getMaxTablesInSelect() throws SQLException JavaDoc;
1104
1105    /**
1106     * Retrieves the maximum number of characters this database allows in
1107     * a user name.
1108     *
1109     * @return the maximum number of characters allowed for a user name;
1110     * a result of zero means that there is no limit or the limit
1111     * is not known
1112     * @exception SQLException if a database access error occurs
1113     */

1114    int getMaxUserNameLength() throws SQLException JavaDoc;
1115
1116    //----------------------------------------------------------------------
1117

1118    /**
1119     * Retrieves this database's default transaction isolation level. The
1120     * possible values are defined in <code>java.sql.Connection</code>.
1121     *
1122     * @return the default isolation level
1123     * @exception SQLException if a database access error occurs
1124     * @see Connection
1125     */

1126    int getDefaultTransactionIsolation() throws SQLException JavaDoc;
1127
1128    /**
1129     * Retrieves whether this database supports transactions. If not, invoking the
1130     * method <code>commit</code> is a noop, and the isolation level is
1131     * <code>TRANSACTION_NONE</code>.
1132     *
1133     * @return <code>true</code> if transactions are supported;
1134     * <code>false</code> otherwise
1135     * @exception SQLException if a database access error occurs
1136     */

1137    boolean supportsTransactions() throws SQLException JavaDoc;
1138
1139    /**
1140     * Retrieves whether this database supports the given transaction isolation level.
1141     *
1142     * @param level one of the transaction isolation levels defined in
1143     * <code>java.sql.Connection</code>
1144     * @return <code>true</code> if so; <code>false</code> otherwise
1145     * @exception SQLException if a database access error occurs
1146     * @see Connection
1147     */

1148    boolean supportsTransactionIsolationLevel(int level)
1149    throws SQLException JavaDoc;
1150
1151    /**
1152     * Retrieves whether this database supports both data definition and
1153     * data manipulation statements within a transaction.
1154     *
1155     * @return <code>true</code> if so; <code>false</code> otherwise
1156     * @exception SQLException if a database access error occurs
1157     */

1158    boolean supportsDataDefinitionAndDataManipulationTransactions()
1159    throws SQLException JavaDoc;
1160    /**
1161     * Retrieves whether this database supports only data manipulation
1162     * statements within a transaction.
1163     *
1164     * @return <code>true</code> if so; <code>false</code> otherwise
1165     * @exception SQLException if a database access error occurs
1166     */

1167    boolean supportsDataManipulationTransactionsOnly()
1168    throws SQLException JavaDoc;
1169
1170    /**
1171     * Retrieves whether a data definition statement within a transaction forces
1172     * the transaction to commit.
1173     *
1174     * @return <code>true</code> if so; <code>false</code> otherwise
1175     * @exception SQLException if a database access error occurs
1176     */

1177    boolean dataDefinitionCausesTransactionCommit()
1178    throws SQLException JavaDoc;
1179
1180    /**
1181     * Retrieves whether this database ignores a data definition statement
1182     * within a transaction.
1183     *
1184     * @return <code>true</code> if so; <code>false</code> otherwise
1185     * @exception SQLException if a database access error occurs
1186     */

1187    boolean dataDefinitionIgnoredInTransactions()
1188    throws SQLException JavaDoc;
1189
1190    /**
1191     * Retrieves a description of the stored procedures available in the given
1192     * catalog.
1193     * <P>
1194     * Only procedure descriptions matching the schema and
1195     * procedure name criteria are returned. They are ordered by
1196     * <code>PROCEDURE_SCHEM</code> and <code>PROCEDURE_NAME</code>.
1197     *
1198     * <P>Each procedure description has the the following columns:
1199     * <OL>
1200     * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
1201     * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
1202     * <LI><B>PROCEDURE_NAME</B> String => procedure name
1203     * <LI> reserved for future use
1204     * <LI> reserved for future use
1205     * <LI> reserved for future use
1206     * <LI><B>REMARKS</B> String => explanatory comment on the procedure
1207     * <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
1208     * <UL>
1209     * <LI> procedureResultUnknown - May return a result
1210     * <LI> procedureNoResult - Does not return a result
1211     * <LI> procedureReturnsResult - Returns a result
1212     * </UL>
1213     * </OL>
1214     *
1215     * @param catalog a catalog name; must match the catalog name as it
1216     * is stored in the database; "" retrieves those without a catalog;
1217     * <code>null</code> means that the catalog name should not be used to narrow
1218     * the search
1219     * @param schemaPattern a schema name pattern; must match the schema name
1220     * as it is stored in the database; "" retrieves those without a schema;
1221     * <code>null</code> means that the schema name should not be used to narrow
1222     * the search
1223     * @param procedureNamePattern a procedure name pattern; must match the
1224     * procedure name as it is stored in the database
1225     * @return <code>ResultSet</code> - each row is a procedure description
1226     * @exception SQLException if a database access error occurs
1227     * @see #getSearchStringEscape
1228     */

1229    ResultSet JavaDoc getProcedures(String JavaDoc catalog, String JavaDoc schemaPattern,
1230                String JavaDoc procedureNamePattern) throws SQLException JavaDoc;
1231
1232    /**
1233     * Indicates that it is not known whether the procedure returns
1234     * a result.
1235     * <P>
1236     * A possible value for column <code>PROCEDURE_TYPE</code> in the
1237     * <code>ResultSet</code> object returned by the method
1238     * <code>getProcedures</code>.
1239     */

1240    int procedureResultUnknown = 0;
1241
1242    /**
1243     * Indicates that the procedure does not return a result.
1244     * <P>
1245     * A possible value for column <code>PROCEDURE_TYPE</code> in the
1246     * <code>ResultSet</code> object returned by the method
1247     * <code>getProcedures</code>.
1248     */

1249    int procedureNoResult = 1;
1250
1251    /**
1252     * Indicates that the procedure returns a result.
1253     * <P>
1254     * A possible value for column <code>PROCEDURE_TYPE</code> in the
1255     * <code>ResultSet</code> object returned by the method
1256     * <code>getProcedures</code>.
1257     */

1258    int procedureReturnsResult = 2;
1259
1260    /**
1261     * Retrieves a description of the given catalog's stored procedure parameter
1262     * and result columns.
1263     *
1264     * <P>Only descriptions matching the schema, procedure and
1265     * parameter name criteria are returned. They are ordered by
1266     * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
1267     * if any, is first. Next are the parameter descriptions in call
1268     * order. The column descriptions follow in column number order.
1269     *
1270     * <P>Each row in the <code>ResultSet</code> is a parameter description or
1271     * column description with the following fields:
1272     * <OL>
1273     * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
1274     * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
1275     * <LI><B>PROCEDURE_NAME</B> String => procedure name
1276     * <LI><B>COLUMN_NAME</B> String => column/parameter name
1277     * <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
1278     * <UL>
1279     * <LI> procedureColumnUnknown - nobody knows
1280     * <LI> procedureColumnIn - IN parameter
1281     * <LI> procedureColumnInOut - INOUT parameter
1282     * <LI> procedureColumnOut - OUT parameter
1283     * <LI> procedureColumnReturn - procedure return value
1284     * <LI> procedureColumnResult - result column in <code>ResultSet</code>
1285     * </UL>
1286     * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
1287     * <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
1288     * type name is fully qualified
1289     * <LI><B>PRECISION</B> int => precision
1290     * <LI><B>LENGTH</B> int => length in bytes of data
1291     * <LI><B>SCALE</B> short => scale
1292     * <LI><B>RADIX</B> short => radix
1293     * <LI><B>NULLABLE</B> short => can it contain NULL.
1294     * <UL>
1295     * <LI> procedureNoNulls - does not allow NULL values
1296     * <LI> procedureNullable - allows NULL values
1297     * <LI> procedureNullableUnknown - nullability unknown
1298     * </UL>
1299     * <LI><B>REMARKS</B> String => comment describing parameter/column
1300     * </OL>
1301     *
1302     * <P><B>Note:</B> Some databases may not return the column
1303     * descriptions for a procedure. Additional columns beyond
1304     * REMARKS can be defined by the database.
1305     *
1306     * @param catalog a catalog name; must match the catalog name as it
1307     * is stored in the database; "" retrieves those without a catalog;
1308     * <code>null</code> means that the catalog name should not be used to narrow
1309     * the search
1310     * @param schemaPattern a schema name pattern; must match the schema name
1311     * as it is stored in the database; "" retrieves those without a schema;
1312     * <code>null</code> means that the schema name should not be used to narrow
1313     * the search
1314     * @param procedureNamePattern a procedure name pattern; must match the
1315     * procedure name as it is stored in the database
1316     * @param columnNamePattern a column name pattern; must match the column name
1317     * as it is stored in the database
1318     * @return <code>ResultSet</code> - each row describes a stored procedure parameter or
1319     * column
1320     * @exception SQLException if a database access error occurs
1321     * @see #getSearchStringEscape
1322     */

1323    ResultSet JavaDoc getProcedureColumns(String JavaDoc catalog,
1324                  String JavaDoc schemaPattern,
1325                  String JavaDoc procedureNamePattern,
1326                  String JavaDoc columnNamePattern) throws SQLException JavaDoc;
1327
1328    /**
1329     * Indicates that type of the column is unknown.
1330     * <P>
1331     * A possible value for the column
1332     * <code>COLUMN_TYPE</code>
1333     * in the <code>ResultSet</code>
1334     * returned by the method <code>getProcedureColumns</code>.
1335     */

1336    int procedureColumnUnknown = 0;
1337
1338    /**
1339     * Indicates that the column stores IN parameters.
1340     * <P>
1341     * A possible value for the column
1342     * <code>COLUMN_TYPE</code>
1343     * in the <code>ResultSet</code>
1344     * returned by the method <code>getProcedureColumns</code>.
1345     */

1346    int procedureColumnIn = 1;
1347
1348    /**
1349     * Indicates that the column stores INOUT parameters.
1350     * <P>
1351     * A possible value for the column
1352     * <code>COLUMN_TYPE</code>
1353     * in the <code>ResultSet</code>
1354     * returned by the method <code>getProcedureColumns</code>.
1355     */

1356    int procedureColumnInOut = 2;
1357
1358    /**
1359     * Indicates that the column stores OUT parameters.
1360     * <P>
1361     * A possible value for the column
1362     * <code>COLUMN_TYPE</code>
1363     * in the <code>ResultSet</code>
1364     * returned by the method <code>getProcedureColumns</code>.
1365     */

1366    int procedureColumnOut = 4;
1367    /**
1368     * Indicates that the column stores return values.
1369     * <P>
1370     * A possible value for the column
1371     * <code>COLUMN_TYPE</code>
1372     * in the <code>ResultSet</code>
1373     * returned by the method <code>getProcedureColumns</code>.
1374     */

1375    int procedureColumnReturn = 5;
1376
1377    /**
1378     * Indicates that the column stores results.
1379     * <P>
1380     * A possible value for the column
1381     * <code>COLUMN_TYPE</code>
1382     * in the <code>ResultSet</code>
1383     * returned by the method <code>getProcedureColumns</code>.
1384     */

1385    int procedureColumnResult = 3;
1386
1387    /**
1388     * Indicates that <code>NULL</code> values are not allowed.
1389     * <P>
1390     * A possible value for the column
1391     * <code>NULLABLE</code>
1392     * in the <code>ResultSet</code> object
1393     * returned by the method <code>getProcedureColumns</code>.
1394     */

1395    int procedureNoNulls = 0;
1396
1397    /**
1398     * Indicates that <code>NULL</code> values are allowed.
1399     * <P>
1400     * A possible value for the column
1401     * <code>NULLABLE</code>
1402     * in the <code>ResultSet</code> object
1403     * returned by the method <code>getProcedureColumns</code>.
1404     */

1405    int procedureNullable = 1;
1406
1407    /**
1408     * Indicates that whether <code>NULL</code> values are allowed
1409     * is unknown.
1410     * <P>
1411     * A possible value for the column
1412     * <code>NULLABLE</code>
1413     * in the <code>ResultSet</code> object
1414     * returned by the method <code>getProcedureColumns</code>.
1415     */

1416    int procedureNullableUnknown = 2;
1417
1418
1419    /**
1420     * Retrieves a description of the tables available in the given catalog.
1421     * Only table descriptions matching the catalog, schema, table
1422     * name and type criteria are returned. They are ordered by
1423     * TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
1424     * <P>
1425     * Each table description has the following columns:
1426     * <OL>
1427     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1428     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1429     * <LI><B>TABLE_NAME</B> String => table name
1430     * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
1431     * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
1432     * "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
1433     * <LI><B>REMARKS</B> String => explanatory comment on the table
1434     * <LI><B>TYPE_CAT</B> String => the types catalog (may be <code>null</code>)
1435     * <LI><B>TYPE_SCHEM</B> String => the types schema (may be <code>null</code>)
1436     * <LI><B>TYPE_NAME</B> String => type name (may be <code>null</code>)
1437     * <LI><B>SELF_REFERENCING_COL_NAME</B> String => name of the designated
1438     * "identifier" column of a typed table (may be <code>null</code>)
1439     * <LI><B>REF_GENERATION</B> String => specifies how values in
1440     * SELF_REFERENCING_COL_NAME are created. Values are
1441     * "SYSTEM", "USER", "DERIVED". (may be <code>null</code>)
1442     * </OL>
1443     *
1444     * <P><B>Note:</B> Some databases may not return information for
1445     * all tables.
1446     *
1447     * @param catalog a catalog name; must match the catalog name as it
1448     * is stored in the database; "" retrieves those without a catalog;
1449     * <code>null</code> means that the catalog name should not be used to narrow
1450     * the search
1451     * @param schemaPattern a schema name pattern; must match the schema name
1452     * as it is stored in the database; "" retrieves those without a schema;
1453     * <code>null</code> means that the schema name should not be used to narrow
1454     * the search
1455     * @param tableNamePattern a table name pattern; must match the
1456     * table name as it is stored in the database
1457     * @param types a list of table types to include; <code>null</code> returns all types
1458     * @return <code>ResultSet</code> - each row is a table description
1459     * @exception SQLException if a database access error occurs
1460     * @see #getSearchStringEscape
1461     */

1462    ResultSet JavaDoc getTables(String JavaDoc catalog, String JavaDoc schemaPattern,
1463            String JavaDoc tableNamePattern, String JavaDoc types[]) throws SQLException JavaDoc;
1464
1465    /**
1466     * Retrieves the schema names available in this database. The results
1467     * are ordered by schema name.
1468     *
1469     * <P>The schema column is:
1470     * <OL>
1471     * <LI><B>TABLE_SCHEM</B> String => schema name
1472     * <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>)
1473     * </OL>
1474     *
1475     * @return a <code>ResultSet</code> object in which each row is a
1476     * schema decription
1477     * @exception SQLException if a database access error occurs
1478     */

1479    ResultSet JavaDoc getSchemas() throws SQLException JavaDoc;
1480
1481    /**
1482     * Retrieves the catalog names available in this database. The results
1483     * are ordered by catalog name.
1484     *
1485     * <P>The catalog column is:
1486     * <OL>
1487     * <LI><B>TABLE_CAT</B> String => catalog name
1488     * </OL>
1489     *
1490     * @return a <code>ResultSet</code> object in which each row has a
1491     * single <code>String</code> column that is a catalog name
1492     * @exception SQLException if a database access error occurs
1493     */

1494    ResultSet JavaDoc getCatalogs() throws SQLException JavaDoc;
1495
1496    /**
1497     * Retrieves the table types available in this database. The results
1498     * are ordered by table type.
1499     *
1500     * <P>The table type is:
1501     * <OL>
1502     * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
1503     * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
1504     * "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
1505     * </OL>
1506     *
1507     * @return a <code>ResultSet</code> object in which each row has a
1508     * single <code>String</code> column that is a table type
1509     * @exception SQLException if a database access error occurs
1510     */

1511    ResultSet JavaDoc getTableTypes() throws SQLException JavaDoc;
1512
1513    /**
1514     * Retrieves a description of table columns available in
1515     * the specified catalog.
1516     *
1517     * <P>Only column descriptions matching the catalog, schema, table
1518     * and column name criteria are returned. They are ordered by
1519     * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>, and
1520     * <code>ORDINAL_POSITION</code>.
1521     *
1522     * <P>Each column description has the following columns:
1523     * <OL>
1524     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1525     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1526     * <LI><B>TABLE_NAME</B> String => table name
1527     * <LI><B>COLUMN_NAME</B> String => column name
1528     * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
1529     * <LI><B>TYPE_NAME</B> String => Data source dependent type name,
1530     * for a UDT the type name is fully qualified
1531     * <LI><B>COLUMN_SIZE</B> int => column size. For char or date
1532     * types this is the maximum number of characters, for numeric or
1533     * decimal types this is precision.
1534     * <LI><B>BUFFER_LENGTH</B> is not used.
1535     * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
1536     * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
1537     * <LI><B>NULLABLE</B> int => is NULL allowed.
1538     * <UL>
1539     * <LI> columnNoNulls - might not allow <code>NULL</code> values
1540     * <LI> columnNullable - definitely allows <code>NULL</code> values
1541     * <LI> columnNullableUnknown - nullability unknown
1542     * </UL>
1543     * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
1544     * <LI><B>COLUMN_DEF</B> String => default value (may be <code>null</code>)
1545     * <LI><B>SQL_DATA_TYPE</B> int => unused
1546     * <LI><B>SQL_DATETIME_SUB</B> int => unused
1547     * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
1548     * maximum number of bytes in the column
1549     * <LI><B>ORDINAL_POSITION</B> int => index of column in table
1550     * (starting at 1)
1551     * <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
1552     * does not allow NULL values; "YES" means the column might
1553     * allow NULL values. An empty string means nobody knows.
1554     * <LI><B>SCOPE_CATLOG</B> String => catalog of table that is the scope
1555     * of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
1556     * <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the scope
1557     * of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
1558     * <LI><B>SCOPE_TABLE</B> String => table name that this the scope
1559     * of a reference attribure (<code>null</code> if the DATA_TYPE isn't REF)
1560     * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
1561     * Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
1562     * isn't DISTINCT or user-generated REF)
1563     * </OL>
1564     *
1565     * @param catalog a catalog name; must match the catalog name as it
1566     * is stored in the database; "" retrieves those without a catalog;
1567     * <code>null</code> means that the catalog name should not be used to narrow
1568     * the search
1569     * @param schemaPattern a schema name pattern; must match the schema name
1570     * as it is stored in the database; "" retrieves those without a schema;
1571     * <code>null</code> means that the schema name should not be used to narrow
1572     * the search
1573     * @param tableNamePattern a table name pattern; must match the
1574     * table name as it is stored in the database
1575     * @param columnNamePattern a column name pattern; must match the column
1576     * name as it is stored in the database
1577     * @return <code>ResultSet</code> - each row is a column description
1578     * @exception SQLException if a database access error occurs
1579     * @see #getSearchStringEscape
1580     */

1581    ResultSet JavaDoc getColumns(String JavaDoc catalog, String JavaDoc schemaPattern,
1582             String JavaDoc tableNamePattern, String JavaDoc columnNamePattern)
1583    throws SQLException JavaDoc;
1584
1585    /**
1586     * Indicates that the column might not allow <code>NULL</code> values.
1587     * <P>
1588     * A possible value for the column
1589     * <code>NULLABLE</code>
1590     * in the <code>ResultSet</code> returned by the method
1591     * <code>getColumns</code>.
1592     */

1593    int columnNoNulls = 0;
1594
1595    /**
1596     * Indicates that the column definitely allows <code>NULL</code> values.
1597     * <P>
1598     * A possible value for the column
1599     * <code>NULLABLE</code>
1600     * in the <code>ResultSet</code> returned by the method
1601     * <code>getColumns</code>.
1602     */

1603    int columnNullable = 1;
1604
1605    /**
1606     * Indicates that the nullability of columns is unknown.
1607     * <P>
1608     * A possible value for the column
1609     * <code>NULLABLE</code>
1610     * in the <code>ResultSet</code> returned by the method
1611     * <code>getColumns</code>.
1612     */

1613    int columnNullableUnknown = 2;
1614
1615    /**
1616     * Retrieves a description of the access rights for a table's columns.
1617     *
1618     * <P>Only privileges matching the column name criteria are
1619     * returned. They are ordered by COLUMN_NAME and PRIVILEGE.
1620     *
1621     * <P>Each privilige description has the following columns:
1622     * <OL>
1623     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1624     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1625     * <LI><B>TABLE_NAME</B> String => table name
1626     * <LI><B>COLUMN_NAME</B> String => column name
1627     * <LI><B>GRANTOR</B> => grantor of access (may be <code>null</code>)
1628     * <LI><B>GRANTEE</B> String => grantee of access
1629     * <LI><B>PRIVILEGE</B> String => name of access (SELECT,
1630     * INSERT, UPDATE, REFRENCES, ...)
1631     * <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
1632     * to grant to others; "NO" if not; <code>null</code> if unknown
1633     * </OL>
1634     *
1635     * @param catalog a catalog name; must match the catalog name as it
1636     * is stored in the database; "" retrieves those without a catalog;
1637     * <code>null</code> means that the catalog name should not be used to narrow
1638     * the search
1639     * @param schema a schema name; must match the schema name as it is
1640     * stored in the database; "" retrieves those without a schema;
1641     * <code>null</code> means that the schema name should not be used to narrow
1642     * the search
1643     * @param table a table name; must match the table name as it is
1644     * stored in the database
1645     * @param columnNamePattern a column name pattern; must match the column
1646     * name as it is stored in the database
1647     * @return <code>ResultSet</code> - each row is a column privilege description
1648     * @exception SQLException if a database access error occurs
1649     * @see #getSearchStringEscape
1650     */

1651    ResultSet JavaDoc getColumnPrivileges(String JavaDoc catalog, String JavaDoc schema,
1652                  String JavaDoc table, String JavaDoc columnNamePattern) throws SQLException JavaDoc;
1653
1654    /**
1655     * Retrieves a description of the access rights for each table available
1656     * in a catalog. Note that a table privilege applies to one or
1657     * more columns in the table. It would be wrong to assume that
1658     * this privilege applies to all columns (this may be true for
1659     * some systems but is not true for all.)
1660     *
1661     * <P>Only privileges matching the schema and table name
1662     * criteria are returned. They are ordered by TABLE_SCHEM,
1663     * TABLE_NAME, and PRIVILEGE.
1664     *
1665     * <P>Each privilige description has the following columns:
1666     * <OL>
1667     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1668     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1669     * <LI><B>TABLE_NAME</B> String => table name
1670     * <LI><B>GRANTOR</B> => grantor of access (may be <code>null</code>)
1671     * <LI><B>GRANTEE</B> String => grantee of access
1672     * <LI><B>PRIVILEGE</B> String => name of access (SELECT,
1673     * INSERT, UPDATE, REFRENCES, ...)
1674     * <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
1675     * to grant to others; "NO" if not; <code>null</code> if unknown
1676     * </OL>
1677     *
1678     * @param catalog a catalog name; must match the catalog name as it
1679     * is stored in the database; "" retrieves those without a catalog;
1680     * <code>null</code> means that the catalog name should not be used to narrow
1681     * the search
1682     * @param schemaPattern a schema name pattern; must match the schema name
1683     * as it is stored in the database; "" retrieves those without a schema;
1684     * <code>null</code> means that the schema name should not be used to narrow
1685     * the search
1686     * @param tableNamePattern a table name pattern; must match the
1687     * table name as it is stored in the database
1688     * @return <code>ResultSet</code> - each row is a table privilege description
1689     * @exception SQLException if a database access error occurs
1690     * @see #getSearchStringEscape
1691     */

1692    ResultSet JavaDoc getTablePrivileges(String JavaDoc catalog, String JavaDoc schemaPattern,
1693                 String JavaDoc tableNamePattern) throws SQLException JavaDoc;
1694
1695    /**
1696     * Retrieves a description of a table's optimal set of columns that
1697     * uniquely identifies a row. They are ordered by SCOPE.
1698     *
1699     * <P>Each column description has the following columns:
1700     * <OL>
1701     * <LI><B>SCOPE</B> short => actual scope of result
1702     * <UL>
1703     * <LI> bestRowTemporary - very temporary, while using row
1704     * <LI> bestRowTransaction - valid for remainder of current transaction
1705     * <LI> bestRowSession - valid for remainder of current session
1706     * </UL>
1707     * <LI><B>COLUMN_NAME</B> String => column name
1708     * <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types
1709     * <LI><B>TYPE_NAME</B> String => Data source dependent type name,
1710     * for a UDT the type name is fully qualified
1711     * <LI><B>COLUMN_SIZE</B> int => precision
1712     * <LI><B>BUFFER_LENGTH</B> int => not used
1713     * <LI><B>DECIMAL_DIGITS</B> short => scale
1714     * <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column
1715     * like an Oracle ROWID
1716     * <UL>
1717     * <LI> bestRowUnknown - may or may not be pseudo column
1718     * <LI> bestRowNotPseudo - is NOT a pseudo column
1719     * <LI> bestRowPseudo - is a pseudo column
1720     * </UL>
1721     * </OL>
1722     *
1723     * @param catalog a catalog name; must match the catalog name as it
1724     * is stored in the database; "" retrieves those without a catalog;
1725     * <code>null</code> means that the catalog name should not be used to narrow
1726     * the search
1727     * @param schema a schema name; must match the schema name
1728     * as it is stored in the database; "" retrieves those without a schema;
1729     * <code>null</code> means that the schema name should not be used to narrow
1730     * the search
1731     * @param table a table name; must match the table name as it is stored
1732     * in the database
1733     * @param scope the scope of interest; use same values as SCOPE
1734     * @param nullable include columns that are nullable.
1735     * @return <code>ResultSet</code> - each row is a column description
1736     * @exception SQLException if a database access error occurs
1737     */

1738    ResultSet JavaDoc getBestRowIdentifier(String JavaDoc catalog, String JavaDoc schema,
1739                   String JavaDoc table, int scope, boolean nullable) throws SQLException JavaDoc;
1740    
1741    /**
1742     * Indicates that the scope of the best row identifier is
1743     * very temporary, lasting only while the
1744     * row is being used.
1745     * <P>
1746     * A possible value for the column
1747     * <code>SCOPE</code>
1748     * in the <code>ResultSet</code> object
1749     * returned by the method <code>getBestRowIdentifier</code>.
1750     */

1751    int bestRowTemporary = 0;
1752
1753    /**
1754     * Indicates that the scope of the best row identifier is
1755     * the remainder of the current transaction.
1756     * <P>
1757     * A possible value for the column
1758     * <code>SCOPE</code>
1759     * in the <code>ResultSet</code> object
1760     * returned by the method <code>getBestRowIdentifier</code>.
1761     */

1762    int bestRowTransaction = 1;
1763
1764    /**
1765     * Indicates that the scope of the best row identifier is
1766     * the remainder of the current session.
1767     * <P>
1768     * A possible value for the column
1769     * <code>SCOPE</code>
1770     * in the <code>ResultSet</code> object
1771     * returned by the method <code>getBestRowIdentifier</code>.
1772     */

1773    int bestRowSession = 2;
1774
1775    /**
1776     * Indicates that the best row identifier may or may not be a pseudo column.
1777     * <P>
1778     * A possible value for the column
1779     * <code>PSEUDO_COLUMN</code>
1780     * in the <code>ResultSet</code> object
1781     * returned by the method <code>getBestRowIdentifier</code>.
1782     */

1783    int bestRowUnknown = 0;
1784
1785    /**
1786     * Indicates that the best row identifier is NOT a pseudo column.
1787     * <P>
1788     * A possible value for the column
1789     * <code>PSEUDO_COLUMN</code>
1790     * in the <code>ResultSet</code> object
1791     * returned by the method <code>getBestRowIdentifier</code>.
1792     */

1793    int bestRowNotPseudo = 1;
1794
1795    /**
1796     * Indicates that the best row identifier is a pseudo column.
1797     * <P>
1798     * A possible value for the column
1799     * <code>PSEUDO_COLUMN</code>
1800     * in the <code>ResultSet</code> object
1801     * returned by the method <code>getBestRowIdentifier</code>.
1802     */

1803    int bestRowPseudo = 2;
1804
1805    /**
1806     * Retrieves a description of a table's columns that are automatically
1807     * updated when any value in a row is updated. They are
1808     * unordered.
1809     *
1810     * <P>Each column description has the following columns:
1811     * <OL>
1812     * <LI><B>SCOPE</B> short => is not used
1813     * <LI><B>COLUMN_NAME</B> String => column name
1814     * <LI><B>DATA_TYPE</B> int => SQL data type from <code>java.sql.Types</code>
1815     * <LI><B>TYPE_NAME</B> String => Data source-dependent type name
1816     * <LI><B>COLUMN_SIZE</B> int => precision
1817     * <LI><B>BUFFER_LENGTH</B> int => length of column value in bytes
1818     * <LI><B>DECIMAL_DIGITS</B> short => scale
1819     * <LI><B>PSEUDO_COLUMN</B> short => whether this is pseudo column
1820     * like an Oracle ROWID
1821     * <UL>
1822     * <LI> versionColumnUnknown - may or may not be pseudo column
1823     * <LI> versionColumnNotPseudo - is NOT a pseudo column
1824     * <LI> versionColumnPseudo - is a pseudo column
1825     * </UL>
1826     * </OL>
1827     *
1828     * @param catalog a catalog name; must match the catalog name as it
1829     * is stored in the database; "" retrieves those without a catalog;
1830     * <code>null</code> means that the catalog name should not be used to narrow
1831     * the search
1832     * @param schema a schema name; must match the schema name
1833     * as it is stored in the database; "" retrieves those without a schema;
1834     * <code>null</code> means that the schema name should not be used to narrow
1835     * the search
1836     * @param table a table name; must match the table name as it is stored
1837     * in the database
1838     * @return a <code>ResultSet</code> object in which each row is a
1839     * column description
1840     * @exception SQLException if a database access error occurs
1841     */

1842    ResultSet JavaDoc getVersionColumns(String JavaDoc catalog, String JavaDoc schema,
1843                String JavaDoc table) throws SQLException JavaDoc;
1844    
1845    /**
1846     * Indicates that this version column may or may not be a pseudo column.
1847     * <P>
1848     * A possible value for the column
1849     * <code>PSEUDO_COLUMN</code>
1850     * in the <code>ResultSet</code> object
1851     * returned by the method <code>getVersionColumns</code>.
1852     */

1853    int versionColumnUnknown = 0;
1854
1855    /**
1856     * Indicates that this version column is NOT a pseudo column.
1857     * <P>
1858     * A possible value for the column
1859     * <code>PSEUDO_COLUMN</code>
1860     * in the <code>ResultSet</code> object
1861     * returned by the method <code>getVersionColumns</code>.
1862     */

1863    int versionColumnNotPseudo = 1;
1864
1865    /**
1866     * Indicates that this version column is a pseudo column.
1867     * <P>
1868     * A possible value for the column
1869     * <code>PSEUDO_COLUMN</code>
1870     * in the <code>ResultSet</code> object
1871     * returned by the method <code>getVersionColumns</code>.
1872     */

1873    int versionColumnPseudo = 2;
1874
1875    /**
1876     * Retrieves a description of the given table's primary key columns. They
1877     * are ordered by COLUMN_NAME.
1878     *
1879     * <P>Each primary key column description has the following columns:
1880     * <OL>
1881     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
1882     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
1883     * <LI><B>TABLE_NAME</B> String => table name
1884     * <LI><B>COLUMN_NAME</B> String => column name
1885     * <LI><B>KEY_SEQ</B> short => sequence number within primary key
1886     * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
1887     * </OL>
1888     *
1889     * @param catalog a catalog name; must match the catalog name as it
1890     * is stored in the database; "" retrieves those without a catalog;
1891     * <code>null</code> means that the catalog name should not be used to narrow
1892     * the search
1893     * @param schema a schema name; must match the schema name
1894     * as it is stored in the database; "" retrieves those without a schema;
1895     * <code>null</code> means that the schema name should not be used to narrow
1896     * the search
1897     * @param table a table name; must match the table name as it is stored
1898     * in the database
1899     * @return <code>ResultSet</code> - each row is a primary key column description
1900     * @exception SQLException if a database access error occurs
1901     */

1902    ResultSet JavaDoc getPrimaryKeys(String JavaDoc catalog, String JavaDoc schema,
1903                 String JavaDoc table) throws SQLException JavaDoc;
1904
1905    /**
1906     * Retrieves a description of the primary key columns that are
1907     * referenced by a table's foreign key columns (the primary keys
1908     * imported by a table). They are ordered by PKTABLE_CAT,
1909     * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
1910     *
1911     * <P>Each primary key column description has the following columns:
1912     * <OL>
1913     * <LI><B>PKTABLE_CAT</B> String => primary key table catalog
1914     * being imported (may be <code>null</code>)
1915     * <LI><B>PKTABLE_SCHEM</B> String => primary key table schema
1916     * being imported (may be <code>null</code>)
1917     * <LI><B>PKTABLE_NAME</B> String => primary key table name
1918     * being imported
1919     * <LI><B>PKCOLUMN_NAME</B> String => primary key column name
1920     * being imported
1921     * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
1922     * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
1923     * <LI><B>FKTABLE_NAME</B> String => foreign key table name
1924     * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
1925     * <LI><B>KEY_SEQ</B> short => sequence number within a foreign key
1926     * <LI><B>UPDATE_RULE</B> short => What happens to a
1927     * foreign key when the primary key is updated:
1928     * <UL>
1929     * <LI> importedNoAction - do not allow update of primary
1930     * key if it has been imported
1931     * <LI> importedKeyCascade - change imported key to agree
1932     * with primary key update
1933     * <LI> importedKeySetNull - change imported key to <code>NULL</code>
1934     * if its primary key has been updated
1935     * <LI> importedKeySetDefault - change imported key to default values
1936     * if its primary key has been updated
1937     * <LI> importedKeyRestrict - same as importedKeyNoAction
1938     * (for ODBC 2.x compatibility)
1939     * </UL>
1940     * <LI><B>DELETE_RULE</B> short => What happens to
1941     * the foreign key when primary is deleted.
1942     * <UL>
1943     * <LI> importedKeyNoAction - do not allow delete of primary
1944     * key if it has been imported
1945     * <LI> importedKeyCascade - delete rows that import a deleted key
1946     * <LI> importedKeySetNull - change imported key to NULL if
1947     * its primary key has been deleted
1948     * <LI> importedKeyRestrict - same as importedKeyNoAction
1949     * (for ODBC 2.x compatibility)
1950     * <LI> importedKeySetDefault - change imported key to default if
1951     * its primary key has been deleted
1952     * </UL>
1953     * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
1954     * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
1955     * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
1956     * constraints be deferred until commit
1957     * <UL>
1958     * <LI> importedKeyInitiallyDeferred - see SQL92 for definition
1959     * <LI> importedKeyInitiallyImmediate - see SQL92 for definition
1960     * <LI> importedKeyNotDeferrable - see SQL92 for definition
1961     * </UL>
1962     * </OL>
1963     *
1964     * @param catalog a catalog name; must match the catalog name as it
1965     * is stored in the database; "" retrieves those without a catalog;
1966     * <code>null</code> means that the catalog name should not be used to narrow
1967     * the search
1968     * @param schema a schema name; must match the schema name
1969     * as it is stored in the database; "" retrieves those without a schema;
1970     * <code>null</code> means that the schema name should not be used to narrow
1971     * the search
1972     * @param table a table name; must match the table name as it is stored
1973     * in the database
1974     * @return <code>ResultSet</code> - each row is a primary key column description
1975     * @exception SQLException if a database access error occurs
1976     * @see #getExportedKeys
1977     */

1978    ResultSet JavaDoc getImportedKeys(String JavaDoc catalog, String JavaDoc schema,
1979                  String JavaDoc table) throws SQLException JavaDoc;
1980
1981    /**
1982     * For the column <code>UPDATE_RULE</code>,
1983     * indicates that
1984     * when the primary key is updated, the foreign key (imported key)
1985     * is changed to agree with it.
1986     * For the column <code>DELETE_RULE</code>,
1987     * it indicates that
1988     * when the primary key is deleted, rows that imported that key
1989     * are deleted.
1990     * <P>
1991     * A possible value for the columns <code>UPDATE_RULE</code>
1992     * and <code>DELETE_RULE</code> in the
1993     * <code>ResultSet</code> objects returned by the methods
1994     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
1995     * and <code>getCrossReference</code>.
1996     */

1997    int importedKeyCascade = 0;
1998
1999    /**
2000     * For the column <code>UPDATE_RULE</code>, indicates that
2001     * a primary key may not be updated if it has been imported by
2002     * another table as a foreign key.
2003     * For the column <code>DELETE_RULE</code>, indicates that
2004     * a primary key may not be deleted if it has been imported by
2005     * another table as a foreign key.
2006     * <P>
2007     * A possible value for the columns <code>UPDATE_RULE</code>
2008     * and <code>DELETE_RULE</code> in the
2009     * <code>ResultSet</code> objects returned by the methods
2010     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2011     * and <code>getCrossReference</code>.
2012     */

2013    int importedKeyRestrict = 1;
2014
2015    /**
2016     * For the columns <code>UPDATE_RULE</code>
2017     * and <code>DELETE_RULE</code>, indicates that
2018     * when the primary key is updated or deleted, the foreign key (imported key)
2019     * is changed to <code>NULL</code>.
2020     * <P>
2021     * A possible value for the columns <code>UPDATE_RULE</code>
2022     * and <code>DELETE_RULE</code> in the
2023     * <code>ResultSet</code> objects returned by the methods
2024     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2025     * and <code>getCrossReference</code>.
2026     */

2027    int importedKeySetNull = 2;
2028
2029    /**
2030     * For the columns <code>UPDATE_RULE</code>
2031     * and <code>DELETE_RULE</code>, indicates that
2032     * if the primary key has been imported, it cannot be updated or deleted.
2033     * <P>
2034     * A possible value for the columns <code>UPDATE_RULE</code>
2035     * and <code>DELETE_RULE</code> in the
2036     * <code>ResultSet</code> objects returned by the methods
2037     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2038     * and <code>getCrossReference</code>.
2039     */

2040    int importedKeyNoAction = 3;
2041
2042    /**
2043     * For the columns <code>UPDATE_RULE</code>
2044     * and <code>DELETE_RULE</code>, indicates that
2045     * if the primary key is updated or deleted, the foreign key (imported key)
2046     * is set to the default value.
2047     * <P>
2048     * A possible value for the columns <code>UPDATE_RULE</code>
2049     * and <code>DELETE_RULE</code> in the
2050     * <code>ResultSet</code> objects returned by the methods
2051     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2052     * and <code>getCrossReference</code>.
2053     */

2054    int importedKeySetDefault = 4;
2055
2056    /**
2057     * Indicates deferrability. See SQL-92 for a definition.
2058     * <P>
2059     * A possible value for the column <code>DEFERRABILITY</code>
2060     * in the <code>ResultSet</code> objects returned by the methods
2061     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2062     * and <code>getCrossReference</code>.
2063     */

2064    int importedKeyInitiallyDeferred = 5;
2065
2066    /**
2067     * Indicates deferrability. See SQL-92 for a definition.
2068     * <P>
2069     * A possible value for the column <code>DEFERRABILITY</code>
2070     * in the <code>ResultSet</code> objects returned by the methods
2071     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2072     * and <code>getCrossReference</code>.
2073     */

2074    int importedKeyInitiallyImmediate = 6;
2075
2076    /**
2077     * Indicates deferrability. See SQL-92 for a definition.
2078     * <P>
2079     * A possible value for the column <code>DEFERRABILITY</code>
2080     * in the <code>ResultSet</code> objects returned by the methods
2081     * <code>getImportedKeys</code>, <code>getExportedKeys</code>,
2082     * and <code>getCrossReference</code>.
2083     */

2084    int importedKeyNotDeferrable = 7;
2085
2086    /**
2087     * Retrieves a description of the foreign key columns that reference the
2088     * given table's primary key columns (the foreign keys exported by a
2089     * table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
2090     * FKTABLE_NAME, and KEY_SEQ.
2091     *
2092     * <P>Each foreign key column description has the following columns:
2093     * <OL>
2094     * <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>)
2095     * <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>)
2096     * <LI><B>PKTABLE_NAME</B> String => primary key table name
2097     * <LI><B>PKCOLUMN_NAME</B> String => primary key column name
2098     * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
2099     * being exported (may be <code>null</code>)
2100     * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
2101     * being exported (may be <code>null</code>)
2102     * <LI><B>FKTABLE_NAME</B> String => foreign key table name
2103     * being exported
2104     * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
2105     * being exported
2106     * <LI><B>KEY_SEQ</B> short => sequence number within foreign key
2107     * <LI><B>UPDATE_RULE</B> short => What happens to
2108     * foreign key when primary is updated:
2109     * <UL>
2110     * <LI> importedNoAction - do not allow update of primary
2111     * key if it has been imported
2112     * <LI> importedKeyCascade - change imported key to agree
2113     * with primary key update
2114     * <LI> importedKeySetNull - change imported key to <code>NULL</code> if
2115     * its primary key has been updated
2116     * <LI> importedKeySetDefault - change imported key to default values
2117     * if its primary key has been updated
2118     * <LI> importedKeyRestrict - same as importedKeyNoAction
2119     * (for ODBC 2.x compatibility)
2120     * </UL>
2121     * <LI><B>DELETE_RULE</B> short => What happens to
2122     * the foreign key when primary is deleted.
2123     * <UL>
2124     * <LI> importedKeyNoAction - do not allow delete of primary
2125     * key if it has been imported
2126     * <LI> importedKeyCascade - delete rows that import a deleted key
2127     * <LI> importedKeySetNull - change imported key to <code>NULL</code> if
2128     * its primary key has been deleted
2129     * <LI> importedKeyRestrict - same as importedKeyNoAction
2130     * (for ODBC 2.x compatibility)
2131     * <LI> importedKeySetDefault - change imported key to default if
2132     * its primary key has been deleted
2133     * </UL>
2134     * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
2135     * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
2136     * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
2137     * constraints be deferred until commit
2138     * <UL>
2139     * <LI> importedKeyInitiallyDeferred - see SQL92 for definition
2140     * <LI> importedKeyInitiallyImmediate - see SQL92 for definition
2141     * <LI> importedKeyNotDeferrable - see SQL92 for definition
2142     * </UL>
2143     * </OL>
2144     *
2145     * @param catalog a catalog name; must match the catalog name as it
2146     * is stored in this database; "" retrieves those without a catalog;
2147     * <code>null</code> means that the catalog name should not be used to narrow
2148     * the search
2149     * @param schema a schema name; must match the schema name
2150     * as it is stored in the database; "" retrieves those without a schema;
2151     * <code>null</code> means that the schema name should not be used to narrow
2152     * the search
2153     * @param table a table name; must match the table name as it is stored
2154     * in this database
2155     * @return a <code>ResultSet</code> object in which each row is a
2156     * foreign key column description
2157     * @exception SQLException if a database access error occurs
2158     * @see #getImportedKeys
2159     */

2160    ResultSet JavaDoc getExportedKeys(String JavaDoc catalog, String JavaDoc schema,
2161                  String JavaDoc table) throws SQLException JavaDoc;
2162
2163    /**
2164     * Retrieves a description of the foreign key columns in the given foreign key
2165     * table that reference the primary key columns of the given primary key
2166     * table (describe how one table imports another's key). This
2167     * should normally return a single foreign key/primary key pair because
2168     * most tables import a foreign key from a table only once. They
2169     * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
2170     * KEY_SEQ.
2171     *
2172     * <P>Each foreign key column description has the following columns:
2173     * <OL>
2174     * <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>)
2175     * <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>)
2176     * <LI><B>PKTABLE_NAME</B> String => primary key table name
2177     * <LI><B>PKCOLUMN_NAME</B> String => primary key column name
2178     * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
2179     * being exported (may be <code>null</code>)
2180     * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
2181     * being exported (may be <code>null</code>)
2182     * <LI><B>FKTABLE_NAME</B> String => foreign key table name
2183     * being exported
2184     * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
2185     * being exported
2186     * <LI><B>KEY_SEQ</B> short => sequence number within foreign key
2187     * <LI><B>UPDATE_RULE</B> short => What happens to
2188     * foreign key when primary is updated:
2189     * <UL>
2190     * <LI> importedNoAction - do not allow update of primary
2191     * key if it has been imported
2192     * <LI> importedKeyCascade - change imported key to agree
2193     * with primary key update
2194     * <LI> importedKeySetNull - change imported key to <code>NULL</code> if
2195     * its primary key has been updated
2196     * <LI> importedKeySetDefault - change imported key to default values
2197     * if its primary key has been updated
2198     * <LI> importedKeyRestrict - same as importedKeyNoAction
2199     * (for ODBC 2.x compatibility)
2200     * </UL>
2201     * <LI><B>DELETE_RULE</B> short => What happens to
2202     * the foreign key when primary is deleted.
2203     * <UL>
2204     * <LI> importedKeyNoAction - do not allow delete of primary
2205     * key if it has been imported
2206     * <LI> importedKeyCascade - delete rows that import a deleted key
2207     * <LI> importedKeySetNull - change imported key to <code>NULL</code> if
2208     * its primary key has been deleted
2209     * <LI> importedKeyRestrict - same as importedKeyNoAction
2210     * (for ODBC 2.x compatibility)
2211     * <LI> importedKeySetDefault - change imported key to default if
2212     * its primary key has been deleted
2213     * </UL>
2214     * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
2215     * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
2216     * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
2217     * constraints be deferred until commit
2218     * <UL>
2219     * <LI> importedKeyInitiallyDeferred - see SQL92 for definition
2220     * <LI> importedKeyInitiallyImmediate - see SQL92 for definition
2221     * <LI> importedKeyNotDeferrable - see SQL92 for definition
2222     * </UL>
2223     * </OL>
2224     *
2225     * @param primaryCatalog a catalog name; must match the catalog name
2226     * as it is stored in the database; "" retrieves those without a
2227     * catalog; <code>null</code> means drop catalog name from the selection criteria
2228     * @param primarySchema a schema name; must match the schema name as
2229     * it is stored in the database; "" retrieves those without a schema;
2230     * <code>null</code> means drop schema name from the selection criteria
2231     * @param primaryTable the name of the table that exports the key; must match
2232     * the table name as it is stored in the database
2233     * @param foreignCatalog a catalog name; must match the catalog name as
2234     * it is stored in the database; "" retrieves those without a
2235     * catalog; <code>null</code> means drop catalog name from the selection criteria
2236     * @param foreignSchema a schema name; must match the schema name as it
2237     * is stored in the database; "" retrieves those without a schema;
2238     * <code>null</code> means drop schema name from the selection criteria
2239     * @param foreignTable the name of the table that imports the key; must match
2240     * the table name as it is stored in the database
2241     * @return <code>ResultSet</code> - each row is a foreign key column description
2242     * @exception SQLException if a database access error occurs
2243     * @see #getImportedKeys
2244     */

2245    ResultSet JavaDoc getCrossReference(
2246                String JavaDoc primaryCatalog, String JavaDoc primarySchema, String JavaDoc primaryTable,
2247                String JavaDoc foreignCatalog, String JavaDoc foreignSchema, String JavaDoc foreignTable
2248                ) throws SQLException JavaDoc;
2249
2250    /**
2251     * Retrieves a description of all the standard SQL types supported by
2252     * this database. They are ordered by DATA_TYPE and then by how
2253     * closely the data type maps to the corresponding JDBC SQL type.
2254     *
2255     * <P>Each type description has the following columns:
2256     * <OL>
2257     * <LI><B>TYPE_NAME</B> String => Type name
2258     * <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types
2259     * <LI><B>PRECISION</B> int => maximum precision
2260     * <LI><B>LITERAL_PREFIX</B> String => prefix used to quote a literal
2261     * (may be <code>null</code>)
2262     * <LI><B>LITERAL_SUFFIX</B> String => suffix used to quote a literal
2263     (may be <code>null</code>)
2264     * <LI><B>CREATE_PARAMS</B> String => parameters used in creating
2265     * the type (may be <code>null</code>)
2266     * <LI><B>NULLABLE</B> short => can you use NULL for this type.
2267     * <UL>
2268     * <LI> typeNoNulls - does not allow NULL values
2269     * <LI> typeNullable - allows NULL values
2270     * <LI> typeNullableUnknown - nullability unknown
2271     * </UL>
2272     * <LI><B>CASE_SENSITIVE</B> boolean=> is it case sensitive.
2273     * <LI><B>SEARCHABLE</B> short => can you use "WHERE" based on this type:
2274     * <UL>
2275     * <LI> typePredNone - No support
2276     * <LI> typePredChar - Only supported with WHERE .. LIKE
2277     * <LI> typePredBasic - Supported except for WHERE .. LIKE
2278     * <LI> typeSearchable - Supported for all WHERE ..
2279     * </UL>
2280     * <LI><B>UNSIGNED_ATTRIBUTE</B> boolean => is it unsigned.
2281     * <LI><B>FIXED_PREC_SCALE</B> boolean => can it be a money value.
2282     * <LI><B>AUTO_INCREMENT</B> boolean => can it be used for an
2283     * auto-increment value.
2284     * <LI><B>LOCAL_TYPE_NAME</B> String => localized version of type name
2285     * (may be <code>null</code>)
2286     * <LI><B>MINIMUM_SCALE</B> short => minimum scale supported
2287     * <LI><B>MAXIMUM_SCALE</B> short => maximum scale supported
2288     * <LI><B>SQL_DATA_TYPE</B> int => unused
2289     * <LI><B>SQL_DATETIME_SUB</B> int => unused
2290     * <LI><B>NUM_PREC_RADIX</B> int => usually 2 or 10
2291     * </OL>
2292     *
2293     * @return a <code>ResultSet</code> object in which each row is an SQL
2294     * type description
2295     * @exception SQLException if a database access error occurs
2296     */

2297    ResultSet JavaDoc getTypeInfo() throws SQLException JavaDoc;
2298    
2299    /**
2300     * Indicates that a <code>NULL</code> value is NOT allowed for this
2301     * data type.
2302     * <P>
2303     * A possible value for column <code>NULLABLE</code> in the
2304     * <code>ResultSet</code> object returned by the method
2305     * <code>getTypeInfo</code>.
2306     */

2307    int typeNoNulls = 0;
2308
2309    /**
2310     * Indicates that a <code>NULL</code> value is allowed for this
2311     * data type.
2312     * <P>
2313     * A possible value for column <code>NULLABLE</code> in the
2314     * <code>ResultSet</code> object returned by the method
2315     * <code>getTypeInfo</code>.
2316     */

2317    int typeNullable = 1;
2318
2319    /**
2320     * Indicates that it is not known whether a <code>NULL</code> value
2321     * is allowed for this data type.
2322     * <P>
2323     * A possible value for column <code>NULLABLE</code> in the
2324     * <code>ResultSet</code> object returned by the method
2325     * <code>getTypeInfo</code>.
2326     */

2327    int typeNullableUnknown = 2;
2328
2329    /**
2330     * Indicates that <code>WHERE</code> search clauses are not supported
2331     * for this type.
2332     * <P>
2333     * A possible value for column <code>SEARCHABLE</code> in the
2334     * <code>ResultSet</code> object returned by the method
2335     * <code>getTypeInfo</code>.
2336     */

2337    int typePredNone = 0;
2338
2339    /**
2340     * Indicates that the only <code>WHERE</code> search clause that can
2341     * be based on this type is <code>WHERE . . . LIKE</code>.
2342     * <P>
2343     * A possible value for column <code>SEARCHABLE</code> in the
2344     * <code>ResultSet</code> object returned by the method
2345     * <code>getTypeInfo</code>.
2346     */

2347    int typePredChar = 1;
2348
2349    /**
2350     * Indicates that one can base all <code>WHERE</code> search clauses
2351     * except <code>WHERE . . . LIKE</code> on this data type.
2352     * <P>
2353     * A possible value for column <code>SEARCHABLE</code> in the
2354     * <code>ResultSet</code> object returned by the method
2355     * <code>getTypeInfo</code>.
2356     */

2357    int typePredBasic = 2;
2358
2359    /**
2360     * Indicates that all <code>WHERE</code> search clauses can be
2361     * based on this type.
2362     * <P>
2363     * A possible value for column <code>SEARCHABLE</code> in the
2364     * <code>ResultSet</code> object returned by the method
2365     * <code>getTypeInfo</code>.
2366     */

2367    int typeSearchable = 3;
2368
2369    /**
2370     * Retrieves a description of the given table's indices and statistics. They are
2371     * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
2372     *
2373     * <P>Each index column description has the following columns:
2374     * <OL>
2375     * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
2376     * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
2377     * <LI><B>TABLE_NAME</B> String => table name
2378     * <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique.
2379     * false when TYPE is tableIndexStatistic
2380     * <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be <code>null</code>);
2381     * <code>null</code> when TYPE is tableIndexStatistic
2382     * <LI><B>INDEX_NAME</B> String => index name; <code>null</code> when TYPE is
2383     * tableIndexStatistic
2384     * <LI><B>TYPE</B> short => index type:
2385     * <UL>
2386     * <LI> tableIndexStatistic - this identifies table statistics that are
2387     * returned in conjuction with a table's index descriptions
2388     * <LI> tableIndexClustered - this is a clustered index
2389     * <LI> tableIndexHashed - this is a hashed index
2390     * <LI> tableIndexOther - this is some other style of index
2391     * </UL>
2392     * <LI><B>ORDINAL_POSITION</B> short => column sequence number
2393     * within index; zero when TYPE is tableIndexStatistic
2394     * <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is
2395     * tableIndexStatistic
2396     * <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending,
2397     * "D" => descending, may be <code>null</code> if sort sequence is not supported;
2398     * <code>null</code> when TYPE is tableIndexStatistic
2399     * <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then
2400     * this is the number of rows in the table; otherwise, it is the
2401     * number of unique values in the index.
2402     * <LI><B>PAGES</B> int => When TYPE is tableIndexStatisic then
2403     * this is the number of pages used for the table, otherwise it
2404     * is the number of pages used for the current index.
2405     * <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.
2406     * (may be <code>null</code>)
2407     * </OL>
2408     *
2409     * @param catalog a catalog name; must match the catalog name as it
2410     * is stored in this database; "" retrieves those without a catalog;
2411     * <code>null</code> means that the catalog name should not be used to narrow
2412     * the search
2413     * @param schema a schema name; must match the schema name
2414     * as it is stored in this database; "" retrieves those without a schema;
2415     * <code>null</code> means that the schema name should not be used to narrow
2416     * the search
2417     * @param table a table name; must match the table name as it is stored
2418     * in this database
2419     * @param unique when true, return only indices for unique values;
2420     * when false, return indices regardless of whether unique or not
2421     * @param approximate when true, result is allowed to reflect approximate
2422     * or out of data values; when false, results are requested to be
2423     * accurate
2424     * @return <code>ResultSet</code> - each row is an index column description
2425     * @exception SQLException if a database access error occurs
2426     */

2427    ResultSet JavaDoc getIndexInfo(String JavaDoc catalog, String JavaDoc schema, String JavaDoc table,
2428               boolean unique, boolean approximate)
2429    throws SQLException JavaDoc;
2430
2431    /**
2432     * Indicates that this column contains table statistics that
2433     * are returned in conjunction with a table's index descriptions.
2434     * <P>
2435     * A possible value for column <code>TYPE</code> in the
2436     * <code>ResultSet</code> object returned by the method
2437     * <code>getIndexInfo</code>.
2438     */

2439    short tableIndexStatistic = 0;
2440
2441    /**
2442     * Indicates that this table index is a clustered index.
2443     * <P>
2444     * A possible value for column <code>TYPE</code> in the
2445     * <code>ResultSet</code> object returned by the method
2446     * <code>getIndexInfo</code>.
2447     */

2448    short tableIndexClustered = 1;
2449
2450    /**
2451     * Indicates that this table index is a hashed index.
2452     * <P>
2453     * A possible value for column <code>TYPE</code> in the
2454     * <code>ResultSet</code> object returned by the method
2455     * <code>getIndexInfo</code>.
2456     */

2457    short tableIndexHashed = 2;
2458
2459    /**
2460     * Indicates that this table index is not a clustered
2461     * index, a hashed index, or table statistics;
2462     * it is something other than these.
2463     * <P>
2464     * A possible value for column <code>TYPE</code> in the
2465     * <code>ResultSet</code> object returned by the method
2466     * <code>getIndexInfo</code>.
2467     */

2468    short tableIndexOther = 3;
2469
2470    //--------------------------JDBC 2.0-----------------------------
2471

2472    /**
2473     * Retrieves whether this database supports the given result set type.
2474     *
2475     * @param type defined in <code>java.sql.ResultSet</code>
2476     * @return <code>true</code> if so; <code>false</code> otherwise
2477     * @exception SQLException if a database access error occurs
2478     * @see Connection
2479     * @since 1.2
2480     */

2481    boolean supportsResultSetType(int type) throws SQLException JavaDoc;
2482
2483    /**
2484     * Retrieves whether this database supports the given concurrency type
2485     * in combination with the given result set type.
2486     *
2487     * @param type defined in <code>java.sql.ResultSet</code>
2488     * @param concurrency type defined in <code>java.sql.ResultSet</code>
2489     * @return <code>true</code> if so; <code>false</code> otherwise
2490     * @exception SQLException if a database access error occurs
2491     * @see Connection
2492     * @since 1.2
2493     */

2494    boolean supportsResultSetConcurrency(int type, int concurrency)
2495    throws SQLException JavaDoc;
2496
2497    /**
2498     *
2499     * Retrieves whether for the given type of <code>ResultSet</code> object,
2500     * the result set's own updates are visible.
2501     *
2502     * @param type the <code>ResultSet</code> type; one of
2503     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2504     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2505     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2506     * @return <code>true</code> if updates are visible for the given result set type;
2507     * <code>false</code> otherwise
2508     * @exception SQLException if a database access error occurs
2509     * @since 1.2
2510     */

2511    boolean ownUpdatesAreVisible(int type) throws SQLException JavaDoc;
2512
2513    /**
2514     * Retrieves whether a result set's own deletes are visible.
2515     *
2516     * @param type the <code>ResultSet</code> type; one of
2517     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2518     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2519     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2520     * @return <code>true</code> if deletes are visible for the given result set type;
2521     * <code>false</code> otherwise
2522     * @exception SQLException if a database access error occurs
2523     * @since 1.2
2524     */

2525    boolean ownDeletesAreVisible(int type) throws SQLException JavaDoc;
2526
2527    /**
2528     * Retrieves whether a result set's own inserts are visible.
2529     *
2530     * @param type the <code>ResultSet</code> type; one of
2531     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2532     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2533     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2534     * @return <code>true</code> if inserts are visible for the given result set type;
2535     * <code>false</code> otherwise
2536     * @exception SQLException if a database access error occurs
2537     * @since 1.2
2538     */

2539    boolean ownInsertsAreVisible(int type) throws SQLException JavaDoc;
2540
2541    /**
2542     * Retrieves whether updates made by others are visible.
2543     *
2544     * @param type the <code>ResultSet</code> type; one of
2545     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2546     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2547     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2548     * @return <code>true</code> if updates made by others
2549     * are visible for the given result set type;
2550     * <code>false</code> otherwise
2551     * @exception SQLException if a database access error occurs
2552     * @since 1.2
2553     */

2554    boolean othersUpdatesAreVisible(int type) throws SQLException JavaDoc;
2555
2556    /**
2557     * Retrieves whether deletes made by others are visible.
2558     *
2559     * @param type the <code>ResultSet</code> type; one of
2560     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2561     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2562     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2563     * @return <code>true</code> if deletes made by others
2564     * are visible for the given result set type;
2565     * <code>false</code> otherwise
2566     * @exception SQLException if a database access error occurs
2567     * @since 1.2
2568     */

2569    boolean othersDeletesAreVisible(int type) throws SQLException JavaDoc;
2570
2571    /**
2572     * Retrieves whether inserts made by others are visible.
2573     *
2574     * @param type the <code>ResultSet</code> type; one of
2575     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2576     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2577     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2578     * @return <code>true</code> if inserts made by others
2579     * are visible for the given result set type;
2580     * <code>false</code> otherwise
2581     * @exception SQLException if a database access error occurs
2582     * @since 1.2
2583     */

2584    boolean othersInsertsAreVisible(int type) throws SQLException JavaDoc;
2585
2586    /**
2587     * Retrieves whether or not a visible row update can be detected by
2588     * calling the method <code>ResultSet.rowUpdated</code>.
2589     *
2590     * @param type the <code>ResultSet</code> type; one of
2591     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2592     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2593     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2594     * @return <code>true</code> if changes are detected by the result set type;
2595     * <code>false</code> otherwise
2596     * @exception SQLException if a database access error occurs
2597     * @since 1.2
2598     */

2599    boolean updatesAreDetected(int type) throws SQLException JavaDoc;
2600
2601    /**
2602     * Retrieves whether or not a visible row delete can be detected by
2603     * calling the method <code>ResultSet.rowDeleted</code>. If the method
2604     * <code>deletesAreDetected</code> returns <code>false</code>, it means that
2605     * deleted rows are removed from the result set.
2606     *
2607     * @param type the <code>ResultSet</code> type; one of
2608     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2609     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2610     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2611     * @return <code>true</code> if deletes are detected by the given result set type;
2612     * <code>false</code> otherwise
2613     * @exception SQLException if a database access error occurs
2614     * @since 1.2
2615     */

2616    boolean deletesAreDetected(int type) throws SQLException JavaDoc;
2617
2618    /**
2619     * Retrieves whether or not a visible row insert can be detected
2620     * by calling the method <code>ResultSet.rowInserted</code>.
2621     *
2622     * @param type the <code>ResultSet</code> type; one of
2623     * <code>ResultSet.TYPE_FORWARD_ONLY</code>,
2624     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
2625     * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
2626     * @return <code>true</code> if changes are detected by the specified result
2627     * set type; <code>false</code> otherwise
2628     * @exception SQLException if a database access error occurs
2629     * @since 1.2
2630     */

2631    boolean insertsAreDetected(int type) throws SQLException JavaDoc;
2632
2633    /**
2634     * Retrieves whether this database supports batch updates.
2635     *
2636     * @return <code>true</code> if this database supports batch upcates;
2637     * <code>false</code> otherwise
2638     * @exception SQLException if a database access error occurs
2639     * @since 1.2
2640     */

2641    boolean supportsBatchUpdates() throws SQLException JavaDoc;
2642
2643    /**
2644     * Retrieves a description of the user-defined types (UDTs) defined
2645     * in a particular schema. Schema-specific UDTs may have type
2646     * <code>JAVA_OBJECT</code>, <code>STRUCT</code>,
2647     * or <code>DISTINCT</code>.
2648     *
2649     * <P>Only types matching the catalog, schema, type name and type
2650     * criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM
2651     * and TYPE_NAME. The type name parameter may be a fully-qualified
2652     * name. In this case, the catalog and schemaPattern parameters are
2653     * ignored.
2654     *
2655     * <P>Each type description has the following columns:
2656     * <OL>
2657     * <LI><B>TYPE_CAT</B> String => the type's catalog (may be <code>null</code>)
2658     * <LI><B>TYPE_SCHEM</B> String => type's schema (may be <code>null</code>)
2659     * <LI><B>TYPE_NAME</B> String => type name
2660     * <LI><B>CLASS_NAME</B> String => Java class name
2661     * <LI><B>DATA_TYPE</B> int => type value defined in java.sql.Types.
2662     * One of JAVA_OBJECT, STRUCT, or DISTINCT
2663     * <LI><B>REMARKS</B> String => explanatory comment on the type
2664     * <LI><B>BASE_TYPE</B> short => type code of the source type of a
2665     * DISTINCT type or the type that implements the user-generated
2666     * reference type of the SELF_REFERENCING_COLUMN of a structured
2667     * type as defined in java.sql.Types (<code>null</code> if DATA_TYPE is not
2668     * DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)
2669     * </OL>
2670     *
2671     * <P><B>Note:</B> If the driver does not support UDTs, an empty
2672     * result set is returned.
2673     *
2674     * @param catalog a catalog name; must match the catalog name as it
2675     * is stored in the database; "" retrieves those without a catalog;
2676     * <code>null</code> means that the catalog name should not be used to narrow
2677     * the search
2678     * @param schemaPattern a schema pattern name; must match the schema name
2679     * as it is stored in the database; "" retrieves those without a schema;
2680     * <code>null</code> means that the schema name should not be used to narrow
2681     * the search
2682     * @param typeNamePattern a type name pattern; must match the type name
2683     * as it is stored in the database; may be a fully qualified name
2684     * @param types a list of user-defined types (JAVA_OBJECT,
2685     * STRUCT, or DISTINCT) to include; <code>null</code> returns all types
2686     * @return <code>ResultSet</code> object in which each row describes a UDT
2687     * @exception SQLException if a database access error occurs
2688     * @since 1.2
2689     */

2690    ResultSet JavaDoc getUDTs(String JavaDoc catalog, String JavaDoc schemaPattern,
2691              String JavaDoc typeNamePattern, int[] types)
2692    throws SQLException JavaDoc;
2693
2694    /**
2695     * Retrieves the connection that produced this metadata object.
2696     * <P>
2697     * @return the connection that produced this metadata object
2698     * @exception SQLException if a database access error occurs
2699     * @since 1.2
2700     */

2701    Connection JavaDoc getConnection() throws SQLException JavaDoc;
2702
2703    // ------------------- JDBC 3.0 -------------------------
2704

2705    /**
2706     * Retrieves whether this database supports savepoints.
2707     *
2708     * @return <code>true</code> if savepoints are supported;
2709     * <code>false</code> otherwise
2710     * @exception SQLException if a database access error occurs
2711     * @since 1.4
2712     */

2713    boolean supportsSavepoints() throws SQLException JavaDoc;
2714
2715    /**
2716     * Retrieves whether this database supports named parameters to callable
2717     * statements.
2718     *
2719     * @return <code>true</code> if named parameters are supported;
2720     * <code>false</code> otherwise
2721     * @exception SQLException if a database access error occurs
2722     * @since 1.4
2723     */

2724    boolean supportsNamedParameters() throws SQLException JavaDoc;
2725
2726    /**
2727     * Retrieves whether it is possible to have multiple <code>ResultSet</code> objects
2728     * returned from a <code>CallableStatement</code> object
2729     * simultaneously.
2730     *
2731     * @return <code>true</code> if a <code>CallableStatement</code> object
2732     * can return multiple <code>ResultSet</code> objects
2733     * simultaneously; <code>false</code> otherwise
2734     * @exception SQLException if a datanase access error occurs
2735     * @since 1.4
2736     */

2737    boolean supportsMultipleOpenResults() throws SQLException JavaDoc;
2738
2739    /**
2740     * Retrieves whether auto-generated keys can be retrieved after
2741     * a statement has been executed.
2742     *
2743     * @return <code>true</code> if auto-generated keys can be retrieved
2744     * after a statement has executed; <code>false</code> otherwise
2745     * @exception SQLException if a database access error occurs
2746     * @since 1.4
2747     */

2748    boolean supportsGetGeneratedKeys() throws SQLException JavaDoc;
2749
2750    /**
2751     * Retrieves a description of the user-defined type (UDT) hierarchies defined in a
2752     * particular schema in this database. Only the immediate super type/
2753     * sub type relationship is modeled.
2754     * <P>
2755     * Only supertype information for UDTs matching the catalog,
2756     * schema, and type name is returned. The type name parameter
2757     * may be a fully-qualified name. When the UDT name supplied is a
2758     * fully-qualified name, the catalog and schemaPattern parameters are
2759     * ignored.
2760     * <P>
2761     * If a UDT does not have a direct super type, it is not listed here.
2762     * A row of the <code>ResultSet</code> object returned by this method
2763     * describes the designated UDT and a direct supertype. A row has the following
2764     * columns:
2765     * <OL>
2766     * <LI><B>TYPE_CAT</B> String => the UDT's catalog (may be <code>null</code>)
2767     * <LI><B>TYPE_SCHEM</B> String => UDT's schema (may be <code>null</code>)
2768     * <LI><B>TYPE_NAME</B> String => type name of the UDT
2769     * <LI><B>SUPERTYPE_CAT</B> String => the direct super type's catalog
2770     * (may be <code>null</code>)
2771     * <LI><B>SUPERTYPE_SCHEM</B> String => the direct super type's schema
2772     * (may be <code>null</code>)
2773     * <LI><B>SUPERTYPE_NAME</B> String => the direct super type's name
2774     * </OL>
2775     *
2776     * <P><B>Note:</B> If the driver does not support type hierarchies, an
2777     * empty result set is returned.
2778     *
2779     * @param catalog a catalog name; "" retrieves those without a catalog;
2780     * <code>null</code> means drop catalog name from the selection criteria
2781     * @param schemaPattern a schema name pattern; "" retrieves those
2782     * without a schema
2783     * @param typeNamePattern a UDT name pattern; may be a fully-qualified
2784     * name
2785     * @return a <code>ResultSet</code> object in which a row gives information
2786     * about the designated UDT
2787     * @throws SQLException if a database access error occurs
2788     * @since 1.4
2789     */

2790    ResultSet JavaDoc getSuperTypes(String JavaDoc catalog, String JavaDoc schemaPattern,
2791                String JavaDoc typeNamePattern) throws SQLException JavaDoc;
2792    
2793    /**
2794     * Retrieves a description of the table hierarchies defined in a particular
2795     * schema in this database.
2796     *
2797     * <P>Only supertable information for tables matching the catalog, schema
2798     * and table name are returned. The table name parameter may be a fully-
2799     * qualified name, in which case, the catalog and schemaPattern parameters
2800     * are ignored. If a table does not have a super table, it is not listed here.
2801     * Supertables have to be defined in the same catalog and schema as the
2802     * sub tables. Therefore, the type description does not need to include
2803     * this information for the supertable.
2804     *
2805     * <P>Each type description has the following columns:
2806     * <OL>
2807     * <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>)
2808     * <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>)
2809     * <LI><B>TABLE_NAME</B> String => type name
2810     * <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name
2811     * </OL>
2812     *
2813     * <P><B>Note:</B> If the driver does not support type hierarchies, an
2814     * empty result set is returned.
2815     *
2816     * @param catalog a catalog name; "" retrieves those without a catalog;
2817     * <code>null</code> means drop catalog name from the selection criteria
2818     * @param schemaPattern a schema name pattern; "" retrieves those
2819     * without a schema
2820     * @param tableNamePattern a table name pattern; may be a fully-qualified
2821     * name
2822     * @return a <code>ResultSet</code> object in which each row is a type description
2823     * @throws SQLException if a database access error occurs
2824     * @since 1.4
2825     */

2826    ResultSet JavaDoc getSuperTables(String JavaDoc catalog, String JavaDoc schemaPattern,
2827                 String JavaDoc tableNamePattern) throws SQLException JavaDoc;
2828
2829    /**
2830     * Indicates that <code>NULL</code> values might not be allowed.
2831     * <P>
2832     * A possible value for the column
2833     * <code>NULLABLE</code> in the <code>ResultSet</code> object
2834     * returned by the method <code>getAttributes</code>.
2835     */

2836    short attributeNoNulls = 0;
2837
2838    /**
2839     * Indicates that <code>NULL</code> values are definitely allowed.
2840     * <P>
2841     * A possible value for the column <code>NULLABLE</code>
2842     * in the <code>ResultSet</code> object
2843     * returned by the method <code>getAttributes</code>.
2844     */

2845    short attributeNullable = 1;
2846
2847    /**
2848     * Indicates that whether <code>NULL</code> values are allowed is not
2849     * known.
2850     * <P>
2851     * A possible value for the column <code>NULLABLE</code>
2852     * in the <code>ResultSet</code> object
2853     * returned by the method <code>getAttributes</code>.
2854     */

2855    short attributeNullableUnknown = 2;
2856
2857    /**
2858     * Retrieves a description of the given attribute of the given type
2859     * for a user-defined type (UDT) that is available in the given schema
2860     * and catalog.
2861     * <P>
2862     * Descriptions are returned only for attributes of UDTs matching the
2863     * catalog, schema, type, and attribute name criteria. They are ordered by
2864     * TYPE_SCHEM, TYPE_NAME and ORDINAL_POSITION. This description
2865     * does not contain inherited attributes.
2866     * <P>
2867     * The <code>ResultSet</code> object that is returned has the following
2868     * columns:
2869     * <OL>
2870     * <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>)
2871     * <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>)
2872     * <LI><B>TYPE_NAME</B> String => type name
2873     * <LI><B>ATTR_NAME</B> String => attribute name
2874     * <LI><B>DATA_TYPE</B> int => attribute type SQL type from java.sql.Types
2875     * <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name.
2876     * For a UDT, the type name is fully qualified. For a REF, the type name is
2877     * fully qualified and represents the target type of the reference type.
2878     * <LI><B>ATTR_SIZE</B> int => column size. For char or date
2879     * types this is the maximum number of characters; for numeric or
2880     * decimal types this is precision.
2881     * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
2882     * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
2883     * <LI><B>NULLABLE</B> int => whether NULL is allowed
2884     * <UL>
2885     * <LI> attributeNoNulls - might not allow NULL values
2886     * <LI> attributeNullable - definitely allows NULL values
2887     * <LI> attributeNullableUnknown - nullability unknown
2888     * </UL>
2889     * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
2890     * <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>)
2891     * <LI><B>SQL_DATA_TYPE</B> int => unused
2892     * <LI><B>SQL_DATETIME_SUB</B> int => unused
2893     * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
2894     * maximum number of bytes in the column
2895     * <LI><B>ORDINAL_POSITION</B> int => index of column in table
2896     * (starting at 1)
2897     * <LI><B>IS_NULLABLE</B> String => "NO" means column definitely
2898     * does not allow NULL values; "YES" means the column might
2899     * allow NULL values. An empty string means unknown.
2900     * <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the
2901     * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
2902     * <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the
2903     * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
2904     * <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a
2905     * reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
2906     * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
2907     * Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
2908     * isn't DISTINCT or user-generated REF)
2909     * </OL>
2910     * @param catalog a catalog name; must match the catalog name as it
2911     * is stored in the database; "" retrieves those without a catalog;
2912     * <code>null</code> means that the catalog name should not be used to narrow
2913     * the search
2914     * @param schemaPattern a schema name pattern; must match the schema name
2915     * as it is stored in the database; "" retrieves those without a schema;
2916     * <code>null</code> means that the schema name should not be used to narrow
2917     * the search
2918     * @param typeNamePattern a type name pattern; must match the
2919     * type name as it is stored in the database
2920     * @param attributeNamePattern an attribute name pattern; must match the attribute
2921     * name as it is declared in the database
2922     * @return a <code>ResultSet</code> object in which each row is an
2923     * attribute description
2924     * @exception SQLException if a database access error occurs
2925     * @since 1.4
2926     */

2927    ResultSet JavaDoc getAttributes(String JavaDoc catalog, String JavaDoc schemaPattern,
2928                String JavaDoc typeNamePattern, String JavaDoc attributeNamePattern)
2929    throws SQLException JavaDoc;
2930
2931    /**
2932     * Retrieves whether this database supports the given result set holdability.
2933     *
2934     * @param holdability one of the following constants:
2935     * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
2936     * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
2937     * @return <code>true</code> if so; <code>false</code> otherwise
2938     * @exception SQLException if a database access error occurs
2939     * @see Connection
2940     * @since 1.4
2941     */

2942    boolean supportsResultSetHoldability(int holdability) throws SQLException JavaDoc;
2943
2944    /**
2945     * Retrieves the default holdability of this <code>ResultSet</code>
2946     * object.
2947     *
2948     * @return the default holdability; either
2949     * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
2950     * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
2951     * @exception SQLException if a database access error occurs
2952     * @since 1.4
2953     */

2954    int getResultSetHoldability() throws SQLException JavaDoc;
2955
2956    /**
2957     * Retrieves the major version number of the underlying database.
2958     *
2959     * @return the underlying database's major version
2960     * @exception SQLException if a database access error occurs
2961     * @since 1.4
2962     */

2963    int getDatabaseMajorVersion() throws SQLException JavaDoc;
2964
2965    /**
2966     * Retrieves the minor version number of the underlying database.
2967     *
2968     * @return underlying database's minor version
2969     * @exception SQLException if a database access error occurs
2970     * @since 1.4
2971     */

2972    int getDatabaseMinorVersion() throws SQLException JavaDoc;
2973
2974    /**
2975     * Retrieves the major JDBC version number for this
2976     * driver.
2977     *
2978     * @return JDBC version major number
2979     * @exception SQLException if a database access error occurs
2980     * @since 1.4
2981     */

2982    int getJDBCMajorVersion() throws SQLException JavaDoc;
2983
2984    /**
2985     * Retrieves the minor JDBC version number for this
2986     * driver.
2987     *
2988     * @return JDBC version minor number
2989     * @exception SQLException if a database access error occurs
2990     * @since 1.4
2991     */

2992    int getJDBCMinorVersion() throws SQLException JavaDoc;
2993
2994    /**
2995     * Indicates that the value is an
2996     * X/Open (now know as Open Group) SQL CLI SQLSTATE value.
2997     * <P>
2998     * A possible return value for the method
2999     * <code>SQLException.getSQLState</code>.
3000     * @since 1.4
3001     */

3002    int sqlStateXOpen = 1;
3003
3004    /**
3005     * Indicates that the value is an SQL99 SQLSTATE value.
3006     * <P>
3007     * A possible return value for the method
3008     * <code>SQLException.getSQLState</code>.
3009     * @since 1.4
3010     */

3011    int sqlStateSQL99 = 2;
3012
3013    /**
3014     * Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code>
3015     * is X/Open (now known as Open Group) SQL CLI or SQL99.
3016     * @return the type of SQLSTATE; one of:
3017     * sqlStateXOpen or
3018     * sqlStateSQL99
3019     * @throws SQLException if a database access error occurs
3020     * @since 1.4
3021     */

3022    int getSQLStateType() throws SQLException JavaDoc;
3023
3024    /**
3025     * Indicates whether updates made to a LOB are made on a copy or directly
3026     * to the LOB.
3027     * @return <code>true</code> if updates are made to a copy of the LOB;
3028     * <code>false</code> if updates are made directly to the LOB
3029     * @throws SQLException if a database access error occurs
3030     * @since 1.4
3031     */

3032    boolean locatorsUpdateCopy() throws SQLException JavaDoc;
3033
3034    /**
3035     * Retrieves whether this database supports statement pooling.
3036     *
3037     * @return <code>true</code> if so; <code>false</code> otherwise
3038     * @throws SQLExcpetion if a database access error occurs
3039     * @since 1.4
3040     */

3041    boolean supportsStatementPooling() throws SQLException JavaDoc;
3042}
3043
3044
3045
3046
Popular Tags