1 /* DatabaseMetaData.java -- Information about the database itself.
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
40 public interface DatabaseMetaData
43 * It is unknown whether or not the procedure returns a result.
45 public static final int procedureResultUnknown
= 0;
48 * The procedure does not return a result.
50 public static final int procedureNoResult
= 1;
53 * The procedure returns a result.
55 public static final int procedureReturnsResult
= 2;
58 * The column type is unknown.
60 public static final int procedureColumnUnknown
= 0;
63 * The column type is input.
65 public static final int procedureColumnIn
= 1;
68 * The column type is input/output.
70 public static final int procedureColumnInOut
= 2;
73 * The column type is output
75 public static final int procedureColumnOut
= 4;
78 * The column is used for return values.
80 public static final int procedureColumnReturn
= 5;
83 * The column is used for storing results
85 public static final int procedureColumnResult
= 3;
88 * NULL values are not allowed.
90 public static final int procedureNoNulls
= 0;
93 * NULL values are allowed.
95 public static final int procedureNullable
= 1;
98 * It is unknown whether or not NULL values are allowed.
100 public static final int procedureNullableUnknown
= 2;
103 * The column does not allow NULL
105 public static final int columnNoNulls
= 0;
108 * The column does allow NULL
110 public static final int columnNullable
= 1;
113 * It is unknown whether or not the column allows NULL
115 public static final int columnNullableUnknown
= 2;
118 * The best row's scope is only guaranteed to be valid so long as the
119 * row is actually being used.
121 public static final int bestRowTemporary
= 0;
124 * The best row identifier is valid to the end of the transaction.
126 public static final int bestRowTransaction
= 1;
129 * The best row identifier is valid to the end of the session.
131 public static final int bestRowSession
= 2;
134 * The best row may or may not be a pseudo-column.
136 public static final int bestRowUnknown
= 0;
139 * The best row identifier is not a pseudo-column.
141 public static final int bestRowNotPseudo
= 1;
144 * The best row identifier is a pseudo-column.
146 public static final int bestRowPseudo
= 2;
149 * It is unknown whether or not the version column is a pseudo-column.
151 public static final int versionColumnUnknown
= 0;
154 * The version column is not a pseudo-column
156 public static final int versionColumnNotPseudo
= 1;
159 * The version column is a pseudo-column
161 public static final int versionColumnPseudo
= 2;
164 * Foreign key changes are cascaded in updates or deletes.
166 public static final int importedKeyCascade
= 0;
169 * Column may not be updated or deleted in use as a foreign key.
171 public static final int importedKeyRestrict
= 1;
174 * When primary key is updated or deleted, the foreign key is set to NULL.
176 public static final int importedKeySetNull
= 2;
179 * If the primary key is a foreign key, it cannot be udpated or deleted.
181 public static final int importedKeyNoAction
= 3;
184 * If the primary key is updated or deleted, the foreign key is set to
187 public static final int importedKeySetDefault
= 4;
190 * Wish I knew what this meant.
192 public static final int importedKeyInitiallyDeferred
= 5;
195 * Wish I knew what this meant.
197 public static final int importedKeyInitiallyImmediate
= 6;
200 * Wish I knew what this meant.
202 public static final int importedKeyNotDeferrable
= 7;
205 * A NULL value is not allowed for this data type.
207 public static final int typeNoNulls
= 0;
210 * A NULL value is allowed for this data type.
212 public static final int typeNullable
= 1;
215 * It is unknown whether or not NULL values are allowed for this data type.
217 public static final int typeNullableUnknown
= 2;
220 * Where clauses are not supported for this type.
222 public static final int typePredNone
= 0;
225 * Only "WHERE..LIKE" style WHERE clauses are allowed on this data type.
227 public static final int typePredChar
= 1;
230 * All WHERE clauses except "WHERE..LIKE" style are allowed on this data type.
232 public static final int typePredBasic
= 2;
235 * Any type of WHERE clause is allowed for this data type.
237 public static final int typeSearchable
= 3;
240 * This column contains table statistics.
242 public static final short tableIndexStatistic
= 0;
245 * This table index is clustered.
247 public static final short tableIndexClustered
= 1;
250 * This table index is hashed.
252 public static final short tableIndexHashed
= 2;
255 * This table index is of another type.
257 public static final short tableIndexOther
= 3;
259 public static final short attributeNoNulls
= 0;
261 public static final short attributeNullable
= 1;
263 public static final short attributeNullableUnknown
= 2;
265 public static final int sqlStateXOpen
= 1;
267 public static final int sqlStateSQL99
= 2;
270 * This method tests whether or not all the procedures returned by
271 * the <code>getProcedures</code> method can be called by this user.
273 * @return <code>true</code> if all the procedures can be called,
274 * <code>false</code> otherwise.
275 * @exception SQLException If an error occurs.
277 public boolean allProceduresAreCallable() throws SQLException
;
280 * This method tests whether or not all the table returned by the
281 * <code>getTables</code> method can be selected by this user.
283 * @return <code>true</code> if all the procedures can be called,
284 * <code>false</code> otherwise.
286 * @exception SQLException If an error occurs.
288 public boolean allTablesAreSelectable() throws SQLException
;
291 * This method returns the URL for this database.
293 * @return The URL string for this database, or <code>null</code> if it
295 * @exception SQLException If an error occurs.
297 public String
getURL() throws SQLException
;
300 * This method returns the database username for this connection.
302 * @return The database username.
303 * @exception SQLException If an error occurs.
305 public String
getUserName() throws SQLException
;
308 * This method tests whether or not the database is in read only mode.
310 * @return <code>true</code> if the database is in read only mode,
311 * <code>false</code> otherwise.
312 * @exception SQLException If an error occurs.
314 public boolean isReadOnly() throws SQLException
;
317 * This method tests whether or not NULL's sort as high values.
319 * @return <code>true</code> if NULL's sort as high values, <code>false</code>
321 * @exception SQLException If an error occurs.
323 public boolean nullsAreSortedHigh() throws SQLException
;
326 * This method tests whether or not NULL's sort as low values.
328 * @return <code>true</code> if NULL's sort as low values, <code>false</code>
330 * @exception SQLException If an error occurs.
332 public boolean nullsAreSortedLow() throws SQLException
;
335 * This method tests whether or not NULL's sort as high values.
337 * @return <code>true</code> if NULL's sort as high values, <code>false</code>
339 * @exception SQLException If an error occurs.
341 public boolean nullsAreSortedAtStart() throws SQLException
;
344 * This method test whether or not NULL's are sorted to the end
345 * of the list regardless of ascending or descending sort order.
347 * @return <code>true</code> if NULL's always sort to the end,
348 * <code>false</code> otherwise.
349 * @exception SQLException If an error occurs.
351 public boolean nullsAreSortedAtEnd() throws SQLException
;
354 * This method returns the name of the database product.
356 * @return The database product.
357 * @exception SQLException If an error occurs.
359 public String
getDatabaseProductName() throws SQLException
;
362 * This method returns the version of the database product.
364 * @return The version of the database product.
365 * @exception SQLException If an error occurs.
367 public String
getDatabaseProductVersion() throws SQLException
;
370 * This method returns the name of the JDBC driver.
372 * @return The name of the JDBC driver.
373 * @exception SQLException If an error occurs.
375 public String
getDriverName() throws SQLException
;
378 * This method returns the version of the JDBC driver.
380 * @return The version of the JDBC driver.
381 * @exception SQLException If an error occurs.
383 public String
getDriverVersion() throws SQLException
;
386 * This method returns the major version number of the JDBC driver.
388 * @return The major version number of the JDBC driver.
390 public int getDriverMajorVersion();
393 * This method returns the minor version number of the JDBC driver.
395 * @return The minor version number of the JDBC driver.
397 public int getDriverMinorVersion();
400 * This method tests whether or not the database uses local files to
403 * @return <code>true</code> if the database uses local files,
404 * <code>false</code> otherwise.
406 * @exception SQLException If an error occurs.
408 public boolean usesLocalFiles() throws SQLException
;
411 * This method tests whether or not the database uses a separate file for
414 * @return <code>true</code> if the database uses a separate file for each
415 * table </code>false</code> otherwise.
417 * @exception SQLException If an error occurs.
419 public boolean usesLocalFilePerTable() throws SQLException
;
422 * This method tests whether or not the database supports identifiers
425 * @return <code>true</code> if the database supports mixed case identifiers,
426 * <code>false</code> otherwise.
428 * @exception SQLException If an error occurs.
430 public boolean supportsMixedCaseIdentifiers() throws SQLException
;
433 * This method tests whether or not the database treats mixed case
434 * identifiers as all upper case.
436 * @exception <code>true</code> if the database treats all identifiers as
437 * upper case, <code>false</code> otherwise.
438 * @exception SQLException If an error occurs.
440 public boolean storesUpperCaseIdentifiers() throws SQLException
;
443 * This method tests whether or not the database treats mixed case
444 * identifiers as all lower case.
446 * @exception <code>true</code> if the database treats all identifiers as
447 * lower case, <code>false</code> otherwise.
448 * @exception SQLException If an error occurs.
450 public boolean storesLowerCaseIdentifiers() throws SQLException
;
453 * This method tests whether or not the database stores mixed case
454 * identifers even if it treats them as case insensitive.
456 * @return <code>true</code> if the database stores mixed case identifiers,
457 * <code>false</code> otherwise.
458 * @exception SQLException If an error occurs.
460 public boolean storesMixedCaseIdentifiers() throws SQLException
;
463 * This method tests whether or not the database supports quoted identifiers
466 * @return <code>true</code> if the database supports mixed case quoted
467 * identifiers, <code>false</code> otherwise.
468 * @exception SQLException If an error occurs.
470 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException
;
473 * This method tests whether or not the database treats mixed case
474 * quoted identifiers as all upper case.
476 * @exception <code>true</code> if the database treats all quoted identifiers
477 * as upper case, <code>false</code> otherwise.
478 * @exception SQLException If an error occurs.
480 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException
;
483 * This method tests whether or not the database treats mixed case
484 * quoted identifiers as all lower case.
486 * @exception <code>true</code> if the database treats all quoted identifiers
487 * as lower case, <code>false</code> otherwise.
488 * @exception SQLException If an error occurs.
490 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException
;
493 * This method tests whether or not the database stores mixed case
494 * quoted identifers even if it treats them as case insensitive.
496 * @return <code>true</code> if the database stores mixed case quoted
497 * identifiers, <code>false</code> otherwise.
498 * @exception SQLException If an error occurs.
500 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException
;
503 * This metohd returns the quote string for SQL identifiers.
505 * @return The quote string for SQL identifers, or a space if quoting
507 * @exception SQLException If an error occurs.
509 public String
getIdentifierQuoteString() throws SQLException
;
512 * This method returns a comma separated list of all the SQL keywords in
513 * the database that are not in SQL92.
515 * @return The list of SQL keywords not in SQL92.
516 * @exception SQLException If an error occurs.
518 public String
getSQLKeywords() throws SQLException
;
521 * This method returns a comma separated list of math functions.
523 * @return The list of math functions.
524 * @exception SQLException If an error occurs.
526 public String
getNumericFunctions() throws SQLException
;
529 * This method returns a comma separated list of string functions.
531 * @return The list of string functions.
532 * @exception SQLException If an error occurs.
534 public String
getStringFunctions() throws SQLException
;
537 * This method returns a comma separated list of of system functions.
539 * @return A comma separated list of system functions.
540 * @exception SQLException If an error occurs.
542 public String
getSystemFunctions() throws SQLException
;
545 * This method returns comma separated list of time/date functions.
547 * @return The list of time/date functions.
548 * @exception SQLException If an error occurs.
550 public String
getTimeDateFunctions() throws SQLException
;
553 * This method returns the string used to escape wildcards in search strings.
555 * @return The string used to escape wildcards in search strings.
556 * @exception SQLException If an error occurs.
558 public String
getSearchStringEscape() throws SQLException
;
561 * This methods returns non-standard characters that can appear in
562 * unquoted identifiers.
564 * @return Non-standard characters that can appear in unquoted identifiers.
565 * @exception SQLException If an error occurs.
567 public String
getExtraNameCharacters() throws SQLException
;
570 * This method tests whether or not the database supports
571 * "ALTER TABLE ADD COLUMN"
573 * @return <code>true</code> if column add supported, <code>false</code>
575 * @exception SQLException If an error occurs.
577 public boolean supportsAlterTableWithAddColumn() throws SQLException
;
580 * This method tests whether or not the database supports
581 * "ALTER TABLE DROP COLUMN"
583 * @return <code>true</code> if column drop supported, <code>false</code>
585 * @exception SQLException If an error occurs.
587 public boolean supportsAlterTableWithDropColumn() throws SQLException
;
590 * This method tests whether or not column aliasing is supported.
592 * @return <code>true</code> if column aliasing is supported,
593 * <code>false</code> otherwise.
594 * @exception SQLException If an error occurs.
596 public boolean supportsColumnAliasing() throws SQLException
;
599 * This method tests whether the concatenation of a NULL and non-NULL
600 * value results in a NULL. This will always be true in fully JDBC compliant
603 * @return <code>true</code> if concatenating NULL and a non-NULL value
604 * returns a NULL, <code>false</code> otherwise.
605 * @exception SQLException If an error occurs.
607 public boolean nullPlusNonNullIsNull() throws SQLException
;
610 * Tests whether or not CONVERT is supported.
612 * @return <code>true</code> if CONVERT is supported, <code>false</code>
614 * @exception SQLException If an error occurs.
616 public boolean supportsConvert() throws SQLException
;
619 * This method tests whether or not CONVERT can be performed between the
620 * specified types. The types are contants from <code>Types</code>.
622 * @param fromType The SQL type to convert from.
623 * @param toType The SQL type to convert to.
624 * @return <code>true</code> if the conversion can be performed,
625 * <code>false</code> otherwise.
628 public boolean supportsConvert(int fromType
, int toType
) throws
632 * This method tests whether or not table correlation names are
633 * supported. This will be always be <code>true</code> in a fully JDBC
636 * @return <code>true</code> if table correlation names are supported,
637 * <code>false</code> otherwise.
638 * @exception SQLException If an error occurs.
640 public boolean supportsTableCorrelationNames() throws SQLException
;
643 * This method tests whether correlation names must be different from the
646 * @return <code>true</code> if the correlation name must be different from
647 * the table name, <code>false</code> otherwise.
648 * @exception SQLException If an error occurs.
650 public boolean supportsDifferentTableCorrelationNames() throws SQLException
;
653 * This method tests whether or not expressions are allowed in an
656 * @return <code>true</code> if expressions are allowed in ORDER BY
657 * lists, <code>false</code> otherwise.
658 * @exception SQLException If an error occurs.
660 public boolean supportsExpressionsInOrderBy() throws SQLException
;
663 * This method tests whether or ORDER BY on a non-selected column is
666 * @return <code>true</code> if a non-selected column can be used in an
667 * ORDER BY, <code>false</code> otherwise.
668 * @exception SQLException If an error occurs.
670 public boolean supportsOrderByUnrelated() throws SQLException
;
673 * This method tests whether or not GROUP BY is supported.
675 * @return <code>true</code> if GROUP BY is supported, <code>false</code>
677 * @exception SQLException If an error occurs.
679 public boolean supportsGroupBy() throws SQLException
;
682 * This method tests whether GROUP BY on a non-selected column is
685 * @return <code>true</code> if a non-selected column can be used in a
686 * GROUP BY, <code>false</code> otherwise.
687 * @exception SQLException If an error occurs.
689 public boolean supportsGroupByUnrelated() throws SQLException
;
692 * This method tests whether or not a GROUP BY can add columns not in the
693 * select if it includes all the columns in the select.
695 * @return <code>true</code> if GROUP BY an add columns provided it includes
696 * all columns in the select, <code>false</code> otherwise.
697 * @exception SQLException If an error occurs.
699 public boolean supportsGroupByBeyondSelect() throws SQLException
;
702 * This method tests whether or not the escape character is supported in
703 * LIKE expressions. A fully JDBC compliant driver will always return
706 * @return <code>true</code> if escapes are supported in LIKE expressions,
707 * <code>false</code> otherwise.
708 * @exception SQLException If an error occurs.
710 public boolean supportsLikeEscapeClause() throws SQLException
;
713 * This method tests whether multiple result sets for a single statement are
716 * @return <code>true</code> if multiple result sets are supported for a
717 * single statement, <code>false</code> otherwise.
718 * @exception SQLException If an error occurs.
720 public boolean supportsMultipleResultSets() throws SQLException
;
723 * This method test whether or not multiple transactions may be open
724 * at once, as long as they are on different connections.
726 * @return <code>true</code> if multiple transactions on different
727 * connections are supported, <code>false</code> otherwise.
728 * @exception SQLException If an error occurs.
730 public boolean supportsMultipleTransactions() throws SQLException
;
733 * This method tests whether or not columns can be defined as NOT NULL. A
734 * fully JDBC compliant driver always returns <code>true</code>.
736 * @return <code>true</code> if NOT NULL columns are supported,
737 * <code>false</code> otherwise.
738 * @exception SQLException If an error occurs.
740 public boolean supportsNonNullableColumns() throws SQLException
;
743 * This method tests whether or not the minimum grammer for ODBC is supported.
744 * A fully JDBC compliant driver will always return <code>true</code>.
746 * @return <code>true</code> if the ODBC minimum grammar is supported,
747 * <code>false</code> otherwise.
748 * @exception SQLException If an error occurs.
750 public boolean supportsMinimumSQLGrammar() throws SQLException
;
753 * This method tests whether or not the core grammer for ODBC is supported.
755 * @return <code>true</code> if the ODBC core grammar is supported,
756 * <code>false</code> otherwise.
757 * @exception SQLException If an error occurs.
759 public boolean supportsCoreSQLGrammar() throws SQLException
;
762 * This method tests whether or not the extended grammer for ODBC is supported.
764 * @return <code>true</code> if the ODBC extended grammar is supported,
765 * <code>false</code> otherwise.
766 * @exception SQLException If an error occurs.
768 public boolean supportsExtendedSQLGrammar() throws SQLException
;
771 * This method tests whether or not the ANSI92 entry level SQL
772 * grammar is supported. A fully JDBC compliant drivers must return
775 * @return <code>true</code> if the ANSI92 entry level SQL grammar is
776 * supported, <code>false</code> otherwise.
777 * @exception SQLException If an error occurs.
779 public boolean supportsANSI92EntryLevelSQL() throws SQLException
;
782 * This method tests whether or not the ANSI92 intermediate SQL
783 * grammar is supported.
785 * @return <code>true</code> if the ANSI92 intermediate SQL grammar is
786 * supported, <code>false</code> otherwise.
787 * @exception SQLException If an error occurs.
789 public boolean supportsANSI92IntermediateSQL() throws SQLException
;
792 * This method tests whether or not the ANSI92 full SQL
793 * grammar is supported.
795 * @return <code>true</code> if the ANSI92 full SQL grammar is
796 * supported, <code>false</code> otherwise.
797 * @exception SQLException If an error occurs.
799 public boolean supportsANSI92FullSQL() throws SQLException
;
802 * This method tests whether or not the SQL integrity enhancement
803 * facility is supported.
805 * @return <code>true</code> if the integrity enhancement facility is
806 * supported, <code>false</code> otherwise.
807 * @exception SQLException If an error occurs.
809 public boolean supportsIntegrityEnhancementFacility() throws SQLException
;
812 * This method tests whether or not the database supports outer joins.
814 * @return <code>true</code> if outer joins are supported, <code>false</code>
816 * @exception SQLException If an error occurs.
818 public boolean supportsOuterJoins() throws SQLException
;
821 * This method tests whether or not the database supports full outer joins.
823 * @return <code>true</code> if full outer joins are supported,
824 * <code>false</code> otherwise.
825 * @exception SQLException If an error occurs.
827 public boolean supportsFullOuterJoins() throws SQLException
;
830 * This method tests whether or not the database supports limited outer joins.
832 * @return <code>true</code> if limited outer joins are supported,
833 * <code>false</code> otherwise.
834 * @exception SQLException If an error occurs.
836 public boolean supportsLimitedOuterJoins() throws SQLException
;
839 * This method returns the vendor's term for "schema".
841 * @return The vendor's term for schema.
842 * @exception SQLException if an error occurs.
844 public String
getSchemaTerm() throws SQLException
;
847 * This method returns the vendor's term for "procedure".
849 * @return The vendor's term for procedure.
850 * @exception SQLException if an error occurs.
852 public String
getProcedureTerm() throws SQLException
;
855 * This method returns the vendor's term for "catalog".
857 * @return The vendor's term for catalog.
858 * @exception SQLException if an error occurs.
860 public String
getCatalogTerm() throws SQLException
;
863 * This method tests whether a catalog name appears at the beginning of
864 * a fully qualified table name.
866 * @return <code>true</code> if the catalog name appears at the beginning,
867 * <code>false</code> if it appears at the end.
868 * @exception SQLException If an error occurs.
870 public boolean isCatalogAtStart() throws SQLException
;
873 * This method returns the separator between the catalog name and the
876 * @return The separator between the catalog name and the table name.
877 * @exception SQLException If an error occurs.
879 public String
getCatalogSeparator() throws SQLException
;
882 * This method tests whether a catalog name can appear in a data
883 * manipulation statement.
885 * @return <code>true</code> if a catalog name can appear in a data
886 * manipulation statement, <code>false</code> otherwise.
887 * @exception SQLException If an error occurs.
889 public boolean supportsSchemasInDataManipulation() throws SQLException
;
892 * This method tests whether a catalog name can appear in a procedure
895 * @return <code>true</code> if a catalog name can appear in a procedure
896 * call, <code>false</code> otherwise.
897 * @exception SQLException If an error occurs.
899 public boolean supportsSchemasInProcedureCalls() throws SQLException
;
902 * This method tests whether a catalog name can appear in a table definition.
904 * @return <code>true</code> if a catalog name can appear in a table
905 * definition, <code>false</code> otherwise.
906 * @exception SQLException If an error occurs.
908 public boolean supportsSchemasInTableDefinitions() throws SQLException
;
911 * This method tests whether a catalog name can appear in an index definition.
913 * @return <code>true</code> if a catalog name can appear in an index
914 * definition, <code>false</code> otherwise.
915 * @exception SQLException If an error occurs.
917 public boolean supportsSchemasInIndexDefinitions() throws SQLException
;
920 * This method tests whether a catalog name can appear in privilege definitions.
922 * @return <code>true</code> if a catalog name can appear in privilege
923 * definition, <code>false</code> otherwise.
924 * @exception SQLException If an error occurs.
926 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException
;
929 * This method tests whether a catalog name can appear in a data
930 * manipulation statement.
932 * @return <code>true</code> if a catalog name can appear in a data
933 * manipulation statement, <code>false</code> otherwise.
934 * @exception SQLException If an error occurs.
936 public boolean supportsCatalogsInDataManipulation() throws SQLException
;
939 * This method tests whether a catalog name can appear in a procedure
942 * @return <code>true</code> if a catalog name can appear in a procedure
943 * call, <code>false</code> otherwise.
944 * @exception SQLException If an error occurs.
946 public boolean supportsCatalogsInProcedureCalls() throws SQLException
;
949 * This method tests whether a catalog name can appear in a table definition.
951 * @return <code>true</code> if a catalog name can appear in a table
952 * definition, <code>false</code> otherwise.
953 * @exception SQLException If an error occurs.
955 public boolean supportsCatalogsInTableDefinitions() throws SQLException
;
958 * This method tests whether a catalog name can appear in an index definition.
960 * @return <code>true</code> if a catalog name can appear in an index
961 * definition, <code>false</code> otherwise.
962 * @exception SQLException If an error occurs.
964 public boolean supportsCatalogsInIndexDefinitions() throws SQLException
;
967 * This method tests whether a catalog name can appear in privilege definitions.
969 * @return <code>true</code> if a catalog name can appear in privilege
970 * definition, <code>false</code> otherwise.
971 * @exception SQLException If an error occurs.
973 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException
;
976 * This method tests whether or not that database supports positioned
979 * @return <code>true</code> if positioned deletes are supported,
980 * <code>false</code> otherwise.
981 * @exception SQLException If an error occurs.
983 public boolean supportsPositionedDelete() throws SQLException
;
986 * This method tests whether or not that database supports positioned
989 * @return <code>true</code> if positioned updates are supported,
990 * <code>false</code> otherwise.
991 * @exception SQLException If an error occurs.
993 public boolean supportsPositionedUpdate() throws SQLException
;
996 * This method tests whether or not SELECT FOR UPDATE is supported by the
999 * @return <code>true</code> if SELECT FOR UPDATE is supported
1000 * <code>false</code> otherwise.
1001 * @exception SQLException If an error occurs.
1003 public boolean supportsSelectForUpdate() throws SQLException
;
1006 * This method tests whether or not stored procedures are supported on
1009 * @return <code>true</code> if stored procedures are supported,
1010 * <code>false</code> otherwise.
1011 * @exception SQLException If an error occurs.
1013 public boolean supportsStoredProcedures() throws SQLException
;
1016 * This method tests whether or not subqueries are allowed in comparisons.
1017 * A fully JDBC compliant driver will always return <code>true</code>.
1019 * @return <code>true</code> if subqueries are allowed in comparisons,
1020 * <code>false</code> otherwise.
1021 * @exception SQLException If an error occurs.
1023 public boolean supportsSubqueriesInComparisons() throws SQLException
;
1026 * This method tests whether or not subqueries are allowed in exists
1027 * expressions. A fully JDBC compliant driver will always return
1028 * <code>true</code>.
1030 * @return <code>true</code> if subqueries are allowed in exists
1031 * expressions, <code>false</code> otherwise.
1032 * @exception SQLException If an error occurs.
1034 public boolean supportsSubqueriesInExists() throws SQLException
;
1037 * This method tests whether subqueries are allowed in IN statements.
1038 * A fully JDBC compliant driver will always return <code>true</code>.
1040 * @return <code>true</code> if the driver supports subqueries in IN
1041 * statements, <code>false</code> otherwise.
1042 * @exception SQLException If an error occurs.
1044 public boolean supportsSubqueriesInIns() throws SQLException
;
1047 * This method tests whether or not subqueries are allowed in quantified
1048 * expressions. A fully JDBC compliant driver will always return
1049 * <code>true</code>.
1051 * @return <code>true</code> if subqueries are allowed in quantified
1052 * expressions, <code>false</code> otherwise.
1053 * @exception SQLException If an error occurs.
1055 public boolean supportsSubqueriesInQuantifieds() throws SQLException
;
1058 * This method test whether or not correlated subqueries are allowed. A
1059 * fully JDBC compliant driver will always return <code>true</code>.
1061 * @return <code>true</code> if correlated subqueries are allowed,
1062 * <code>false</code> otherwise.
1063 * @exception SQLException If an error occurs.
1065 public boolean supportsCorrelatedSubqueries() throws SQLException
;
1068 * This method tests whether or not the UNION statement is supported.
1070 * @return <code>true</code> if UNION is supported, <code>false</code>
1072 * @exception SQLException If an error occurs.
1074 public boolean supportsUnion() throws SQLException
;
1077 * This method tests whether or not the UNION ALL statement is supported.
1079 * @return <code>true</code> if UNION ALL is supported, <code>false</code>
1081 * @exception SQLException If an error occurs.
1083 public boolean supportsUnionAll() throws SQLException
;
1086 * This method tests whether or not the database supports cursors
1087 * remaining open across commits.
1089 * @return <code>true</code> if cursors can remain open across commits,
1090 * <code>false</code> otherwise.
1091 * @exception SQLException If an error occurs.
1093 public boolean supportsOpenCursorsAcrossCommit() throws SQLException
;
1096 * This method tests whether or not the database supports cursors
1097 * remaining open across rollbacks.
1099 * @return <code>true</code> if cursors can remain open across rollbacks,
1100 * <code>false</code> otherwise.
1101 * @exception SQLException If an error occurs.
1103 public boolean supportsOpenCursorsAcrossRollback() throws SQLException
;
1106 * This method tests whether or not the database supports statements
1107 * remaining open across commits.
1109 * @return <code>true</code> if statements can remain open across commits,
1110 * <code>false</code> otherwise.
1111 * @exception SQLException If an error occurs.
1113 public boolean supportsOpenStatementsAcrossCommit() throws SQLException
;
1116 * This method tests whether or not the database supports statements
1117 * remaining open across rollbacks.
1119 * @return <code>true</code> if statements can remain open across rollbacks,
1120 * <code>false</code> otherwise.
1121 * @exception SQLException If an error occurs.
1123 public boolean supportsOpenStatementsAcrossRollback() throws SQLException
;
1126 * This method returns the number of hex characters allowed in an inline
1129 * @return The number of hex characters allowed in a binary literal, 0 meaning
1130 * either an unknown or unlimited number.
1131 * @exception SQLException If an error occurs.
1133 public int getMaxBinaryLiteralLength() throws SQLException
;
1136 * This method returns the maximum length of a character literal.
1138 * @return The maximum length of a character literal.
1139 * @exception SQLException If an error occurs.
1141 public int getMaxCharLiteralLength() throws SQLException
;
1144 * This method returns the maximum length of a column name.
1146 * @return The maximum length of a column name.
1147 * @exception SQLException If an error occurs.
1149 public int getMaxColumnNameLength() throws SQLException
;
1152 * This method returns the maximum number of columns in a GROUP BY statement.
1154 * @return The maximum number of columns in a GROUP BY statement.
1155 * @exception SQLException If an error occurs.
1157 public int getMaxColumnsInGroupBy() throws SQLException
;
1160 * This method returns the maximum number of columns in an index.
1162 * @return The maximum number of columns in an index.
1163 * @exception SQLException If an error occurs.
1165 public int getMaxColumnsInIndex() throws SQLException
;
1168 * This method returns the maximum number of columns in an ORDER BY statement.
1170 * @return The maximum number of columns in an ORDER BY statement.
1171 * @exception SQLException If an error occurs.
1173 public int getMaxColumnsInOrderBy() throws SQLException
;
1176 * This method returns the maximum number of columns in a SELECT statement.
1178 * @return The maximum number of columns in a SELECT statement.
1179 * @exception SQLException If an error occurs.
1181 public int getMaxColumnsInSelect() throws SQLException
;
1184 * This method returns the maximum number of columns in a table.
1186 * @return The maximum number of columns in a table.
1187 * @exception SQLException If an error occurs.
1189 public int getMaxColumnsInTable() throws SQLException
;
1192 * This method returns the maximum number of connections this client
1193 * can have to the database.
1195 * @return The maximum number of database connections.
1196 * @SQLException If an error occurs.
1198 public int getMaxConnections() throws SQLException
;
1201 * This method returns the maximum length of a cursor name.
1203 * @return The maximum length of a cursor name.
1204 * @exception SQLException If an error occurs.
1206 public int getMaxCursorNameLength() throws SQLException
;
1209 * This method returns the maximum length of an index.
1211 * @return The maximum length of an index.
1212 * @exception SQLException If an error occurs.
1214 public int getMaxIndexLength() throws SQLException
;
1217 * This method returns the maximum length of a schema name.
1219 * @return The maximum length of a schema name.
1220 * @exception SQLException If an error occurs.
1222 public int getMaxSchemaNameLength() throws SQLException
;
1225 * This method returns the maximum length of a procedure name.
1227 * @return The maximum length of a procedure name.
1228 * @exception SQLException If an error occurs.
1230 public int getMaxProcedureNameLength() throws SQLException
;
1233 * This method returns the maximum length of a catalog name.
1235 * @return The maximum length of a catalog name.
1236 * @exception SQLException If an error occurs.
1238 public int getMaxCatalogNameLength() throws SQLException
;
1241 * This method returns the maximum size of a row in bytes.
1243 * @return The maximum size of a row.
1244 * @exception SQLException If an error occurs.
1246 public int getMaxRowSize() throws SQLException
;
1249 * This method tests whether or not the maximum row size includes BLOB's
1251 * @return <code>true</code> if the maximum row size includes BLOB's,
1252 * <code>false</code> otherwise.
1253 * @exception SQLException If an error occurs.
1255 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException
;
1258 * This method includes the maximum length of a SQL statement.
1260 * @return The maximum length of a SQL statement.
1261 * @exception SQLException If an error occurs.
1263 public int getMaxStatementLength() throws SQLException
;
1266 * This method returns the maximum number of statements that can be
1267 * active at any time.
1269 * @return The maximum number of statements that can be active at any time.
1270 * @exception SQLException If an error occurs.
1272 public int getMaxStatements() throws SQLException
;
1275 * This method returns the maximum length of a table name.
1277 * @return The maximum length of a table name.
1278 * @exception SQLException If an error occurs.
1280 public int getMaxTableNameLength() throws SQLException
;
1283 * This method returns the maximum number of tables that may be referenced
1284 * in a SELECT statement.
1286 * @return The maximum number of tables allowed in a SELECT statement.
1287 * @exception SQLException If an error occurs.
1289 public int getMaxTablesInSelect() throws SQLException
;
1292 * This method returns the maximum length of a user name.
1294 * @return The maximum length of a user name.
1295 * @exception SQLException If an error occurs.
1297 public int getMaxUserNameLength() throws SQLException
;
1300 * This method returns the default transaction isolation level of the
1303 * @return The default transaction isolation level of the database.
1304 * @exception SQLException If an error occurs.
1307 public int getDefaultTransactionIsolation() throws SQLException
;
1310 * This method tests whether or not the database supports transactions.
1312 * @return <code>true</code> if the database supports transactions,
1313 * <code>false</code> otherwise.
1314 * @exception SQLException If an error occurs.
1316 public boolean supportsTransactions() throws SQLException
;
1319 * This method tests whether or not the database supports the specified
1320 * transaction isolation level.
1322 * @param level The transaction isolation level.
1324 * @return <code>true</code> if the specified transaction isolation level
1325 * is supported, <code>false</code> otherwise.
1326 * @exception SQLException If an error occurs.
1328 public boolean supportsTransactionIsolationLevel(int level
) throws
1332 * This method tests whether or not DDL and DML statements allowed within
1333 * the same transaction.
1335 * @return <code>true</code> if DDL and DML statements are allowed in the
1336 * same transaction, <code>false</code> otherwise.
1337 * @exception SQLException If an error occurs.
1339 public boolean supportsDataDefinitionAndDataManipulationTransactions()
1340 throws SQLException
;
1343 * This method tests whether or not only DML statement are allowed
1344 * inside a transaction.
1346 * @return <code>true</code> if only DML statements are allowed in
1347 * transactions, <code>false</code> otherwise.
1348 * @exception SQLException If an error occurs.
1350 public boolean supportsDataManipulationTransactionsOnly() throws
1354 * This method tests whether or not a DDL statement will cause the
1355 * current transaction to be automatically committed.
1357 * @return <code>true</code> if DDL causes an immediate transaction commit,
1358 * <code>false</code> otherwise.
1359 * @exception SQLException If an error occurs.
1361 public boolean dataDefinitionCausesTransactionCommit() throws SQLException
;
1364 * This method tests whether or not DDL statements are ignored in
1367 * @return <code>true</code> if DDL statements are ignored in transactions,
1368 * <code>false</code> otherwise.
1369 * @exception SQLException If an error occurs.
1371 public boolean dataDefinitionIgnoredInTransactions() throws SQLException
;
1374 * This method returns a list of all the stored procedures matching the
1375 * specified pattern in the given schema and catalog. This is returned
1376 * a <code>ResultSet</code> with the following columns:
1379 * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be
1380 * <code>null</code>.
1381 * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be
1382 * <code>null</code>.
1383 * <li>PROCEDURE_NAME - The name of the procedure.
1387 * <li>REMARKS - A description of the procedure
1388 * <li>PROCEDURE_TYPE - Indicates the return type of the procedure, which
1389 * is one of the contstants defined in this class
1390 * (<code>procedureResultUnknown</code>, <code>procedureNoResult</code>, or
1391 * <code>procedureReturnsResult</code>).
1394 * @param catalog The name of the catalog to return stored procedured from,
1395 * or "" to return procedures from all catalogs.
1396 * @param schemaPattern A schema pattern for the schemas to return stored
1397 * procedures from, or "" to return procedures from all schemas.
1398 * @param namePattern The pattern of procedures names to return.
1399 * @returns A <code>ResultSet</code> with all the requested procedures.
1400 * @exception SQLException If an error occurs.
1402 public ResultSet
getProcedures(String catalog
, String schemaPattern
, String
1403 procedureNamePattern
) throws SQLException
;
1406 * This method returns a list of the parameter and result columns for
1407 * the requested stored procedures. This is returned in the form of a
1408 * <code>ResultSet</code> with the following columns:
1411 * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be
1412 * <code>null</code>.
1413 * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be
1414 * <code>null</code>.
1415 * <li>PROCEDURE_NAME - The name of the procedure.
1416 * <li>COLUMN_NAME - The name of the column
1417 * <li>COLUMN_TYPE - The type of the column, which will be one of the
1418 * contants defined in this class (<code>procedureColumnUnknown</code>,
1419 * <code>procedureColumnIn</code>, <code>procedureColumnInOut</code>,
1420 * <code>procedureColumnOut</code>, <code>procedureColumnReturn</code>,
1421 * or <code>procedureColumnResult</code>).
1422 * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1423 * defined in <code>Types</code>.
1424 * <li>TYPE_NAME - The string name of the data type for this column.
1425 * <li>PRECISION - The precision of the column.
1426 * <li>LENGTH - The length of the column in bytes
1427 * <li>SCALE - The scale of the column.
1428 * <li>RADIX - The radix of the column.
1429 * <li>NULLABLE - Whether or not the column is NULLABLE. This is one of
1430 * the constants defined in this class (<code>procedureNoNulls</code>,
1431 * <code>procedureNullable</code>, or <code>procedureNullableUnknown</code>)
1432 * <li>REMARKS - A description of the column.
1435 * @param catalog The name of the catalog to return stored procedured from,
1436 * or "" to return procedures from all catalogs.
1437 * @param schemaPattern A schema pattern for the schemas to return stored
1438 * procedures from, or "" to return procedures from all schemas.
1439 * @param namePattern The pattern of procedures names to return.
1440 * @param columnPattern The pattern of column names to return.
1441 * @returns A <code>ResultSet</code> with all the requested procedures.
1442 * @exception SQLException If an error occurs.
1444 public ResultSet
getProcedureColumns(String catalog
, String schemaPattern
,
1445 String procedureNamePattern
, String columnNamePattern
) throws
1449 * This method returns a list of the requested table as a
1450 * <code>ResultSet</code> with the following columns:
1453 * <li>TABLE_CAT - The catalog the table is in, which may be <code>null</code>.
1454 * <li>TABLE_SCHEM - The schema the table is in, which may be <code>null</code>.
1455 * <li>TABLE_NAME - The name of the table.
1456 * <li>TABLE_TYPE - A string describing the table type. This will be one
1457 * of the values returned by the <code>getTableTypes()</code> method.
1458 * <li>REMARKS - Comments about the table.
1461 * @param catalog The name of the catalog to return tables from,
1462 * or "" to return tables from all catalogs.
1463 * @param schemaPattern A schema pattern for the schemas to return tables
1464 * from, or "" to return tables from all schemas.
1465 * @param namePattern The pattern of table names to return.
1466 * @param types The list of table types to include; null returns all types.
1467 * @returns A <code>ResultSet</code> with all the requested tables.
1468 * @exception SQLException If an error occurs.
1470 public ResultSet
getTables(String catalog
, String schemaPattern
, String
1471 tableNamePattern
, String
[] types
) throws SQLException
;
1474 * This method returns the list of database schemas as a
1475 * <code>ResultSet</code>, with one column - TABLE_SCHEM - that is the
1476 * name of the schema.
1478 * @return A <code>ResultSet</code> with all the requested schemas.
1479 * @exception SQLException If an error occurs.
1481 public ResultSet
getSchemas() throws SQLException
;
1484 * This method returns the list of database catalogs as a
1485 * <code>ResultSet</code> with one column - TABLE_CAT - that is the
1486 * name of the catalog.
1488 * @return A <code>ResultSet</code> with all the requested catalogs.
1489 * @exception SQLException If an error occurs.
1491 public ResultSet
getCatalogs() throws SQLException
;
1494 * This method returns the list of database table types as a
1495 * <code>ResultSet</code> with one column - TABLE_TYPE - that is the
1496 * name of the table type.
1498 * @return A <code>ResultSet</code> with all the requested table types.
1499 * @exception SQLException If an error occurs.
1501 public ResultSet
getTableTypes() throws SQLException
;
1504 * This method returns a list of the tables columns for
1505 * the requested tables. This is returned in the form of a
1506 * <code>ResultSet</code> with the following columns:
1509 * <li>TABLE_CAT - The catalog the table is in, which may be
1510 * <code>null</code>.
1511 * <li>TABLE_SCHEM - The schema the tables is in, which may be
1512 * <code>null</code>.
1513 * <li>TABLE_NAME - The name of the table.
1514 * <li>COLUMN_NAME - The name of the column
1515 * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1516 * defined in <code>Types</code>.
1517 * <li>TYPE_NAME - The string name of the data type for this column.
1518 * <li>COLUMN_SIZE - The size of the column.
1520 * <li>NUM_PREC_RADIX - The radix of the column.
1521 * <li>NULLABLE - Whether or not the column is NULLABLE. This is one of
1522 * the constants defined in this class (<code>tableNoNulls</code>,
1523 * <code>tableNullable</code>, or <code>tableNullableUnknown</code>)
1524 * <li>REMARKS - A description of the column.
1525 * <li>COLUMN_DEF - The default value for the column, may be <code>null</code>.
1526 * <li>SQL_DATA_TYPE - Unused
1527 * <li>SQL_DATETIME_SUB - Unused
1528 * <li>CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes
1530 * <li>ORDINAL_POSITION - The index of the column in the table.
1531 * <li>IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string
1535 * @param catalog The name of the catalog to return table from,
1536 * or "" to return tables from all catalogs.
1537 * @param schemaPattern A schema pattern for the schemas to return
1538 * tables from, or "" to return tables from all schemas.
1539 * @param namePattern The pattern of tables names to return.
1540 * @param columnPattern The pattern of column names to return.
1541 * @returns A <code>ResultSet</code> with all the requested tables.
1542 * @exception SQLException If an error occurs.
1544 public ResultSet
getColumns(String catalog
, String schemaPattern
, String
1545 tableNamePattern
, String columnNamePattern
) throws SQLException
;
1548 * This method returns the access rights that have been granted to the
1549 * requested columns. This information is returned as a <code>ResultSet</code>
1550 * with the following columns:
1553 * <li>TABLE_CAT - The catalog the table is in, which may be
1554 * <code>null</code>.
1555 * <li>TABLE_SCHEM - The schema the tables is in, which may be
1556 * <code>null</code>.
1557 * <li>TABLE_NAME - The name of the table.
1558 * <li>COLUMN_NAME - The name of the column.
1559 * <li>GRANTOR - The entity that granted the access.
1560 * <li>GRANTEE - The entity granted the access.
1561 * <li>PRIVILEGE - The name of the privilege granted.
1562 * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to
1563 * others, "NO" if not, and <code>null</code> if unknown.
1566 * @param catalog The catalog to retrieve information from, or the empty string
1567 * to return entities not associated with a catalog, or <code>null</code>
1568 * to return information from all catalogs.
1569 * @param schema The schema to retrieve information from, or the empty string
1570 * to return entities not associated with a schema.
1571 * @param table The table name to return information for.
1572 * @param columnPattern A pattern of column names to return information for.
1573 * @return A <code>ResultSet</code> with all the requested privileges.
1574 * @exception SQLException If an error occurs.
1576 public ResultSet
getColumnPrivileges(String catalog
, String schema
, String
1577 table
, String columnNamePattern
) throws SQLException
;
1580 * This method returns the access rights that have been granted to the
1581 * requested tables. This information is returned as a <code>ResultSet</code>
1582 * with the following columns:
1585 * <li>TABLE_CAT - The catalog the table is in, which may be
1586 * <code>null</code>.
1587 * <li>TABLE_SCHEM - The schema the tables is in, which may be
1588 * <code>null</code>.
1589 * <li>TABLE_NAME - The name of the table.
1590 * <li>GRANTOR - The entity that granted the access.
1591 * <li>GRANTEE - The entity granted the access.
1592 * <li>PRIVILEGE - The name of the privilege granted.
1593 * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to
1594 * others, "NO" if not, and <code>null</code> if unknown.
1597 * @param catalog The catalog to retrieve information from, or the empty string
1598 * to return entities not associated with a catalog, or <code>null</code>
1599 * to return information from all catalogs.
1600 * @param schema The schema to retrieve information from, or the empty string
1601 * to return entities not associated with a schema.
1602 * @param tablePattern The table name pattern of tables to return
1604 * @return A <code>ResultSet</code> with all the requested privileges.
1605 * @exception SQLException If an error occurs.
1607 public ResultSet
getTablePrivileges(String catalog
, String schemaPattern
,
1608 String tableNamePattern
) throws SQLException
;
1611 * This method returns the best set of columns for uniquely identifying
1612 * a row. It returns this information as a <code>ResultSet</code> with
1613 * the following columns:
1616 * <li>SCOPE - The scope of the results returned. This is one of the
1617 * constants defined in this class (<code>bestRowTemporary</code>,
1618 * <code>bestRowTransaction</code>, or <code>bestRowSession</code>).
1619 * <li>COLUMN_NAME - The name of the column.
1620 * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1621 * defined in <code>Types</code>.
1622 * <li>TYPE_NAME - The string name of the data type for this column.
1623 * <li>COLUMN_SIZE - The precision of the columns
1624 * <li>BUFFER_LENGTH - Unused
1625 * <li>DECIMAL_DIGITS - The scale of the column.
1626 * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a
1627 * pseudo_column. This is one of the constants defined in this class
1628 * (<code>bestRowUnknown</code>, <code>bestRowNotPseudo</code>, or
1629 * <code>bestRowPseudo</code>).
1632 * @param catalog The catalog to retrieve information from, or the empty string
1633 * to return entities not associated with a catalog, or <code>null</code>
1634 * to return information from all catalogs.
1635 * @param schema The schema to retrieve information from, or the empty string
1636 * to return entities not associated with a schema.
1637 * @param table The table name to return information for.
1638 * @param columnPattern A pattern of column names to return information for.
1639 * @param scope One of the best row id scope constants from this class.
1640 * @param nullable <code>true</code> to include columns that are nullable,
1641 * <code>false</code> otherwise.
1642 * @return A <code>ResultSet</code> with the best row identifier.
1643 * @exception SQLException If an error occurs.
1645 public ResultSet
getBestRowIdentifier(String catalog
, String schema
,
1646 String table
, int scope
, boolean nullable
) throws SQLException
;
1649 * This method returns the set of columns that are automatically updated
1650 * when the row is update. It returns this information as a
1651 * <code>ResultSet</code> with the following columns:
1654 * <li>SCOPE - Unused
1655 * <li>COLUMN_NAME - The name of the column.
1656 * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1657 * defined in <code>Types</code>.
1658 * <li>TYPE_NAME - The string name of the data type for this column.
1659 * <li>COLUMN_SIZE - The precision of the columns
1660 * <li>BUFFER_LENGTH - Unused
1661 * <li>DECIMAL_DIGITS - The scale of the column.
1662 * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a
1663 * pseudo_column. This is one of the constants defined in this class
1664 * (<code>versionRowUnknown</code>, <code>versionRowNotPseudo</code>, or
1665 * <code>versionRowPseudo</code>).
1668 * @param catalog The catalog to retrieve information from, or the empty string
1669 * to return entities not associated with a catalog, or <code>null</code>
1670 * to return information from all catalogs.
1671 * @param schema The schema to retrieve information from, or the empty string
1672 * to return entities not associated with a schema.
1673 * @param table The table name to return information for.
1674 * @param columnPattern A pattern of column names to return information for.
1675 * @return A <code>ResultSet</code> with the version columns.
1676 * @exception SQLException If an error occurs.
1678 public ResultSet
getVersionColumns(String catalog
, String schema
,
1679 String table
) throws SQLException
;
1682 * This method returns a list of a table's primary key columns. These
1683 * are returned as a <code>ResultSet</code> with the following columns.
1686 * <li>TABLE_CAT - The catalog of the table, which may be <code>null</code>.
1687 * <li>TABLE_SCHEM - The schema of the table, which may be <code>null</code>.
1688 * <li>TABLE_NAME - The name of the table.
1689 * <li>COLUMN_NAME - The name of the column.
1690 * <li>KEY_SEQ - The sequence number of the column within the primary key.
1691 * <li>PK_NAME - The name of the primary key, which may be <code>null</code>.
1694 * @param catalog The catalog to retrieve information from, or the empty string
1695 * to return entities not associated with a catalog, or <code>null</code>
1696 * to return information from all catalogs.
1697 * @param schema The schema to retrieve information from, or the empty string
1698 * to return entities not associated with a schema.
1699 * @param table The table name to return information for.
1700 * @param columnPattern A pattern of column names to return information for.
1701 * @return A <code>ResultSet</code> with the primary key columns.
1702 * @exception SQLException If an error occurs.
1704 public ResultSet
getPrimaryKeys(String catalog
, String schema
, String table
)
1705 throws SQLException
;
1708 * This method returns a list of the table's foreign keys. These are
1709 * returned as a <code>ResultSet</code> with the following columns:
1712 * <li>PKTABLE_CAT - The catalog of the table the key was imported from.
1713 * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.
1714 * <li>PKTABLE_NAME - The name of the table the key was imported from.
1715 * <li>PKCOLUMN_NAME - The name of the column that was imported.
1716 * <li>FKTABLE_CAT - The foreign key catalog name.
1717 * <li>FKTABLE_SCHEM - The foreign key schema name.
1718 * <li>FKTABLE_NAME - The foreign key table name.
1719 * <li>FKCOLUMN_NAME - The foreign key column name.
1720 * <li>KEY_SEQ - The sequence number of the column within the foreign key.
1721 * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1722 * updated. This is one of the constants defined in this class
1723 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1724 * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1725 * <code>importedKeyRestrict</code>).
1726 * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1727 * deleted. This is one of the constants defined in this class
1728 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1729 * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)
1730 * <li>FK_NAME - The name of the foreign key.
1731 * <li>PK_NAME - The name of the primary key.
1732 * <li>DEFERRABILITY - The deferrability value. This is one of the
1733 * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1734 * <code>importedKeyInitiallyImmediate</code>, or
1735 * <code>importedKeyNotDeferrable</code>).
1738 * @param catalog The catalog to retrieve information from, or the empty string
1739 * to return entities not associated with a catalog, or <code>null</code>
1740 * to return information from all catalogs.
1741 * @param schema The schema to retrieve information from, or the empty string
1742 * to return entities not associated with a schema.
1743 * @param table The table name to return information for.
1745 * @return A <code>ResultSet</code> with the foreign key columns.
1747 * @exception SQLException If an error occurs.
1749 public ResultSet
getImportedKeys(String catalog
, String schema
,
1750 String table
) throws SQLException
;
1753 * This method returns a list of the table's which use this table's
1754 * primary key as a foreign key. The information is
1755 * returned as a <code>ResultSet</code> with the following columns:
1758 * <li>PKTABLE_CAT - The catalog of the table the key was imported from.
1759 * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.
1760 * <li>PKTABLE_NAME - The name of the table the key was imported from.
1761 * <li>PKCOLUMN_NAME - The name of the column that was imported.
1762 * <li>FKTABLE_CAT - The foreign key catalog name.
1763 * <li>FKTABLE_SCHEM - The foreign key schema name.
1764 * <li>FKTABLE_NAME - The foreign key table name.
1765 * <li>FKCOLUMN_NAME - The foreign key column name.
1766 * <li>KEY_SEQ - The sequence number of the column within the foreign key.
1767 * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1768 * updated. This is one of the constants defined in this class
1769 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1770 * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1771 * <code>importedKeyRestrict</code>).
1772 * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1773 * deleted. This is one of the constants defined in this class
1774 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1775 * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)
1776 * <li>FK_NAME - The name of the foreign key.
1777 * <li>PK_NAME - The name of the primary key.
1778 * <li>DEFERRABILITY - The deferrability value. This is one of the
1779 * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1780 * <code>importedKeyInitiallyImmediate</code>, or
1781 * <code>importedKeyNotDeferrable</code>).
1784 * @param catalog The catalog to retrieve information from, or the empty string
1785 * to return entities not associated with a catalog, or <code>null</code>
1786 * to return information from all catalogs.
1787 * @param schema The schema to retrieve information from, or the empty string
1788 * to return entities not associated with a schema.
1789 * @param table The table name to return information for.
1790 * @return A <code>ResultSet</code> with the requested information
1791 * @exception SQLException If an error occurs.
1793 public ResultSet
getExportedKeys(String catalog
, String schema
,
1794 String table
) throws SQLException
;
1797 * This method returns a description of how one table imports another
1798 * table's primary key as a foreign key. The information is
1799 * returned as a <code>ResultSet</code> with the following columns:
1802 * <li>PKTABLE_CAT - The catalog of the table the key was imported from.
1803 * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.
1804 * <li>PKTABLE_NAME - The name of the table the key was imported from.
1805 * <li>PKCOLUMN_NAME - The name of the column that was imported.
1806 * <li>FKTABLE_CAT - The foreign key catalog name.
1807 * <li>FKTABLE_SCHEM - The foreign key schema name.
1808 * <li>FKTABLE_NAME - The foreign key table name.
1809 * <li>FKCOLUMN_NAME - The foreign key column name.
1810 * <li>KEY_SEQ - The sequence number of the column within the foreign key.
1811 * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1812 * updated. This is one of the constants defined in this class
1813 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1814 * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1815 * <code>importedKeyRestrict</code>).
1816 * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1817 * deleted. This is one of the constants defined in this class
1818 * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1819 * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)
1820 * <li>FK_NAME - The name of the foreign key.
1821 * <li>PK_NAME - The name of the primary key.
1822 * <li>DEFERRABILITY - The deferrability value. This is one of the
1823 * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1824 * <code>importedKeyInitiallyImmediate</code>, or
1825 * <code>importedKeyNotDeferrable</code>).
1828 * @param primCatalog The catalog to retrieve information from, or the empty string
1829 * to return entities not associated with a catalog, or <code>null</code>
1830 * to return information from all catalogs, on the exporting side.
1831 * @param primSchema The schema to retrieve information from, or the empty string
1832 * to return entities not associated with a schema, on the exporting side.
1833 * @param primTable The table name to return information for, on the exporting
1835 * @param forCatalog The catalog to retrieve information from, or the empty string
1836 * to return entities not associated with a catalog, or <code>null</code>
1837 * to return information from all catalogs, on the importing side.
1838 * @param forSchema The schema to retrieve information from, or the empty string
1839 * to return entities not associated with a schema on the importing side.
1840 * @param forTable The table name to return information for on the importing
1842 * @return A <code>ResultSet</code> with the requested information
1843 * @exception SQLException If an error occurs.
1845 public ResultSet
getCrossReference(String primaryCatalog
, String
1846 primarySchema
, String primaryTable
, String foreignCatalog
, String
1847 foreignSchema
, String foreignTable
) throws SQLException
;
1850 * This method returns a list of the SQL types supported by this
1851 * database. The information is returned as a <code>ResultSet</code>
1852 * with the following columns:
1855 * <li>TYPE_NAME - The name of the data type.
1856 * <li>DATA_TYPE - A data type constant from <code>Types</code> for this
1858 * <li>PRECISION - The maximum precision of this type.
1859 * <li>LITERAL_PREFIX - Prefix value used to quote a literal, which may be
1860 * <code>null</code>.
1861 * <li>LITERAL_SUFFIX - Suffix value used to quote a literal, which may be
1862 * <code>null</code>.
1863 * <li>CREATE_PARAMS - The parameters used to create the type, which may be
1864 * <code>null</code>.
1865 * <li>NULLABLE - Whether or not this type supports NULL values. This will
1866 * be one of the constants defined in this interface
1867 * (<code>typeNoNulls</code>, <code>typeNullable</code>, or
1868 * <code>typeNullableUnknown</code>).
1869 * <li>CASE_SENSITIVE - Whether or not the value is case sensitive.
1870 * <li>SEARCHABLE - Whether or not "LIKE" expressions are supported in
1871 * WHERE clauses for this type. This will be one of the constants defined
1872 * in this interface (<code>typePredNone</code>, <code>typePredChar</code>,
1873 * <code>typePredBasic</code>, or <code>typeSearchable</code>).
1874 * <li>UNSIGNED_ATTRIBUTE - Is the value of this type unsigned.
1875 * <li>FIXED_PREC_SCALE - Whether or not this type can be used for money.
1876 * <li>AUTO_INCREMENT - Whether or not this type supports auto-incrementing.
1877 * <li>LOCAL_TYPE_NAME - A localized name for this data type.
1878 * <li>MINIMUM_SCALE - The minimum scale supported by this type.
1879 * <li>MAXIMUM_SCALE - The maximum scale supported by this type.
1880 * <li>SQL_DATA_TYPE - Unused.
1881 * <li>SQL_DATETIME_SUB - Unused.
1882 * <li>NUM_PREC_RADIX - The radix of this data type.
1885 * @return A <code>ResultSet</code> with the list of available data types.
1886 * @exception SQLException If an error occurs.
1888 public ResultSet
getTypeInfo() throws SQLException
;
1891 * This method returns information about a tables indices and statistics.
1892 * It is returned as a <code>ResultSet</code> with the following columns:
1895 * <li>TABLE_CAT - The catalog of the table, which may be <code>null</code>.
1896 * <li>TABLE_SCHEM - The schema of the table, which may be <code>null</code>.
1897 * <li>TABLE_NAME - The name of the table.
1898 * <li>NON_UNIQUE - Are index values non-unique?
1899 * <li>INDEX_QUALIFIER The index catalog, which may be <code>null</code>
1900 * <li>INDEX_NAME - The name of the index.
1901 * <li>TYPE - The type of index, which will be one of the constants defined
1902 * in this interface (<code>tableIndexStatistic</code>,
1903 * <code>tableIndexClustered</code>, <code>tableIndexHashed</code>, or
1904 * <code>tableIndexOther</code>).
1905 * <li>ORDINAL_POSITION - The sequence number of this column in the index.
1906 * This will be 0 when the index type is <code>tableIndexStatistic</code>.
1907 * <li>COLUMN_NAME - The name of this column in the index.
1908 * <li>ASC_OR_DESC - "A" for an ascending sort sequence, "D" for a
1909 * descending sort sequence or <code>null</code> if a sort sequence is not
1911 * <li>CARDINALITY - The number of unique rows in the index, or the number
1912 * of rows in the table if the index type is <code>tableIndexStatistic</code>.
1913 * <li>PAGES - The number of pages used for the index, or the number of pages
1914 * in the table if the index type is <code>tableIndexStatistic</code>.
1915 * <li>FILTER_CONDITION - The filter condition for this index, which may be
1916 * <code>null</code>.
1919 * @param catalog The catalog to retrieve information from, or the empty string
1920 * to return entities not associated with a catalog, or
1921 * <code>null</code> to return information from all catalogs.
1922 * @param schema The schema to retrieve information from, or the empty string
1923 * to return entities not associated with a schema.
1924 * @param table The table name to return information for.
1925 * @param unique <code>true</code> to return only unique indexes,
1926 * <code>false</code> otherwise.
1927 * @param approx <code>true</code> if data values can be approximations,
1928 * <code>false</code> otherwise.
1929 * @return A <code>ResultSet</code> with the requested index information
1930 * @exception SQLException If an error occurs.
1932 public ResultSet
getIndexInfo(String catalog
, String schema
, String table
,
1933 boolean unique
, boolean approximate
) throws SQLException
;
1936 * This method tests whether or not the datbase supports the specified
1939 * @param type The desired result type, which is one of the constants
1940 * defined in <code>ResultSet</code>.
1942 * @return <code>true</code> if the result set type is supported,
1943 * <code>false</code> otherwise.
1945 * @exception SQLException If an error occurs.
1949 public boolean supportsResultSetType(int type
) throws SQLException
;
1952 * This method tests whether the specified result set type and result set
1953 * concurrency type are supported by the database.
1955 * @param type The desired result type, which is one of the constants
1956 * defined in <code>ResultSet</code>.
1957 * @param concur The desired concurrency type, which is one of the constants
1958 * defined in <code>ResultSet</code>.
1959 * @return <code>true</code> if the result set type is supported,
1960 * <code>false</code> otherwise.
1961 * @exception SQLException If an error occurs.
1964 public boolean supportsResultSetConcurrency(int type
, int concurrency
)
1965 throws SQLException
;
1968 * This method tests whether or not the specified result set type sees its
1971 * @param type The desired result type, which is one of the constants
1972 * defined in <code>ResultSet</code>.
1973 * @return <code>true</code> if the result set type sees its own updates,
1974 * <code>false</code> otherwise.
1975 * @exception SQLException If an error occurs.
1978 public boolean ownUpdatesAreVisible(int type
) throws SQLException
;
1981 * This method tests whether or not the specified result set type sees its
1984 * @param type The desired result type, which is one of the constants
1985 * defined in <code>ResultSet</code>.
1986 * @return <code>true</code> if the result set type sees its own deletes,
1987 * <code>false</code> otherwise.
1988 * @exception SQLException If an error occurs.
1991 public boolean ownDeletesAreVisible(int type
) throws SQLException
;
1994 * This method tests whether or not the specified result set type sees its
1997 * @param type The desired result type, which is one of the constants
1998 * defined in <code>ResultSet</code>.
1999 * @return <code>true</code> if the result set type sees its own inserts,
2000 * <code>false</code> otherwise.
2001 * @exception SQLException If an error occurs.
2004 public boolean ownInsertsAreVisible(int type
) throws SQLException
;
2007 * This method tests whether or not the specified result set type sees
2008 * updates committed by others.
2010 * @param type The desired result type, which is one of the constants
2011 * defined in <code>ResultSet</code>.
2012 * @return <code>true</code> if the result set type sees other updates,
2013 * <code>false</code> otherwise.
2014 * @exception SQLException If an error occurs.
2017 public boolean othersUpdatesAreVisible(int type
) throws SQLException
;
2020 * This method tests whether or not the specified result set type sees
2021 * deletes committed by others.
2023 * @param type The desired result type, which is one of the constants
2024 * defined in <code>ResultSet</code>.
2025 * @return <code>true</code> if the result set type sees other deletes,
2026 * <code>false</code> otherwise.
2027 * @exception SQLException If an error occurs.
2030 public boolean othersDeletesAreVisible(int type
) throws SQLException
;
2033 * This method tests whether or not the specified result set type sees
2034 * inserts committed by others.
2036 * @param type The desired result type, which is one of the constants
2037 * defined in <code>ResultSet</code>.
2038 * @return <code>true</code> if the result set type sees other inserts,
2039 * <code>false</code> otherwise.
2040 * @exception SQLException If an error occurs.
2043 public boolean othersInsertsAreVisible(int type
) throws SQLException
;
2046 * This method tests whether or not the specified result set type can detect
2047 * a visible update by calling the <code>rowUpdated</code> method.
2049 * @param type The desired result type, which is one of the constants
2050 * defined in <code>ResultSet</code>.
2051 * @return <code>true</code> if the result set type can detect visible updates
2052 * using <code>rowUpdated</code>, <code>false</code> otherwise.
2053 * @exception SQLException If an error occurs.
2056 public boolean updatesAreDetected(int type
) throws SQLException
;
2059 * This method tests whether or not the specified result set type can detect
2060 * a visible delete by calling the <code>rowUpdated</code> method.
2062 * @param type The desired result type, which is one of the constants
2063 * defined in <code>ResultSet</code>.
2064 * @return <code>true</code> if the result set type can detect visible deletes
2065 * using <code>rowUpdated</code>, <code>false</code> otherwise.
2066 * @exception SQLException If an error occurs.
2069 public boolean deletesAreDetected(int type
) throws SQLException
;
2072 * This method tests whether or not the specified result set type can detect
2073 * a visible insert by calling the <code>rowUpdated</code> method.
2075 * @param type The desired result type, which is one of the constants
2076 * defined in <code>ResultSet</code>.
2077 * @return <code>true</code> if the result set type can detect visible inserts
2078 * using <code>rowUpdated</code>, <code>false</code> otherwise.
2079 * @exception SQLException If an error occurs.
2082 public boolean insertsAreDetected(int type
) throws SQLException
;
2085 * This method tests whether or not the database supports batch updates.
2087 * @return <code>true</code> if batch updates are supported,
2088 * <code>false</code> otherwise.
2089 * @exception SQLException If an error occurs.
2091 public boolean supportsBatchUpdates() throws SQLException
;
2094 * This method returns the list of user defined data types in use. These
2095 * are returned as a <code>ResultSet</code> with the following columns:
2098 * <li>TYPE_CAT - The catalog name, which may be <code>null</code>.
2099 * <li>TYPE_SCEHM - The schema name, which may be <code>null</code>.
2100 * <li>TYPE_NAME - The user defined data type name.
2101 * <li>CLASS_NAME - The Java class name this type maps to.
2102 * <li>DATA_TYPE - A type identifier from <code>Types</code> for this type.
2103 * This will be one of <code>JAVA_OBJECT</code>, <code>STRUCT</code>, or
2104 * <code>DISTINCT</code>.
2105 * <li>REMARKS - Comments about this data type.
2108 * @param catalog The catalog to retrieve information from, or the empty string
2109 * to return entities not associated with a catalog, or <code>null</code>
2110 * to return information from all catalogs.
2111 * @param schema The schema to retrieve information from, or the empty string
2112 * to return entities not associated with a schema.
2113 * @param typePattern The type name pattern to match.
2114 * @param types The type identifier patterns (from <code>Types</code>) to
2116 * @return A <code>ResultSet</code> with the requested type information
2117 * @exception SQLException If an error occurs.
2119 public ResultSet
getUDTs(String catalog
, String schemaPattern
, String
2120 typeNamePattern
, int[] types
) throws SQLException
;
2123 * This method returns the <code>Connection</code> object that was used
2124 * to generate the metadata in this object.
2126 * @return The connection for this object.
2127 * @exception SQLException If an error occurs.
2129 public Connection
getConnection() throws SQLException
;
2134 public boolean supportsSavepoints() throws SQLException
;
2139 public boolean supportsNamedParameters() throws SQLException
;
2144 public boolean supportsMultipleOpenResults() throws SQLException
;
2149 public boolean supportsGetGeneratedKeys() throws SQLException
;
2154 public ResultSet
getSuperTypes(String catalog
, String schemaPattern
,
2155 String typeNamePattern
) throws SQLException
;
2160 public ResultSet
getSuperTables(String catalog
, String schemaPattern
,
2161 String tableNamePattern
) throws SQLException
;
2166 public ResultSet
getAttributes(String catalog
, String schemaPattern
, String
2167 typeNamePattern
, String attributeNamePattern
) throws SQLException
;
2172 public boolean supportsResultSetHoldability(int holdability
)
2173 throws SQLException
;
2178 public int getResultSetHoldability() throws SQLException
;
2183 public int getDatabaseMajorVersion() throws SQLException
;
2188 public int getDatabaseMinorVersion() throws SQLException
;
2193 public int getJDBCMajorVersion() throws SQLException
;
2198 public int getJDBCMinorVersion() throws SQLException
;
2203 public int getSQLStateType() throws SQLException
;
2208 public boolean locatorsUpdateCopy() throws SQLException
;
2213 public boolean supportsStatementPooling() throws SQLException
;