Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/sql/DatabaseMetaData.java
38829 views
/*1* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/242526package java.sql;2728/**29* Comprehensive information about the database as a whole.30* <P>31* This interface is implemented by driver vendors to let users know the capabilities32* of a Database Management System (DBMS) in combination with33* the driver based on JDBC™ technology34* ("JDBC driver") that is used with it. Different relational DBMSs often support35* different features, implement features in different ways, and use different36* data types. In addition, a driver may implement a feature on top of what the37* DBMS offers. Information returned by methods in this interface applies38* to the capabilities of a particular driver and a particular DBMS working39* together. Note that as used in this documentation, the term "database" is40* used generically to refer to both the driver and DBMS.41* <P>42* A user for this interface is commonly a tool that needs to discover how to43* deal with the underlying DBMS. This is especially true for applications44* that are intended to be used with more than one DBMS. For example, a tool might use the method45* <code>getTypeInfo</code> to find out what data types can be used in a46* <code>CREATE TABLE</code> statement. Or a user might call the method47* <code>supportsCorrelatedSubqueries</code> to see if it is possible to use48* a correlated subquery or <code>supportsBatchUpdates</code> to see if it is49* possible to use batch updates.50* <P>51* Some <code>DatabaseMetaData</code> methods return lists of information52* in the form of <code>ResultSet</code> objects.53* Regular <code>ResultSet</code> methods, such as54* <code>getString</code> and <code>getInt</code>, can be used55* to retrieve the data from these <code>ResultSet</code> objects. If56* a given form of metadata is not available, an empty <code>ResultSet</code>57* will be returned. Additional columns beyond the columns defined to be58* returned by the <code>ResultSet</code> object for a given method59* can be defined by the JDBC driver vendor and must be accessed60* by their <B>column label</B>.61* <P>62* Some <code>DatabaseMetaData</code> methods take arguments that are63* String patterns. These arguments all have names such as fooPattern.64* Within a pattern String, "%" means match any substring of 0 or more65* characters, and "_" means match any one character. Only metadata66* entries matching the search pattern are returned. If a search pattern67* argument is set to <code>null</code>, that argument's criterion will68* be dropped from the search.69*70*/71public interface DatabaseMetaData extends Wrapper {7273//----------------------------------------------------------------------74// First, a variety of minor information about the target database.7576/**77* Retrieves whether the current user can call all the procedures78* returned by the method <code>getProcedures</code>.79*80* @return <code>true</code> if so; <code>false</code> otherwise81* @exception SQLException if a database access error occurs82*/83boolean allProceduresAreCallable() throws SQLException;8485/**86* Retrieves whether the current user can use all the tables returned87* by the method <code>getTables</code> in a <code>SELECT</code>88* statement.89*90* @return <code>true</code> if so; <code>false</code> otherwise91* @exception SQLException if a database access error occurs92*/93boolean allTablesAreSelectable() throws SQLException;9495/**96* Retrieves the URL for this DBMS.97*98* @return the URL for this DBMS or <code>null</code> if it cannot be99* generated100* @exception SQLException if a database access error occurs101*/102String getURL() throws SQLException;103104/**105* Retrieves the user name as known to this database.106*107* @return the database user name108* @exception SQLException if a database access error occurs109*/110String getUserName() throws SQLException;111112/**113* Retrieves whether this database is in read-only mode.114*115* @return <code>true</code> if so; <code>false</code> otherwise116* @exception SQLException if a database access error occurs117*/118boolean isReadOnly() throws SQLException;119120/**121* Retrieves whether <code>NULL</code> values are sorted high.122* Sorted high means that <code>NULL</code> values123* sort higher than any other value in a domain. In an ascending order,124* if this method returns <code>true</code>, <code>NULL</code> values125* will appear at the end. By contrast, the method126* <code>nullsAreSortedAtEnd</code> indicates whether <code>NULL</code> values127* are sorted at the end regardless of sort order.128*129* @return <code>true</code> if so; <code>false</code> otherwise130* @exception SQLException if a database access error occurs131*/132boolean nullsAreSortedHigh() throws SQLException;133134/**135* Retrieves whether <code>NULL</code> values are sorted low.136* Sorted low means that <code>NULL</code> values137* sort lower than any other value in a domain. In an ascending order,138* if this method returns <code>true</code>, <code>NULL</code> values139* will appear at the beginning. By contrast, the method140* <code>nullsAreSortedAtStart</code> indicates whether <code>NULL</code> values141* are sorted at the beginning regardless of sort order.142*143* @return <code>true</code> if so; <code>false</code> otherwise144* @exception SQLException if a database access error occurs145*/146boolean nullsAreSortedLow() throws SQLException;147148/**149* Retrieves whether <code>NULL</code> values are sorted at the start regardless150* of sort order.151*152* @return <code>true</code> if so; <code>false</code> otherwise153* @exception SQLException if a database access error occurs154*/155boolean nullsAreSortedAtStart() throws SQLException;156157/**158* Retrieves whether <code>NULL</code> values are sorted at the end regardless of159* sort order.160*161* @return <code>true</code> if so; <code>false</code> otherwise162* @exception SQLException if a database access error occurs163*/164boolean nullsAreSortedAtEnd() throws SQLException;165166/**167* Retrieves the name of this database product.168*169* @return database product name170* @exception SQLException if a database access error occurs171*/172String getDatabaseProductName() throws SQLException;173174/**175* Retrieves the version number of this database product.176*177* @return database version number178* @exception SQLException if a database access error occurs179*/180String getDatabaseProductVersion() throws SQLException;181182/**183* Retrieves the name of this JDBC driver.184*185* @return JDBC driver name186* @exception SQLException if a database access error occurs187*/188String getDriverName() throws SQLException;189190/**191* Retrieves the version number of this JDBC driver as a <code>String</code>.192*193* @return JDBC driver version194* @exception SQLException if a database access error occurs195*/196String getDriverVersion() throws SQLException;197198/**199* Retrieves this JDBC driver's major version number.200*201* @return JDBC driver major version202*/203int getDriverMajorVersion();204205/**206* Retrieves this JDBC driver's minor version number.207*208* @return JDBC driver minor version number209*/210int getDriverMinorVersion();211212/**213* Retrieves whether this database stores tables in a local file.214*215* @return <code>true</code> if so; <code>false</code> otherwise216* @exception SQLException if a database access error occurs217*/218boolean usesLocalFiles() throws SQLException;219220/**221* Retrieves whether this database uses a file for each table.222*223* @return <code>true</code> if this database uses a local file for each table;224* <code>false</code> otherwise225* @exception SQLException if a database access error occurs226*/227boolean usesLocalFilePerTable() throws SQLException;228229/**230* Retrieves whether this database treats mixed case unquoted SQL identifiers as231* case sensitive and as a result stores them in mixed case.232*233* @return <code>true</code> if so; <code>false</code> otherwise234* @exception SQLException if a database access error occurs235*/236boolean supportsMixedCaseIdentifiers() throws SQLException;237238/**239* Retrieves whether this database treats mixed case unquoted SQL identifiers as240* case insensitive and stores them in upper case.241*242* @return <code>true</code> if so; <code>false</code> otherwise243* @exception SQLException if a database access error occurs244*/245boolean storesUpperCaseIdentifiers() throws SQLException;246247/**248* Retrieves whether this database treats mixed case unquoted SQL identifiers as249* case insensitive and stores them in lower case.250*251* @return <code>true</code> if so; <code>false</code> otherwise252* @exception SQLException if a database access error occurs253*/254boolean storesLowerCaseIdentifiers() throws SQLException;255256/**257* Retrieves whether this database treats mixed case unquoted SQL identifiers as258* case insensitive and stores them in mixed case.259*260* @return <code>true</code> if so; <code>false</code> otherwise261* @exception SQLException if a database access error occurs262*/263boolean storesMixedCaseIdentifiers() throws SQLException;264265/**266* Retrieves whether this database treats mixed case quoted SQL identifiers as267* case sensitive and as a result stores them in mixed case.268*269* @return <code>true</code> if so; <code>false</code> otherwise270* @exception SQLException if a database access error occurs271*/272boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;273274/**275* Retrieves whether this database treats mixed case quoted SQL identifiers as276* case insensitive and stores them in upper case.277*278* @return <code>true</code> if so; <code>false</code> otherwise279* @exception SQLException if a database access error occurs280*/281boolean storesUpperCaseQuotedIdentifiers() throws SQLException;282283/**284* Retrieves whether this database treats mixed case quoted SQL identifiers as285* case insensitive and stores them in lower case.286*287* @return <code>true</code> if so; <code>false</code> otherwise288* @exception SQLException if a database access error occurs289*/290boolean storesLowerCaseQuotedIdentifiers() throws SQLException;291292/**293* Retrieves whether this database treats mixed case quoted SQL identifiers as294* case insensitive and stores them in mixed case.295*296* @return <code>true</code> if so; <code>false</code> otherwise297* @exception SQLException if a database access error occurs298*/299boolean storesMixedCaseQuotedIdentifiers() throws SQLException;300301/**302* Retrieves the string used to quote SQL identifiers.303* This method returns a space " " if identifier quoting is not supported.304*305* @return the quoting string or a space if quoting is not supported306* @exception SQLException if a database access error occurs307*/308String getIdentifierQuoteString() throws SQLException;309310/**311* Retrieves a comma-separated list of all of this database's SQL keywords312* that are NOT also SQL:2003 keywords.313*314* @return the list of this database's keywords that are not also315* SQL:2003 keywords316* @exception SQLException if a database access error occurs317*/318String getSQLKeywords() throws SQLException;319320/**321* Retrieves a comma-separated list of math functions available with322* this database. These are the Open /Open CLI math function names used in323* the JDBC function escape clause.324*325* @return the list of math functions supported by this database326* @exception SQLException if a database access error occurs327*/328String getNumericFunctions() throws SQLException;329330/**331* Retrieves a comma-separated list of string functions available with332* this database. These are the Open Group CLI string function names used333* in the JDBC function escape clause.334*335* @return the list of string functions supported by this database336* @exception SQLException if a database access error occurs337*/338String getStringFunctions() throws SQLException;339340/**341* Retrieves a comma-separated list of system functions available with342* this database. These are the Open Group CLI system function names used343* in the JDBC function escape clause.344*345* @return a list of system functions supported by this database346* @exception SQLException if a database access error occurs347*/348String getSystemFunctions() throws SQLException;349350/**351* Retrieves a comma-separated list of the time and date functions available352* with this database.353*354* @return the list of time and date functions supported by this database355* @exception SQLException if a database access error occurs356*/357String getTimeDateFunctions() throws SQLException;358359/**360* Retrieves the string that can be used to escape wildcard characters.361* This is the string that can be used to escape '_' or '%' in362* the catalog search parameters that are a pattern (and therefore use one363* of the wildcard characters).364*365* <P>The '_' character represents any single character;366* the '%' character represents any sequence of zero or367* more characters.368*369* @return the string used to escape wildcard characters370* @exception SQLException if a database access error occurs371*/372String getSearchStringEscape() throws SQLException;373374/**375* Retrieves all the "extra" characters that can be used in unquoted376* identifier names (those beyond a-z, A-Z, 0-9 and _).377*378* @return the string containing the extra characters379* @exception SQLException if a database access error occurs380*/381String getExtraNameCharacters() throws SQLException;382383//--------------------------------------------------------------------384// Functions describing which features are supported.385386/**387* Retrieves whether this database supports <code>ALTER TABLE</code>388* with add column.389*390* @return <code>true</code> if so; <code>false</code> otherwise391* @exception SQLException if a database access error occurs392*/393boolean supportsAlterTableWithAddColumn() throws SQLException;394395/**396* Retrieves whether this database supports <code>ALTER TABLE</code>397* with drop column.398*399* @return <code>true</code> if so; <code>false</code> otherwise400* @exception SQLException if a database access error occurs401*/402boolean supportsAlterTableWithDropColumn() throws SQLException;403404/**405* Retrieves whether this database supports column aliasing.406*407* <P>If so, the SQL AS clause can be used to provide names for408* computed columns or to provide alias names for columns as409* required.410*411* @return <code>true</code> if so; <code>false</code> otherwise412* @exception SQLException if a database access error occurs413*/414boolean supportsColumnAliasing() throws SQLException;415416/**417* Retrieves whether this database supports concatenations between418* <code>NULL</code> and non-<code>NULL</code> values being419* <code>NULL</code>.420*421* @return <code>true</code> if so; <code>false</code> otherwise422* @exception SQLException if a database access error occurs423*/424boolean nullPlusNonNullIsNull() throws SQLException;425426/**427* Retrieves whether this database supports the JDBC scalar function428* <code>CONVERT</code> for the conversion of one JDBC type to another.429* The JDBC types are the generic SQL data types defined430* in <code>java.sql.Types</code>.431*432* @return <code>true</code> if so; <code>false</code> otherwise433* @exception SQLException if a database access error occurs434*/435boolean supportsConvert() throws SQLException;436437/**438* Retrieves whether this database supports the JDBC scalar function439* <code>CONVERT</code> for conversions between the JDBC types <i>fromType</i>440* and <i>toType</i>. The JDBC types are the generic SQL data types defined441* in <code>java.sql.Types</code>.442*443* @param fromType the type to convert from; one of the type codes from444* the class <code>java.sql.Types</code>445* @param toType the type to convert to; one of the type codes from446* the class <code>java.sql.Types</code>447* @return <code>true</code> if so; <code>false</code> otherwise448* @exception SQLException if a database access error occurs449* @see Types450*/451boolean supportsConvert(int fromType, int toType) throws SQLException;452453/**454* Retrieves whether this database supports table correlation names.455*456* @return <code>true</code> if so; <code>false</code> otherwise457* @exception SQLException if a database access error occurs458*/459boolean supportsTableCorrelationNames() throws SQLException;460461/**462* Retrieves whether, when table correlation names are supported, they463* are restricted to being different from the names of the tables.464*465* @return <code>true</code> if so; <code>false</code> otherwise466* @exception SQLException if a database access error occurs467*/468boolean supportsDifferentTableCorrelationNames() throws SQLException;469470/**471* Retrieves whether this database supports expressions in472* <code>ORDER BY</code> lists.473*474* @return <code>true</code> if so; <code>false</code> otherwise475* @exception SQLException if a database access error occurs476*/477boolean supportsExpressionsInOrderBy() throws SQLException;478479/**480* Retrieves whether this database supports using a column that is481* not in the <code>SELECT</code> statement in an482* <code>ORDER BY</code> clause.483*484* @return <code>true</code> if so; <code>false</code> otherwise485* @exception SQLException if a database access error occurs486*/487boolean supportsOrderByUnrelated() throws SQLException;488489/**490* Retrieves whether this database supports some form of491* <code>GROUP BY</code> clause.492*493* @return <code>true</code> if so; <code>false</code> otherwise494* @exception SQLException if a database access error occurs495*/496boolean supportsGroupBy() throws SQLException;497498/**499* Retrieves whether this database supports using a column that is500* not in the <code>SELECT</code> statement in a501* <code>GROUP BY</code> clause.502*503* @return <code>true</code> if so; <code>false</code> otherwise504* @exception SQLException if a database access error occurs505*/506boolean supportsGroupByUnrelated() throws SQLException;507508/**509* Retrieves whether this database supports using columns not included in510* the <code>SELECT</code> statement in a <code>GROUP BY</code> clause511* provided that all of the columns in the <code>SELECT</code> statement512* are included in the <code>GROUP BY</code> clause.513*514* @return <code>true</code> if so; <code>false</code> otherwise515* @exception SQLException if a database access error occurs516*/517boolean supportsGroupByBeyondSelect() throws SQLException;518519/**520* Retrieves whether this database supports specifying a521* <code>LIKE</code> escape clause.522*523* @return <code>true</code> if so; <code>false</code> otherwise524* @exception SQLException if a database access error occurs525*/526boolean supportsLikeEscapeClause() throws SQLException;527528/**529* Retrieves whether this database supports getting multiple530* <code>ResultSet</code> objects from a single call to the531* method <code>execute</code>.532*533* @return <code>true</code> if so; <code>false</code> otherwise534* @exception SQLException if a database access error occurs535*/536boolean supportsMultipleResultSets() throws SQLException;537538/**539* Retrieves whether this database allows having multiple540* transactions open at once (on different connections).541*542* @return <code>true</code> if so; <code>false</code> otherwise543* @exception SQLException if a database access error occurs544*/545boolean supportsMultipleTransactions() throws SQLException;546547/**548* Retrieves whether columns in this database may be defined as non-nullable.549*550* @return <code>true</code> if so; <code>false</code> otherwise551* @exception SQLException if a database access error occurs552*/553boolean supportsNonNullableColumns() throws SQLException;554555/**556* Retrieves whether this database supports the ODBC Minimum SQL grammar.557*558* @return <code>true</code> if so; <code>false</code> otherwise559* @exception SQLException if a database access error occurs560*/561boolean supportsMinimumSQLGrammar() throws SQLException;562563/**564* Retrieves whether this database supports the ODBC Core SQL grammar.565*566* @return <code>true</code> if so; <code>false</code> otherwise567* @exception SQLException if a database access error occurs568*/569boolean supportsCoreSQLGrammar() throws SQLException;570571/**572* Retrieves whether this database supports the ODBC Extended SQL grammar.573*574* @return <code>true</code> if so; <code>false</code> otherwise575* @exception SQLException if a database access error occurs576*/577boolean supportsExtendedSQLGrammar() throws SQLException;578579/**580* Retrieves whether this database supports the ANSI92 entry level SQL581* grammar.582*583* @return <code>true</code> if so; <code>false</code> otherwise584* @exception SQLException if a database access error occurs585*/586boolean supportsANSI92EntryLevelSQL() throws SQLException;587588/**589* Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.590*591* @return <code>true</code> if so; <code>false</code> otherwise592* @exception SQLException if a database access error occurs593*/594boolean supportsANSI92IntermediateSQL() throws SQLException;595596/**597* Retrieves whether this database supports the ANSI92 full SQL grammar supported.598*599* @return <code>true</code> if so; <code>false</code> otherwise600* @exception SQLException if a database access error occurs601*/602boolean supportsANSI92FullSQL() throws SQLException;603604/**605* Retrieves whether this database supports the SQL Integrity606* Enhancement Facility.607*608* @return <code>true</code> if so; <code>false</code> otherwise609* @exception SQLException if a database access error occurs610*/611boolean supportsIntegrityEnhancementFacility() throws SQLException;612613/**614* Retrieves whether this database supports some form of outer join.615*616* @return <code>true</code> if so; <code>false</code> otherwise617* @exception SQLException if a database access error occurs618*/619boolean supportsOuterJoins() throws SQLException;620621/**622* Retrieves whether this database supports full nested outer joins.623*624* @return <code>true</code> if so; <code>false</code> otherwise625* @exception SQLException if a database access error occurs626*/627boolean supportsFullOuterJoins() throws SQLException;628629/**630* Retrieves whether this database provides limited support for outer631* joins. (This will be <code>true</code> if the method632* <code>supportsFullOuterJoins</code> returns <code>true</code>).633*634* @return <code>true</code> if so; <code>false</code> otherwise635* @exception SQLException if a database access error occurs636*/637boolean supportsLimitedOuterJoins() throws SQLException;638639/**640* Retrieves the database vendor's preferred term for "schema".641*642* @return the vendor term for "schema"643* @exception SQLException if a database access error occurs644*/645String getSchemaTerm() throws SQLException;646647/**648* Retrieves the database vendor's preferred term for "procedure".649*650* @return the vendor term for "procedure"651* @exception SQLException if a database access error occurs652*/653String getProcedureTerm() throws SQLException;654655/**656* Retrieves the database vendor's preferred term for "catalog".657*658* @return the vendor term for "catalog"659* @exception SQLException if a database access error occurs660*/661String getCatalogTerm() throws SQLException;662663/**664* Retrieves whether a catalog appears at the start of a fully qualified665* table name. If not, the catalog appears at the end.666*667* @return <code>true</code> if the catalog name appears at the beginning668* of a fully qualified table name; <code>false</code> otherwise669* @exception SQLException if a database access error occurs670*/671boolean isCatalogAtStart() throws SQLException;672673/**674* Retrieves the <code>String</code> that this database uses as the675* separator between a catalog and table name.676*677* @return the separator string678* @exception SQLException if a database access error occurs679*/680String getCatalogSeparator() throws SQLException;681682/**683* Retrieves whether a schema name can be used in a data manipulation statement.684*685* @return <code>true</code> if so; <code>false</code> otherwise686* @exception SQLException if a database access error occurs687*/688boolean supportsSchemasInDataManipulation() throws SQLException;689690/**691* Retrieves whether a schema name can be used in a procedure call statement.692*693* @return <code>true</code> if so; <code>false</code> otherwise694* @exception SQLException if a database access error occurs695*/696boolean supportsSchemasInProcedureCalls() throws SQLException;697698/**699* Retrieves whether a schema name can be used in a table definition statement.700*701* @return <code>true</code> if so; <code>false</code> otherwise702* @exception SQLException if a database access error occurs703*/704boolean supportsSchemasInTableDefinitions() throws SQLException;705706/**707* Retrieves whether a schema name can be used in an index definition statement.708*709* @return <code>true</code> if so; <code>false</code> otherwise710* @exception SQLException if a database access error occurs711*/712boolean supportsSchemasInIndexDefinitions() throws SQLException;713714/**715* Retrieves whether a schema name can be used in a privilege definition statement.716*717* @return <code>true</code> if so; <code>false</code> otherwise718* @exception SQLException if a database access error occurs719*/720boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;721722/**723* Retrieves whether a catalog name can be used in a data manipulation statement.724*725* @return <code>true</code> if so; <code>false</code> otherwise726* @exception SQLException if a database access error occurs727*/728boolean supportsCatalogsInDataManipulation() throws SQLException;729730/**731* Retrieves whether a catalog name can be used in a procedure call statement.732*733* @return <code>true</code> if so; <code>false</code> otherwise734* @exception SQLException if a database access error occurs735*/736boolean supportsCatalogsInProcedureCalls() throws SQLException;737738/**739* Retrieves whether a catalog name can be used in a table definition statement.740*741* @return <code>true</code> if so; <code>false</code> otherwise742* @exception SQLException if a database access error occurs743*/744boolean supportsCatalogsInTableDefinitions() throws SQLException;745746/**747* Retrieves whether a catalog name can be used in an index definition statement.748*749* @return <code>true</code> if so; <code>false</code> otherwise750* @exception SQLException if a database access error occurs751*/752boolean supportsCatalogsInIndexDefinitions() throws SQLException;753754/**755* Retrieves whether a catalog name can be used in a privilege definition statement.756*757* @return <code>true</code> if so; <code>false</code> otherwise758* @exception SQLException if a database access error occurs759*/760boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;761762763/**764* Retrieves whether this database supports positioned <code>DELETE</code>765* statements.766*767* @return <code>true</code> if so; <code>false</code> otherwise768* @exception SQLException if a database access error occurs769*/770boolean supportsPositionedDelete() throws SQLException;771772/**773* Retrieves whether this database supports positioned <code>UPDATE</code>774* statements.775*776* @return <code>true</code> if so; <code>false</code> otherwise777* @exception SQLException if a database access error occurs778*/779boolean supportsPositionedUpdate() throws SQLException;780781/**782* Retrieves whether this database supports <code>SELECT FOR UPDATE</code>783* statements.784*785* @return <code>true</code> if so; <code>false</code> otherwise786* @exception SQLException if a database access error occurs787*/788boolean supportsSelectForUpdate() throws SQLException;789790/**791* Retrieves whether this database supports stored procedure calls792* that use the stored procedure escape syntax.793*794* @return <code>true</code> if so; <code>false</code> otherwise795* @exception SQLException if a database access error occurs796*/797boolean supportsStoredProcedures() throws SQLException;798799/**800* Retrieves whether this database supports subqueries in comparison801* expressions.802*803* @return <code>true</code> if so; <code>false</code> otherwise804* @exception SQLException if a database access error occurs805*/806boolean supportsSubqueriesInComparisons() throws SQLException;807808/**809* Retrieves whether this database supports subqueries in810* <code>EXISTS</code> expressions.811*812* @return <code>true</code> if so; <code>false</code> otherwise813* @exception SQLException if a database access error occurs814*/815boolean supportsSubqueriesInExists() throws SQLException;816817/**818* Retrieves whether this database supports subqueries in819* <code>IN</code> expressions.820*821* @return <code>true</code> if so; <code>false</code> otherwise822* @exception SQLException if a database access error occurs823*/824boolean supportsSubqueriesInIns() throws SQLException;825826/**827* Retrieves whether this database supports subqueries in quantified828* expressions.829*830* @return <code>true</code> if so; <code>false</code> otherwise831* @exception SQLException if a database access error occurs832*/833boolean supportsSubqueriesInQuantifieds() throws SQLException;834835/**836* Retrieves whether this database supports correlated subqueries.837*838* @return <code>true</code> if so; <code>false</code> otherwise839* @exception SQLException if a database access error occurs840*/841boolean supportsCorrelatedSubqueries() throws SQLException;842843/**844* Retrieves whether this database supports SQL <code>UNION</code>.845*846* @return <code>true</code> if so; <code>false</code> otherwise847* @exception SQLException if a database access error occurs848*/849boolean supportsUnion() throws SQLException;850851/**852* Retrieves whether this database supports SQL <code>UNION ALL</code>.853*854* @return <code>true</code> if so; <code>false</code> otherwise855* @exception SQLException if a database access error occurs856*/857boolean supportsUnionAll() throws SQLException;858859/**860* Retrieves whether this database supports keeping cursors open861* across commits.862*863* @return <code>true</code> if cursors always remain open;864* <code>false</code> if they might not remain open865* @exception SQLException if a database access error occurs866*/867boolean supportsOpenCursorsAcrossCommit() throws SQLException;868869/**870* Retrieves whether this database supports keeping cursors open871* across rollbacks.872*873* @return <code>true</code> if cursors always remain open;874* <code>false</code> if they might not remain open875* @exception SQLException if a database access error occurs876*/877boolean supportsOpenCursorsAcrossRollback() throws SQLException;878879/**880* Retrieves whether this database supports keeping statements open881* across commits.882*883* @return <code>true</code> if statements always remain open;884* <code>false</code> if they might not remain open885* @exception SQLException if a database access error occurs886*/887boolean supportsOpenStatementsAcrossCommit() throws SQLException;888889/**890* Retrieves whether this database supports keeping statements open891* across rollbacks.892*893* @return <code>true</code> if statements always remain open;894* <code>false</code> if they might not remain open895* @exception SQLException if a database access error occurs896*/897boolean supportsOpenStatementsAcrossRollback() throws SQLException;898899900901//----------------------------------------------------------------------902// The following group of methods exposes various limitations903// based on the target database with the current driver.904// Unless otherwise specified, a result of zero means there is no905// limit, or the limit is not known.906907/**908* Retrieves the maximum number of hex characters this database allows in an909* inline binary literal.910*911* @return max the maximum length (in hex characters) for a binary literal;912* a result of zero means that there is no limit or the limit913* is not known914* @exception SQLException if a database access error occurs915*/916int getMaxBinaryLiteralLength() throws SQLException;917918/**919* Retrieves the maximum number of characters this database allows920* for a character literal.921*922* @return the maximum number of characters allowed for a character literal;923* a result of zero means that there is no limit or the limit is924* not known925* @exception SQLException if a database access error occurs926*/927int getMaxCharLiteralLength() throws SQLException;928929/**930* Retrieves the maximum number of characters this database allows931* for a column name.932*933* @return the maximum number of characters allowed for a column name;934* a result of zero means that there is no limit or the limit935* is not known936* @exception SQLException if a database access error occurs937*/938int getMaxColumnNameLength() throws SQLException;939940/**941* Retrieves the maximum number of columns this database allows in a942* <code>GROUP BY</code> clause.943*944* @return the maximum number of columns allowed;945* a result of zero means that there is no limit or the limit946* is not known947* @exception SQLException if a database access error occurs948*/949int getMaxColumnsInGroupBy() throws SQLException;950951/**952* Retrieves the maximum number of columns this database allows in an index.953*954* @return the maximum number of columns allowed;955* a result of zero means that there is no limit or the limit956* is not known957* @exception SQLException if a database access error occurs958*/959int getMaxColumnsInIndex() throws SQLException;960961/**962* Retrieves the maximum number of columns this database allows in an963* <code>ORDER BY</code> clause.964*965* @return the maximum number of columns allowed;966* a result of zero means that there is no limit or the limit967* is not known968* @exception SQLException if a database access error occurs969*/970int getMaxColumnsInOrderBy() throws SQLException;971972/**973* Retrieves the maximum number of columns this database allows in a974* <code>SELECT</code> list.975*976* @return the maximum number of columns allowed;977* a result of zero means that there is no limit or the limit978* is not known979* @exception SQLException if a database access error occurs980*/981int getMaxColumnsInSelect() throws SQLException;982983/**984* Retrieves the maximum number of columns this database allows in a table.985*986* @return the maximum number of columns allowed;987* a result of zero means that there is no limit or the limit988* is not known989* @exception SQLException if a database access error occurs990*/991int getMaxColumnsInTable() throws SQLException;992993/**994* Retrieves the maximum number of concurrent connections to this995* database that are possible.996*997* @return the maximum number of active connections possible at one time;998* a result of zero means that there is no limit or the limit999* is not known1000* @exception SQLException if a database access error occurs1001*/1002int getMaxConnections() throws SQLException;10031004/**1005* Retrieves the maximum number of characters that this database allows in a1006* cursor name.1007*1008* @return the maximum number of characters allowed in a cursor name;1009* a result of zero means that there is no limit or the limit1010* is not known1011* @exception SQLException if a database access error occurs1012*/1013int getMaxCursorNameLength() throws SQLException;10141015/**1016* Retrieves the maximum number of bytes this database allows for an1017* index, including all of the parts of the index.1018*1019* @return the maximum number of bytes allowed; this limit includes the1020* composite of all the constituent parts of the index;1021* a result of zero means that there is no limit or the limit1022* is not known1023* @exception SQLException if a database access error occurs1024*/1025int getMaxIndexLength() throws SQLException;10261027/**1028* Retrieves the maximum number of characters that this database allows in a1029* schema name.1030*1031* @return the maximum number of characters allowed in a schema name;1032* a result of zero means that there is no limit or the limit1033* is not known1034* @exception SQLException if a database access error occurs1035*/1036int getMaxSchemaNameLength() throws SQLException;10371038/**1039* Retrieves the maximum number of characters that this database allows in a1040* procedure name.1041*1042* @return the maximum number of characters allowed in a procedure name;1043* a result of zero means that there is no limit or the limit1044* is not known1045* @exception SQLException if a database access error occurs1046*/1047int getMaxProcedureNameLength() throws SQLException;10481049/**1050* Retrieves the maximum number of characters that this database allows in a1051* catalog name.1052*1053* @return the maximum number of characters allowed in a catalog name;1054* a result of zero means that there is no limit or the limit1055* is not known1056* @exception SQLException if a database access error occurs1057*/1058int getMaxCatalogNameLength() throws SQLException;10591060/**1061* Retrieves the maximum number of bytes this database allows in1062* a single row.1063*1064* @return the maximum number of bytes allowed for a row; a result of1065* zero means that there is no limit or the limit is not known1066* @exception SQLException if a database access error occurs1067*/1068int getMaxRowSize() throws SQLException;10691070/**1071* Retrieves whether the return value for the method1072* <code>getMaxRowSize</code> includes the SQL data types1073* <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.1074*1075* @return <code>true</code> if so; <code>false</code> otherwise1076* @exception SQLException if a database access error occurs1077*/1078boolean doesMaxRowSizeIncludeBlobs() throws SQLException;10791080/**1081* Retrieves the maximum number of characters this database allows in1082* an SQL statement.1083*1084* @return the maximum number of characters allowed for an SQL statement;1085* a result of zero means that there is no limit or the limit1086* is not known1087* @exception SQLException if a database access error occurs1088*/1089int getMaxStatementLength() throws SQLException;10901091/**1092* Retrieves the maximum number of active statements to this database1093* that can be open at the same time.1094*1095* @return the maximum number of statements that can be open at one time;1096* a result of zero means that there is no limit or the limit1097* is not known1098* @exception SQLException if a database access error occurs1099*/1100int getMaxStatements() throws SQLException;11011102/**1103* Retrieves the maximum number of characters this database allows in1104* a table name.1105*1106* @return the maximum number of characters allowed for a table name;1107* a result of zero means that there is no limit or the limit1108* is not known1109* @exception SQLException if a database access error occurs1110*/1111int getMaxTableNameLength() throws SQLException;11121113/**1114* Retrieves the maximum number of tables this database allows in a1115* <code>SELECT</code> statement.1116*1117* @return the maximum number of tables allowed in a <code>SELECT</code>1118* statement; a result of zero means that there is no limit or1119* the limit is not known1120* @exception SQLException if a database access error occurs1121*/1122int getMaxTablesInSelect() throws SQLException;11231124/**1125* Retrieves the maximum number of characters this database allows in1126* a user name.1127*1128* @return the maximum number of characters allowed for a user name;1129* a result of zero means that there is no limit or the limit1130* is not known1131* @exception SQLException if a database access error occurs1132*/1133int getMaxUserNameLength() throws SQLException;11341135//----------------------------------------------------------------------11361137/**1138* Retrieves this database's default transaction isolation level. The1139* possible values are defined in <code>java.sql.Connection</code>.1140*1141* @return the default isolation level1142* @exception SQLException if a database access error occurs1143* @see Connection1144*/1145int getDefaultTransactionIsolation() throws SQLException;11461147/**1148* Retrieves whether this database supports transactions. If not, invoking the1149* method <code>commit</code> is a noop, and the isolation level is1150* <code>TRANSACTION_NONE</code>.1151*1152* @return <code>true</code> if transactions are supported;1153* <code>false</code> otherwise1154* @exception SQLException if a database access error occurs1155*/1156boolean supportsTransactions() throws SQLException;11571158/**1159* Retrieves whether this database supports the given transaction isolation level.1160*1161* @param level one of the transaction isolation levels defined in1162* <code>java.sql.Connection</code>1163* @return <code>true</code> if so; <code>false</code> otherwise1164* @exception SQLException if a database access error occurs1165* @see Connection1166*/1167boolean supportsTransactionIsolationLevel(int level)1168throws SQLException;11691170/**1171* Retrieves whether this database supports both data definition and1172* data manipulation statements within a transaction.1173*1174* @return <code>true</code> if so; <code>false</code> otherwise1175* @exception SQLException if a database access error occurs1176*/1177boolean supportsDataDefinitionAndDataManipulationTransactions()1178throws SQLException;1179/**1180* Retrieves whether this database supports only data manipulation1181* statements within a transaction.1182*1183* @return <code>true</code> if so; <code>false</code> otherwise1184* @exception SQLException if a database access error occurs1185*/1186boolean supportsDataManipulationTransactionsOnly()1187throws SQLException;11881189/**1190* Retrieves whether a data definition statement within a transaction forces1191* the transaction to commit.1192*1193* @return <code>true</code> if so; <code>false</code> otherwise1194* @exception SQLException if a database access error occurs1195*/1196boolean dataDefinitionCausesTransactionCommit()1197throws SQLException;11981199/**1200* Retrieves whether this database ignores a data definition statement1201* within a transaction.1202*1203* @return <code>true</code> if so; <code>false</code> otherwise1204* @exception SQLException if a database access error occurs1205*/1206boolean dataDefinitionIgnoredInTransactions()1207throws SQLException;12081209/**1210* Retrieves a description of the stored procedures available in the given1211* catalog.1212* <P>1213* Only procedure descriptions matching the schema and1214* procedure name criteria are returned. They are ordered by1215* <code>PROCEDURE_CAT</code>, <code>PROCEDURE_SCHEM</code>,1216* <code>PROCEDURE_NAME</code> and <code>SPECIFIC_ NAME</code>.1217*1218* <P>Each procedure description has the the following columns:1219* <OL>1220* <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be <code>null</code>)1221* <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be <code>null</code>)1222* <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name1223* <LI> reserved for future use1224* <LI> reserved for future use1225* <LI> reserved for future use1226* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the procedure1227* <LI><B>PROCEDURE_TYPE</B> short {@code =>} kind of procedure:1228* <UL>1229* <LI> procedureResultUnknown - Cannot determine if a return value1230* will be returned1231* <LI> procedureNoResult - Does not return a return value1232* <LI> procedureReturnsResult - Returns a return value1233* </UL>1234* <LI><B>SPECIFIC_NAME</B> String {@code =>} The name which uniquely identifies this1235* procedure within its schema.1236* </OL>1237* <p>1238* A user may not have permissions to execute any of the procedures that are1239* returned by <code>getProcedures</code>1240*1241* @param catalog a catalog name; must match the catalog name as it1242* is stored in the database; "" retrieves those without a catalog;1243* <code>null</code> means that the catalog name should not be used to narrow1244* the search1245* @param schemaPattern a schema name pattern; must match the schema name1246* as it is stored in the database; "" retrieves those without a schema;1247* <code>null</code> means that the schema name should not be used to narrow1248* the search1249* @param procedureNamePattern a procedure name pattern; must match the1250* procedure name as it is stored in the database1251* @return <code>ResultSet</code> - each row is a procedure description1252* @exception SQLException if a database access error occurs1253* @see #getSearchStringEscape1254*/1255ResultSet getProcedures(String catalog, String schemaPattern,1256String procedureNamePattern) throws SQLException;12571258/**1259* Indicates that it is not known whether the procedure returns1260* a result.1261* <P>1262* A possible value for column <code>PROCEDURE_TYPE</code> in the1263* <code>ResultSet</code> object returned by the method1264* <code>getProcedures</code>.1265*/1266int procedureResultUnknown = 0;12671268/**1269* Indicates that the procedure does not return a result.1270* <P>1271* A possible value for column <code>PROCEDURE_TYPE</code> in the1272* <code>ResultSet</code> object returned by the method1273* <code>getProcedures</code>.1274*/1275int procedureNoResult = 1;12761277/**1278* Indicates that the procedure returns a result.1279* <P>1280* A possible value for column <code>PROCEDURE_TYPE</code> in the1281* <code>ResultSet</code> object returned by the method1282* <code>getProcedures</code>.1283*/1284int procedureReturnsResult = 2;12851286/**1287* Retrieves a description of the given catalog's stored procedure parameter1288* and result columns.1289*1290* <P>Only descriptions matching the schema, procedure and1291* parameter name criteria are returned. They are ordered by1292* PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_NAME. Within this, the return value,1293* if any, is first. Next are the parameter descriptions in call1294* order. The column descriptions follow in column number order.1295*1296* <P>Each row in the <code>ResultSet</code> is a parameter description or1297* column description with the following fields:1298* <OL>1299* <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be <code>null</code>)1300* <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be <code>null</code>)1301* <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name1302* <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name1303* <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter:1304* <UL>1305* <LI> procedureColumnUnknown - nobody knows1306* <LI> procedureColumnIn - IN parameter1307* <LI> procedureColumnInOut - INOUT parameter1308* <LI> procedureColumnOut - OUT parameter1309* <LI> procedureColumnReturn - procedure return value1310* <LI> procedureColumnResult - result column in <code>ResultSet</code>1311* </UL>1312* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types1313* <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the1314* type name is fully qualified1315* <LI><B>PRECISION</B> int {@code =>} precision1316* <LI><B>LENGTH</B> int {@code =>} length in bytes of data1317* <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where1318* SCALE is not applicable.1319* <LI><B>RADIX</B> short {@code =>} radix1320* <LI><B>NULLABLE</B> short {@code =>} can it contain NULL.1321* <UL>1322* <LI> procedureNoNulls - does not allow NULL values1323* <LI> procedureNullable - allows NULL values1324* <LI> procedureNullableUnknown - nullability unknown1325* </UL>1326* <LI><B>REMARKS</B> String {@code =>} comment describing parameter/column1327* <LI><B>COLUMN_DEF</B> String {@code =>} default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>)1328* <UL>1329* <LI> The string NULL (not enclosed in quotes) - if NULL was specified as the default value1330* <LI> TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation1331* <LI> NULL - if a default value was not specified1332* </UL>1333* <LI><B>SQL_DATA_TYPE</B> int {@code =>} reserved for future use1334* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} reserved for future use1335* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} the maximum length of binary and character based columns. For any other datatype the returned value is a1336* NULL1337* <LI><B>ORDINAL_POSITION</B> int {@code =>} the ordinal position, starting from 1, for the input and output parameters for a procedure. A value of 01338*is returned if this row describes the procedure's return value. For result set columns, it is the1339*ordinal position of the column in the result set starting from 1. If there are1340*multiple result sets, the column ordinal positions are implementation1341* defined.1342* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.1343* <UL>1344* <LI> YES --- if the column can include NULLs1345* <LI> NO --- if the column cannot include NULLs1346* <LI> empty string --- if the nullability for the1347* column is unknown1348* </UL>1349* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies this procedure within its schema.1350* </OL>1351*1352* <P><B>Note:</B> Some databases may not return the column1353* descriptions for a procedure.1354*1355* <p>The PRECISION column represents the specified column size for the given column.1356* For numeric data, this is the maximum precision. For character data, this is the length in characters.1357* For datetime datatypes, this is the length in characters of the String representation (assuming the1358* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1359* this is the length in bytes. Null is returned for data types where the1360* column size is not applicable.1361* @param catalog a catalog name; must match the catalog name as it1362* is stored in the database; "" retrieves those without a catalog;1363* <code>null</code> means that the catalog name should not be used to narrow1364* the search1365* @param schemaPattern a schema name pattern; must match the schema name1366* as it is stored in the database; "" retrieves those without a schema;1367* <code>null</code> means that the schema name should not be used to narrow1368* the search1369* @param procedureNamePattern a procedure name pattern; must match the1370* procedure name as it is stored in the database1371* @param columnNamePattern a column name pattern; must match the column name1372* as it is stored in the database1373* @return <code>ResultSet</code> - each row describes a stored procedure parameter or1374* column1375* @exception SQLException if a database access error occurs1376* @see #getSearchStringEscape1377*/1378ResultSet getProcedureColumns(String catalog,1379String schemaPattern,1380String procedureNamePattern,1381String columnNamePattern) throws SQLException;13821383/**1384* Indicates that type of the column is unknown.1385* <P>1386* A possible value for the column1387* <code>COLUMN_TYPE</code>1388* in the <code>ResultSet</code>1389* returned by the method <code>getProcedureColumns</code>.1390*/1391int procedureColumnUnknown = 0;13921393/**1394* Indicates that the column stores IN parameters.1395* <P>1396* A possible value for the column1397* <code>COLUMN_TYPE</code>1398* in the <code>ResultSet</code>1399* returned by the method <code>getProcedureColumns</code>.1400*/1401int procedureColumnIn = 1;14021403/**1404* Indicates that the column stores INOUT parameters.1405* <P>1406* A possible value for the column1407* <code>COLUMN_TYPE</code>1408* in the <code>ResultSet</code>1409* returned by the method <code>getProcedureColumns</code>.1410*/1411int procedureColumnInOut = 2;14121413/**1414* Indicates that the column stores OUT parameters.1415* <P>1416* A possible value for the column1417* <code>COLUMN_TYPE</code>1418* in the <code>ResultSet</code>1419* returned by the method <code>getProcedureColumns</code>.1420*/1421int procedureColumnOut = 4;1422/**1423* Indicates that the column stores return values.1424* <P>1425* A possible value for the column1426* <code>COLUMN_TYPE</code>1427* in the <code>ResultSet</code>1428* returned by the method <code>getProcedureColumns</code>.1429*/1430int procedureColumnReturn = 5;14311432/**1433* Indicates that the column stores results.1434* <P>1435* A possible value for the column1436* <code>COLUMN_TYPE</code>1437* in the <code>ResultSet</code>1438* returned by the method <code>getProcedureColumns</code>.1439*/1440int procedureColumnResult = 3;14411442/**1443* Indicates that <code>NULL</code> values are not allowed.1444* <P>1445* A possible value for the column1446* <code>NULLABLE</code>1447* in the <code>ResultSet</code> object1448* returned by the method <code>getProcedureColumns</code>.1449*/1450int procedureNoNulls = 0;14511452/**1453* Indicates that <code>NULL</code> values are allowed.1454* <P>1455* A possible value for the column1456* <code>NULLABLE</code>1457* in the <code>ResultSet</code> object1458* returned by the method <code>getProcedureColumns</code>.1459*/1460int procedureNullable = 1;14611462/**1463* Indicates that whether <code>NULL</code> values are allowed1464* is unknown.1465* <P>1466* A possible value for the column1467* <code>NULLABLE</code>1468* in the <code>ResultSet</code> object1469* returned by the method <code>getProcedureColumns</code>.1470*/1471int procedureNullableUnknown = 2;147214731474/**1475* Retrieves a description of the tables available in the given catalog.1476* Only table descriptions matching the catalog, schema, table1477* name and type criteria are returned. They are ordered by1478* <code>TABLE_TYPE</code>, <code>TABLE_CAT</code>,1479* <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>.1480* <P>1481* Each table description has the following columns:1482* <OL>1483* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)1484* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)1485* <LI><B>TABLE_NAME</B> String {@code =>} table name1486* <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE",1487* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",1488* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".1489* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the table1490* <LI><B>TYPE_CAT</B> String {@code =>} the types catalog (may be <code>null</code>)1491* <LI><B>TYPE_SCHEM</B> String {@code =>} the types schema (may be <code>null</code>)1492* <LI><B>TYPE_NAME</B> String {@code =>} type name (may be <code>null</code>)1493* <LI><B>SELF_REFERENCING_COL_NAME</B> String {@code =>} name of the designated1494* "identifier" column of a typed table (may be <code>null</code>)1495* <LI><B>REF_GENERATION</B> String {@code =>} specifies how values in1496* SELF_REFERENCING_COL_NAME are created. Values are1497* "SYSTEM", "USER", "DERIVED". (may be <code>null</code>)1498* </OL>1499*1500* <P><B>Note:</B> Some databases may not return information for1501* all tables.1502*1503* @param catalog a catalog name; must match the catalog name as it1504* is stored in the database; "" retrieves those without a catalog;1505* <code>null</code> means that the catalog name should not be used to narrow1506* the search1507* @param schemaPattern a schema name pattern; must match the schema name1508* as it is stored in the database; "" retrieves those without a schema;1509* <code>null</code> means that the schema name should not be used to narrow1510* the search1511* @param tableNamePattern a table name pattern; must match the1512* table name as it is stored in the database1513* @param types a list of table types, which must be from the list of table types1514* returned from {@link #getTableTypes},to include; <code>null</code> returns1515* all types1516* @return <code>ResultSet</code> - each row is a table description1517* @exception SQLException if a database access error occurs1518* @see #getSearchStringEscape1519*/1520ResultSet getTables(String catalog, String schemaPattern,1521String tableNamePattern, String types[]) throws SQLException;15221523/**1524* Retrieves the schema names available in this database. The results1525* are ordered by <code>TABLE_CATALOG</code> and1526* <code>TABLE_SCHEM</code>.1527*1528* <P>The schema columns are:1529* <OL>1530* <LI><B>TABLE_SCHEM</B> String {@code =>} schema name1531* <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be <code>null</code>)1532* </OL>1533*1534* @return a <code>ResultSet</code> object in which each row is a1535* schema description1536* @exception SQLException if a database access error occurs1537*1538*/1539ResultSet getSchemas() throws SQLException;15401541/**1542* Retrieves the catalog names available in this database. The results1543* are ordered by catalog name.1544*1545* <P>The catalog column is:1546* <OL>1547* <LI><B>TABLE_CAT</B> String {@code =>} catalog name1548* </OL>1549*1550* @return a <code>ResultSet</code> object in which each row has a1551* single <code>String</code> column that is a catalog name1552* @exception SQLException if a database access error occurs1553*/1554ResultSet getCatalogs() throws SQLException;15551556/**1557* Retrieves the table types available in this database. The results1558* are ordered by table type.1559*1560* <P>The table type is:1561* <OL>1562* <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE",1563* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",1564* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".1565* </OL>1566*1567* @return a <code>ResultSet</code> object in which each row has a1568* single <code>String</code> column that is a table type1569* @exception SQLException if a database access error occurs1570*/1571ResultSet getTableTypes() throws SQLException;15721573/**1574* Retrieves a description of table columns available in1575* the specified catalog.1576*1577* <P>Only column descriptions matching the catalog, schema, table1578* and column name criteria are returned. They are ordered by1579* <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>,1580* <code>TABLE_NAME</code>, and <code>ORDINAL_POSITION</code>.1581*1582* <P>Each column description has the following columns:1583* <OL>1584* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)1585* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)1586* <LI><B>TABLE_NAME</B> String {@code =>} table name1587* <LI><B>COLUMN_NAME</B> String {@code =>} column name1588* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types1589* <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name,1590* for a UDT the type name is fully qualified1591* <LI><B>COLUMN_SIZE</B> int {@code =>} column size.1592* <LI><B>BUFFER_LENGTH</B> is not used.1593* <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where1594* DECIMAL_DIGITS is not applicable.1595* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)1596* <LI><B>NULLABLE</B> int {@code =>} is NULL allowed.1597* <UL>1598* <LI> columnNoNulls - might not allow <code>NULL</code> values1599* <LI> columnNullable - definitely allows <code>NULL</code> values1600* <LI> columnNullableUnknown - nullability unknown1601* </UL>1602* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>)1603* <LI><B>COLUMN_DEF</B> String {@code =>} default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>)1604* <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused1605* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused1606* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the1607* maximum number of bytes in the column1608* <LI><B>ORDINAL_POSITION</B> int {@code =>} index of column in table1609* (starting at 1)1610* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.1611* <UL>1612* <LI> YES --- if the column can include NULLs1613* <LI> NO --- if the column cannot include NULLs1614* <LI> empty string --- if the nullability for the1615* column is unknown1616* </UL>1617* <LI><B>SCOPE_CATALOG</B> String {@code =>} catalog of table that is the scope1618* of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)1619* <LI><B>SCOPE_SCHEMA</B> String {@code =>} schema of table that is the scope1620* of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)1621* <LI><B>SCOPE_TABLE</B> String {@code =>} table name that this the scope1622* of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)1623* <LI><B>SOURCE_DATA_TYPE</B> short {@code =>} source type of a distinct type or user-generated1624* Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE1625* isn't DISTINCT or user-generated REF)1626* <LI><B>IS_AUTOINCREMENT</B> String {@code =>} Indicates whether this column is auto incremented1627* <UL>1628* <LI> YES --- if the column is auto incremented1629* <LI> NO --- if the column is not auto incremented1630* <LI> empty string --- if it cannot be determined whether the column is auto incremented1631* </UL>1632* <LI><B>IS_GENERATEDCOLUMN</B> String {@code =>} Indicates whether this is a generated column1633* <UL>1634* <LI> YES --- if this a generated column1635* <LI> NO --- if this not a generated column1636* <LI> empty string --- if it cannot be determined whether this is a generated column1637* </UL>1638* </OL>1639*1640* <p>The COLUMN_SIZE column specifies the column size for the given column.1641* For numeric data, this is the maximum precision. For character data, this is the length in characters.1642* For datetime datatypes, this is the length in characters of the String representation (assuming the1643* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1644* this is the length in bytes. Null is returned for data types where the1645* column size is not applicable.1646*1647* @param catalog a catalog name; must match the catalog name as it1648* is stored in the database; "" retrieves those without a catalog;1649* <code>null</code> means that the catalog name should not be used to narrow1650* the search1651* @param schemaPattern a schema name pattern; must match the schema name1652* as it is stored in the database; "" retrieves those without a schema;1653* <code>null</code> means that the schema name should not be used to narrow1654* the search1655* @param tableNamePattern a table name pattern; must match the1656* table name as it is stored in the database1657* @param columnNamePattern a column name pattern; must match the column1658* name as it is stored in the database1659* @return <code>ResultSet</code> - each row is a column description1660* @exception SQLException if a database access error occurs1661* @see #getSearchStringEscape1662*/1663ResultSet getColumns(String catalog, String schemaPattern,1664String tableNamePattern, String columnNamePattern)1665throws SQLException;16661667/**1668* Indicates that the column might not allow <code>NULL</code> values.1669* <P>1670* A possible value for the column1671* <code>NULLABLE</code>1672* in the <code>ResultSet</code> returned by the method1673* <code>getColumns</code>.1674*/1675int columnNoNulls = 0;16761677/**1678* Indicates that the column definitely allows <code>NULL</code> values.1679* <P>1680* A possible value for the column1681* <code>NULLABLE</code>1682* in the <code>ResultSet</code> returned by the method1683* <code>getColumns</code>.1684*/1685int columnNullable = 1;16861687/**1688* Indicates that the nullability of columns is unknown.1689* <P>1690* A possible value for the column1691* <code>NULLABLE</code>1692* in the <code>ResultSet</code> returned by the method1693* <code>getColumns</code>.1694*/1695int columnNullableUnknown = 2;16961697/**1698* Retrieves a description of the access rights for a table's columns.1699*1700* <P>Only privileges matching the column name criteria are1701* returned. They are ordered by COLUMN_NAME and PRIVILEGE.1702*1703* <P>Each privilege description has the following columns:1704* <OL>1705* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)1706* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)1707* <LI><B>TABLE_NAME</B> String {@code =>} table name1708* <LI><B>COLUMN_NAME</B> String {@code =>} column name1709* <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>)1710* <LI><B>GRANTEE</B> String {@code =>} grantee of access1711* <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,1712* INSERT, UPDATE, REFRENCES, ...)1713* <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted1714* to grant to others; "NO" if not; <code>null</code> if unknown1715* </OL>1716*1717* @param catalog a catalog name; must match the catalog name as it1718* is stored in the database; "" retrieves those without a catalog;1719* <code>null</code> means that the catalog name should not be used to narrow1720* the search1721* @param schema a schema name; must match the schema name as it is1722* stored in the database; "" retrieves those without a schema;1723* <code>null</code> means that the schema name should not be used to narrow1724* the search1725* @param table a table name; must match the table name as it is1726* stored in the database1727* @param columnNamePattern a column name pattern; must match the column1728* name as it is stored in the database1729* @return <code>ResultSet</code> - each row is a column privilege description1730* @exception SQLException if a database access error occurs1731* @see #getSearchStringEscape1732*/1733ResultSet getColumnPrivileges(String catalog, String schema,1734String table, String columnNamePattern) throws SQLException;17351736/**1737* Retrieves a description of the access rights for each table available1738* in a catalog. Note that a table privilege applies to one or1739* more columns in the table. It would be wrong to assume that1740* this privilege applies to all columns (this may be true for1741* some systems but is not true for all.)1742*1743* <P>Only privileges matching the schema and table name1744* criteria are returned. They are ordered by1745* <code>TABLE_CAT</code>,1746* <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>,1747* and <code>PRIVILEGE</code>.1748*1749* <P>Each privilege description has the following columns:1750* <OL>1751* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)1752* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)1753* <LI><B>TABLE_NAME</B> String {@code =>} table name1754* <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>)1755* <LI><B>GRANTEE</B> String {@code =>} grantee of access1756* <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,1757* INSERT, UPDATE, REFRENCES, ...)1758* <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted1759* to grant to others; "NO" if not; <code>null</code> if unknown1760* </OL>1761*1762* @param catalog a catalog name; must match the catalog name as it1763* is stored in the database; "" retrieves those without a catalog;1764* <code>null</code> means that the catalog name should not be used to narrow1765* the search1766* @param schemaPattern a schema name pattern; must match the schema name1767* as it is stored in the database; "" retrieves those without a schema;1768* <code>null</code> means that the schema name should not be used to narrow1769* the search1770* @param tableNamePattern a table name pattern; must match the1771* table name as it is stored in the database1772* @return <code>ResultSet</code> - each row is a table privilege description1773* @exception SQLException if a database access error occurs1774* @see #getSearchStringEscape1775*/1776ResultSet getTablePrivileges(String catalog, String schemaPattern,1777String tableNamePattern) throws SQLException;17781779/**1780* Retrieves a description of a table's optimal set of columns that1781* uniquely identifies a row. They are ordered by SCOPE.1782*1783* <P>Each column description has the following columns:1784* <OL>1785* <LI><B>SCOPE</B> short {@code =>} actual scope of result1786* <UL>1787* <LI> bestRowTemporary - very temporary, while using row1788* <LI> bestRowTransaction - valid for remainder of current transaction1789* <LI> bestRowSession - valid for remainder of current session1790* </UL>1791* <LI><B>COLUMN_NAME</B> String {@code =>} column name1792* <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from java.sql.Types1793* <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name,1794* for a UDT the type name is fully qualified1795* <LI><B>COLUMN_SIZE</B> int {@code =>} precision1796* <LI><B>BUFFER_LENGTH</B> int {@code =>} not used1797* <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where1798* DECIMAL_DIGITS is not applicable.1799* <LI><B>PSEUDO_COLUMN</B> short {@code =>} is this a pseudo column1800* like an Oracle ROWID1801* <UL>1802* <LI> bestRowUnknown - may or may not be pseudo column1803* <LI> bestRowNotPseudo - is NOT a pseudo column1804* <LI> bestRowPseudo - is a pseudo column1805* </UL>1806* </OL>1807*1808* <p>The COLUMN_SIZE column represents the specified column size for the given column.1809* For numeric data, this is the maximum precision. For character data, this is the length in characters.1810* For datetime datatypes, this is the length in characters of the String representation (assuming the1811* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1812* this is the length in bytes. Null is returned for data types where the1813* column size is not applicable.1814*1815* @param catalog a catalog name; must match the catalog name as it1816* is stored in the database; "" retrieves those without a catalog;1817* <code>null</code> means that the catalog name should not be used to narrow1818* the search1819* @param schema a schema name; must match the schema name1820* as it is stored in the database; "" retrieves those without a schema;1821* <code>null</code> means that the schema name should not be used to narrow1822* the search1823* @param table a table name; must match the table name as it is stored1824* in the database1825* @param scope the scope of interest; use same values as SCOPE1826* @param nullable include columns that are nullable.1827* @return <code>ResultSet</code> - each row is a column description1828* @exception SQLException if a database access error occurs1829*/1830ResultSet getBestRowIdentifier(String catalog, String schema,1831String table, int scope, boolean nullable) throws SQLException;18321833/**1834* Indicates that the scope of the best row identifier is1835* very temporary, lasting only while the1836* row is being used.1837* <P>1838* A possible value for the column1839* <code>SCOPE</code>1840* in the <code>ResultSet</code> object1841* returned by the method <code>getBestRowIdentifier</code>.1842*/1843int bestRowTemporary = 0;18441845/**1846* Indicates that the scope of the best row identifier is1847* the remainder of the current transaction.1848* <P>1849* A possible value for the column1850* <code>SCOPE</code>1851* in the <code>ResultSet</code> object1852* returned by the method <code>getBestRowIdentifier</code>.1853*/1854int bestRowTransaction = 1;18551856/**1857* Indicates that the scope of the best row identifier is1858* the remainder of the current session.1859* <P>1860* A possible value for the column1861* <code>SCOPE</code>1862* in the <code>ResultSet</code> object1863* returned by the method <code>getBestRowIdentifier</code>.1864*/1865int bestRowSession = 2;18661867/**1868* Indicates that the best row identifier may or may not be a pseudo column.1869* <P>1870* A possible value for the column1871* <code>PSEUDO_COLUMN</code>1872* in the <code>ResultSet</code> object1873* returned by the method <code>getBestRowIdentifier</code>.1874*/1875int bestRowUnknown = 0;18761877/**1878* Indicates that the best row identifier is NOT a pseudo column.1879* <P>1880* A possible value for the column1881* <code>PSEUDO_COLUMN</code>1882* in the <code>ResultSet</code> object1883* returned by the method <code>getBestRowIdentifier</code>.1884*/1885int bestRowNotPseudo = 1;18861887/**1888* Indicates that the best row identifier is a pseudo column.1889* <P>1890* A possible value for the column1891* <code>PSEUDO_COLUMN</code>1892* in the <code>ResultSet</code> object1893* returned by the method <code>getBestRowIdentifier</code>.1894*/1895int bestRowPseudo = 2;18961897/**1898* Retrieves a description of a table's columns that are automatically1899* updated when any value in a row is updated. They are1900* unordered.1901*1902* <P>Each column description has the following columns:1903* <OL>1904* <LI><B>SCOPE</B> short {@code =>} is not used1905* <LI><B>COLUMN_NAME</B> String {@code =>} column name1906* <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from <code>java.sql.Types</code>1907* <LI><B>TYPE_NAME</B> String {@code =>} Data source-dependent type name1908* <LI><B>COLUMN_SIZE</B> int {@code =>} precision1909* <LI><B>BUFFER_LENGTH</B> int {@code =>} length of column value in bytes1910* <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where1911* DECIMAL_DIGITS is not applicable.1912* <LI><B>PSEUDO_COLUMN</B> short {@code =>} whether this is pseudo column1913* like an Oracle ROWID1914* <UL>1915* <LI> versionColumnUnknown - may or may not be pseudo column1916* <LI> versionColumnNotPseudo - is NOT a pseudo column1917* <LI> versionColumnPseudo - is a pseudo column1918* </UL>1919* </OL>1920*1921* <p>The COLUMN_SIZE column represents the specified column size for the given column.1922* For numeric data, this is the maximum precision. For character data, this is the length in characters.1923* For datetime datatypes, this is the length in characters of the String representation (assuming the1924* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1925* this is the length in bytes. Null is returned for data types where the1926* column size is not applicable.1927* @param catalog a catalog name; must match the catalog name as it1928* is stored in the database; "" retrieves those without a catalog;1929* <code>null</code> means that the catalog name should not be used to narrow1930* the search1931* @param schema a schema name; must match the schema name1932* as it is stored in the database; "" retrieves those without a schema;1933* <code>null</code> means that the schema name should not be used to narrow1934* the search1935* @param table a table name; must match the table name as it is stored1936* in the database1937* @return a <code>ResultSet</code> object in which each row is a1938* column description1939* @exception SQLException if a database access error occurs1940*/1941ResultSet getVersionColumns(String catalog, String schema,1942String table) throws SQLException;19431944/**1945* Indicates that this version column may or may not be a pseudo column.1946* <P>1947* A possible value for the column1948* <code>PSEUDO_COLUMN</code>1949* in the <code>ResultSet</code> object1950* returned by the method <code>getVersionColumns</code>.1951*/1952int versionColumnUnknown = 0;19531954/**1955* Indicates that this version column is NOT a pseudo column.1956* <P>1957* A possible value for the column1958* <code>PSEUDO_COLUMN</code>1959* in the <code>ResultSet</code> object1960* returned by the method <code>getVersionColumns</code>.1961*/1962int versionColumnNotPseudo = 1;19631964/**1965* Indicates that this version column is a pseudo column.1966* <P>1967* A possible value for the column1968* <code>PSEUDO_COLUMN</code>1969* in the <code>ResultSet</code> object1970* returned by the method <code>getVersionColumns</code>.1971*/1972int versionColumnPseudo = 2;19731974/**1975* Retrieves a description of the given table's primary key columns. They1976* are ordered by COLUMN_NAME.1977*1978* <P>Each primary key column description has the following columns:1979* <OL>1980* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)1981* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)1982* <LI><B>TABLE_NAME</B> String {@code =>} table name1983* <LI><B>COLUMN_NAME</B> String {@code =>} column name1984* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within primary key( a value1985* of 1 represents the first column of the primary key, a value of 2 would1986* represent the second column within the primary key).1987* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>)1988* </OL>1989*1990* @param catalog a catalog name; must match the catalog name as it1991* is stored in the database; "" retrieves those without a catalog;1992* <code>null</code> means that the catalog name should not be used to narrow1993* the search1994* @param schema a schema name; must match the schema name1995* as it is stored in the database; "" retrieves those without a schema;1996* <code>null</code> means that the schema name should not be used to narrow1997* the search1998* @param table a table name; must match the table name as it is stored1999* in the database2000* @return <code>ResultSet</code> - each row is a primary key column description2001* @exception SQLException if a database access error occurs2002*/2003ResultSet getPrimaryKeys(String catalog, String schema,2004String table) throws SQLException;20052006/**2007* Retrieves a description of the primary key columns that are2008* referenced by the given table's foreign key columns (the primary keys2009* imported by a table). They are ordered by PKTABLE_CAT,2010* PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.2011*2012* <P>Each primary key column description has the following columns:2013* <OL>2014* <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog2015* being imported (may be <code>null</code>)2016* <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema2017* being imported (may be <code>null</code>)2018* <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name2019* being imported2020* <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name2021* being imported2022* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>)2023* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>)2024* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2025* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2026* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within a foreign key( a value2027* of 1 represents the first column of the foreign key, a value of 2 would2028* represent the second column within the foreign key).2029* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to a2030* foreign key when the primary key is updated:2031* <UL>2032* <LI> importedNoAction - do not allow update of primary2033* key if it has been imported2034* <LI> importedKeyCascade - change imported key to agree2035* with primary key update2036* <LI> importedKeySetNull - change imported key to <code>NULL</code>2037* if its primary key has been updated2038* <LI> importedKeySetDefault - change imported key to default values2039* if its primary key has been updated2040* <LI> importedKeyRestrict - same as importedKeyNoAction2041* (for ODBC 2.x compatibility)2042* </UL>2043* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2044* the foreign key when primary is deleted.2045* <UL>2046* <LI> importedKeyNoAction - do not allow delete of primary2047* key if it has been imported2048* <LI> importedKeyCascade - delete rows that import a deleted key2049* <LI> importedKeySetNull - change imported key to NULL if2050* its primary key has been deleted2051* <LI> importedKeyRestrict - same as importedKeyNoAction2052* (for ODBC 2.x compatibility)2053* <LI> importedKeySetDefault - change imported key to default if2054* its primary key has been deleted2055* </UL>2056* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>)2057* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>)2058* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2059* constraints be deferred until commit2060* <UL>2061* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2062* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2063* <LI> importedKeyNotDeferrable - see SQL92 for definition2064* </UL>2065* </OL>2066*2067* @param catalog a catalog name; must match the catalog name as it2068* is stored in the database; "" retrieves those without a catalog;2069* <code>null</code> means that the catalog name should not be used to narrow2070* the search2071* @param schema a schema name; must match the schema name2072* as it is stored in the database; "" retrieves those without a schema;2073* <code>null</code> means that the schema name should not be used to narrow2074* the search2075* @param table a table name; must match the table name as it is stored2076* in the database2077* @return <code>ResultSet</code> - each row is a primary key column description2078* @exception SQLException if a database access error occurs2079* @see #getExportedKeys2080*/2081ResultSet getImportedKeys(String catalog, String schema,2082String table) throws SQLException;20832084/**2085* For the column <code>UPDATE_RULE</code>,2086* indicates that2087* when the primary key is updated, the foreign key (imported key)2088* is changed to agree with it.2089* For the column <code>DELETE_RULE</code>,2090* it indicates that2091* when the primary key is deleted, rows that imported that key2092* are deleted.2093* <P>2094* A possible value for the columns <code>UPDATE_RULE</code>2095* and <code>DELETE_RULE</code> in the2096* <code>ResultSet</code> objects returned by the methods2097* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2098* and <code>getCrossReference</code>.2099*/2100int importedKeyCascade = 0;21012102/**2103* For the column <code>UPDATE_RULE</code>, indicates that2104* a primary key may not be updated if it has been imported by2105* another table as a foreign key.2106* For the column <code>DELETE_RULE</code>, indicates that2107* a primary key may not be deleted if it has been imported by2108* another table as a foreign key.2109* <P>2110* A possible value for the columns <code>UPDATE_RULE</code>2111* and <code>DELETE_RULE</code> in the2112* <code>ResultSet</code> objects returned by the methods2113* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2114* and <code>getCrossReference</code>.2115*/2116int importedKeyRestrict = 1;21172118/**2119* For the columns <code>UPDATE_RULE</code>2120* and <code>DELETE_RULE</code>, indicates that2121* when the primary key is updated or deleted, the foreign key (imported key)2122* is changed to <code>NULL</code>.2123* <P>2124* A possible value for the columns <code>UPDATE_RULE</code>2125* and <code>DELETE_RULE</code> in the2126* <code>ResultSet</code> objects returned by the methods2127* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2128* and <code>getCrossReference</code>.2129*/2130int importedKeySetNull = 2;21312132/**2133* For the columns <code>UPDATE_RULE</code>2134* and <code>DELETE_RULE</code>, indicates that2135* if the primary key has been imported, it cannot be updated or deleted.2136* <P>2137* A possible value for the columns <code>UPDATE_RULE</code>2138* and <code>DELETE_RULE</code> in the2139* <code>ResultSet</code> objects returned by the methods2140* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2141* and <code>getCrossReference</code>.2142*/2143int importedKeyNoAction = 3;21442145/**2146* For the columns <code>UPDATE_RULE</code>2147* and <code>DELETE_RULE</code>, indicates that2148* if the primary key is updated or deleted, the foreign key (imported key)2149* is set to the default value.2150* <P>2151* A possible value for the columns <code>UPDATE_RULE</code>2152* and <code>DELETE_RULE</code> in the2153* <code>ResultSet</code> objects returned by the methods2154* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2155* and <code>getCrossReference</code>.2156*/2157int importedKeySetDefault = 4;21582159/**2160* Indicates deferrability. See SQL-92 for a definition.2161* <P>2162* A possible value for the column <code>DEFERRABILITY</code>2163* in the <code>ResultSet</code> objects returned by the methods2164* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2165* and <code>getCrossReference</code>.2166*/2167int importedKeyInitiallyDeferred = 5;21682169/**2170* Indicates deferrability. See SQL-92 for a definition.2171* <P>2172* A possible value for the column <code>DEFERRABILITY</code>2173* in the <code>ResultSet</code> objects returned by the methods2174* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2175* and <code>getCrossReference</code>.2176*/2177int importedKeyInitiallyImmediate = 6;21782179/**2180* Indicates deferrability. See SQL-92 for a definition.2181* <P>2182* A possible value for the column <code>DEFERRABILITY</code>2183* in the <code>ResultSet</code> objects returned by the methods2184* <code>getImportedKeys</code>, <code>getExportedKeys</code>,2185* and <code>getCrossReference</code>.2186*/2187int importedKeyNotDeferrable = 7;21882189/**2190* Retrieves a description of the foreign key columns that reference the2191* given table's primary key columns (the foreign keys exported by a2192* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,2193* FKTABLE_NAME, and KEY_SEQ.2194*2195* <P>Each foreign key column description has the following columns:2196* <OL>2197* <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog (may be <code>null</code>)2198* <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema (may be <code>null</code>)2199* <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name2200* <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name2201* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>)2202* being exported (may be <code>null</code>)2203* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>)2204* being exported (may be <code>null</code>)2205* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2206* being exported2207* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2208* being exported2209* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value2210* of 1 represents the first column of the foreign key, a value of 2 would2211* represent the second column within the foreign key).2212* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to2213* foreign key when primary is updated:2214* <UL>2215* <LI> importedNoAction - do not allow update of primary2216* key if it has been imported2217* <LI> importedKeyCascade - change imported key to agree2218* with primary key update2219* <LI> importedKeySetNull - change imported key to <code>NULL</code> if2220* its primary key has been updated2221* <LI> importedKeySetDefault - change imported key to default values2222* if its primary key has been updated2223* <LI> importedKeyRestrict - same as importedKeyNoAction2224* (for ODBC 2.x compatibility)2225* </UL>2226* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2227* the foreign key when primary is deleted.2228* <UL>2229* <LI> importedKeyNoAction - do not allow delete of primary2230* key if it has been imported2231* <LI> importedKeyCascade - delete rows that import a deleted key2232* <LI> importedKeySetNull - change imported key to <code>NULL</code> if2233* its primary key has been deleted2234* <LI> importedKeyRestrict - same as importedKeyNoAction2235* (for ODBC 2.x compatibility)2236* <LI> importedKeySetDefault - change imported key to default if2237* its primary key has been deleted2238* </UL>2239* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>)2240* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>)2241* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2242* constraints be deferred until commit2243* <UL>2244* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2245* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2246* <LI> importedKeyNotDeferrable - see SQL92 for definition2247* </UL>2248* </OL>2249*2250* @param catalog a catalog name; must match the catalog name as it2251* is stored in this database; "" retrieves those without a catalog;2252* <code>null</code> means that the catalog name should not be used to narrow2253* the search2254* @param schema a schema name; must match the schema name2255* as it is stored in the database; "" retrieves those without a schema;2256* <code>null</code> means that the schema name should not be used to narrow2257* the search2258* @param table a table name; must match the table name as it is stored2259* in this database2260* @return a <code>ResultSet</code> object in which each row is a2261* foreign key column description2262* @exception SQLException if a database access error occurs2263* @see #getImportedKeys2264*/2265ResultSet getExportedKeys(String catalog, String schema,2266String table) throws SQLException;22672268/**2269* Retrieves a description of the foreign key columns in the given foreign key2270* table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table).2271* The number of columns returned from the parent table must match the number of2272* columns that make up the foreign key. They2273* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and2274* KEY_SEQ.2275*2276* <P>Each foreign key column description has the following columns:2277* <OL>2278* <LI><B>PKTABLE_CAT</B> String {@code =>} parent key table catalog (may be <code>null</code>)2279* <LI><B>PKTABLE_SCHEM</B> String {@code =>} parent key table schema (may be <code>null</code>)2280* <LI><B>PKTABLE_NAME</B> String {@code =>} parent key table name2281* <LI><B>PKCOLUMN_NAME</B> String {@code =>} parent key column name2282* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>)2283* being exported (may be <code>null</code>)2284* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>)2285* being exported (may be <code>null</code>)2286* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2287* being exported2288* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2289* being exported2290* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value2291* of 1 represents the first column of the foreign key, a value of 2 would2292* represent the second column within the foreign key).2293* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to2294* foreign key when parent key is updated:2295* <UL>2296* <LI> importedNoAction - do not allow update of parent2297* key if it has been imported2298* <LI> importedKeyCascade - change imported key to agree2299* with parent key update2300* <LI> importedKeySetNull - change imported key to <code>NULL</code> if2301* its parent key has been updated2302* <LI> importedKeySetDefault - change imported key to default values2303* if its parent key has been updated2304* <LI> importedKeyRestrict - same as importedKeyNoAction2305* (for ODBC 2.x compatibility)2306* </UL>2307* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2308* the foreign key when parent key is deleted.2309* <UL>2310* <LI> importedKeyNoAction - do not allow delete of parent2311* key if it has been imported2312* <LI> importedKeyCascade - delete rows that import a deleted key2313* <LI> importedKeySetNull - change imported key to <code>NULL</code> if2314* its primary key has been deleted2315* <LI> importedKeyRestrict - same as importedKeyNoAction2316* (for ODBC 2.x compatibility)2317* <LI> importedKeySetDefault - change imported key to default if2318* its parent key has been deleted2319* </UL>2320* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>)2321* <LI><B>PK_NAME</B> String {@code =>} parent key name (may be <code>null</code>)2322* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2323* constraints be deferred until commit2324* <UL>2325* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2326* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2327* <LI> importedKeyNotDeferrable - see SQL92 for definition2328* </UL>2329* </OL>2330*2331* @param parentCatalog a catalog name; must match the catalog name2332* as it is stored in the database; "" retrieves those without a2333* catalog; <code>null</code> means drop catalog name from the selection criteria2334* @param parentSchema a schema name; must match the schema name as2335* it is stored in the database; "" retrieves those without a schema;2336* <code>null</code> means drop schema name from the selection criteria2337* @param parentTable the name of the table that exports the key; must match2338* the table name as it is stored in the database2339* @param foreignCatalog a catalog name; must match the catalog name as2340* it is stored in the database; "" retrieves those without a2341* catalog; <code>null</code> means drop catalog name from the selection criteria2342* @param foreignSchema a schema name; must match the schema name as it2343* is stored in the database; "" retrieves those without a schema;2344* <code>null</code> means drop schema name from the selection criteria2345* @param foreignTable the name of the table that imports the key; must match2346* the table name as it is stored in the database2347* @return <code>ResultSet</code> - each row is a foreign key column description2348* @exception SQLException if a database access error occurs2349* @see #getImportedKeys2350*/2351ResultSet getCrossReference(2352String parentCatalog, String parentSchema, String parentTable,2353String foreignCatalog, String foreignSchema, String foreignTable2354) throws SQLException;23552356/**2357* Retrieves a description of all the data types supported by2358* this database. They are ordered by DATA_TYPE and then by how2359* closely the data type maps to the corresponding JDBC SQL type.2360*2361* <P>If the database supports SQL distinct types, then getTypeInfo() will return2362* a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT.2363* If the database supports SQL structured types, then getTypeInfo() will return2364* a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT.2365*2366* <P>If SQL distinct or structured types are supported, then information on the2367* individual types may be obtained from the getUDTs() method.2368*23692370*2371* <P>Each type description has the following columns:2372* <OL>2373* <LI><B>TYPE_NAME</B> String {@code =>} Type name2374* <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from java.sql.Types2375* <LI><B>PRECISION</B> int {@code =>} maximum precision2376* <LI><B>LITERAL_PREFIX</B> String {@code =>} prefix used to quote a literal2377* (may be <code>null</code>)2378* <LI><B>LITERAL_SUFFIX</B> String {@code =>} suffix used to quote a literal2379(may be <code>null</code>)2380* <LI><B>CREATE_PARAMS</B> String {@code =>} parameters used in creating2381* the type (may be <code>null</code>)2382* <LI><B>NULLABLE</B> short {@code =>} can you use NULL for this type.2383* <UL>2384* <LI> typeNoNulls - does not allow NULL values2385* <LI> typeNullable - allows NULL values2386* <LI> typeNullableUnknown - nullability unknown2387* </UL>2388* <LI><B>CASE_SENSITIVE</B> boolean{@code =>} is it case sensitive.2389* <LI><B>SEARCHABLE</B> short {@code =>} can you use "WHERE" based on this type:2390* <UL>2391* <LI> typePredNone - No support2392* <LI> typePredChar - Only supported with WHERE .. LIKE2393* <LI> typePredBasic - Supported except for WHERE .. LIKE2394* <LI> typeSearchable - Supported for all WHERE ..2395* </UL>2396* <LI><B>UNSIGNED_ATTRIBUTE</B> boolean {@code =>} is it unsigned.2397* <LI><B>FIXED_PREC_SCALE</B> boolean {@code =>} can it be a money value.2398* <LI><B>AUTO_INCREMENT</B> boolean {@code =>} can it be used for an2399* auto-increment value.2400* <LI><B>LOCAL_TYPE_NAME</B> String {@code =>} localized version of type name2401* (may be <code>null</code>)2402* <LI><B>MINIMUM_SCALE</B> short {@code =>} minimum scale supported2403* <LI><B>MAXIMUM_SCALE</B> short {@code =>} maximum scale supported2404* <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused2405* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused2406* <LI><B>NUM_PREC_RADIX</B> int {@code =>} usually 2 or 102407* </OL>2408*2409* <p>The PRECISION column represents the maximum column size that the server supports for the given datatype.2410* For numeric data, this is the maximum precision. For character data, this is the length in characters.2411* For datetime datatypes, this is the length in characters of the String representation (assuming the2412* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,2413* this is the length in bytes. Null is returned for data types where the2414* column size is not applicable.2415*2416* @return a <code>ResultSet</code> object in which each row is an SQL2417* type description2418* @exception SQLException if a database access error occurs2419*/2420ResultSet getTypeInfo() throws SQLException;24212422/**2423* Indicates that a <code>NULL</code> value is NOT allowed for this2424* data type.2425* <P>2426* A possible value for column <code>NULLABLE</code> in the2427* <code>ResultSet</code> object returned by the method2428* <code>getTypeInfo</code>.2429*/2430int typeNoNulls = 0;24312432/**2433* Indicates that a <code>NULL</code> value is allowed for this2434* data type.2435* <P>2436* A possible value for column <code>NULLABLE</code> in the2437* <code>ResultSet</code> object returned by the method2438* <code>getTypeInfo</code>.2439*/2440int typeNullable = 1;24412442/**2443* Indicates that it is not known whether a <code>NULL</code> value2444* is allowed for this data type.2445* <P>2446* A possible value for column <code>NULLABLE</code> in the2447* <code>ResultSet</code> object returned by the method2448* <code>getTypeInfo</code>.2449*/2450int typeNullableUnknown = 2;24512452/**2453* Indicates that <code>WHERE</code> search clauses are not supported2454* for this type.2455* <P>2456* A possible value for column <code>SEARCHABLE</code> in the2457* <code>ResultSet</code> object returned by the method2458* <code>getTypeInfo</code>.2459*/2460int typePredNone = 0;24612462/**2463* Indicates that the data type2464* can be only be used in <code>WHERE</code> search clauses2465* that use <code>LIKE</code> predicates.2466* <P>2467* A possible value for column <code>SEARCHABLE</code> in the2468* <code>ResultSet</code> object returned by the method2469* <code>getTypeInfo</code>.2470*/2471int typePredChar = 1;24722473/**2474* Indicates that the data type can be only be used in <code>WHERE</code>2475* search clauses2476* that do not use <code>LIKE</code> predicates.2477* <P>2478* A possible value for column <code>SEARCHABLE</code> in the2479* <code>ResultSet</code> object returned by the method2480* <code>getTypeInfo</code>.2481*/2482int typePredBasic = 2;24832484/**2485* Indicates that all <code>WHERE</code> search clauses can be2486* based on this type.2487* <P>2488* A possible value for column <code>SEARCHABLE</code> in the2489* <code>ResultSet</code> object returned by the method2490* <code>getTypeInfo</code>.2491*/2492int typeSearchable = 3;24932494/**2495* Retrieves a description of the given table's indices and statistics. They are2496* ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.2497*2498* <P>Each index column description has the following columns:2499* <OL>2500* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)2501* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)2502* <LI><B>TABLE_NAME</B> String {@code =>} table name2503* <LI><B>NON_UNIQUE</B> boolean {@code =>} Can index values be non-unique.2504* false when TYPE is tableIndexStatistic2505* <LI><B>INDEX_QUALIFIER</B> String {@code =>} index catalog (may be <code>null</code>);2506* <code>null</code> when TYPE is tableIndexStatistic2507* <LI><B>INDEX_NAME</B> String {@code =>} index name; <code>null</code> when TYPE is2508* tableIndexStatistic2509* <LI><B>TYPE</B> short {@code =>} index type:2510* <UL>2511* <LI> tableIndexStatistic - this identifies table statistics that are2512* returned in conjuction with a table's index descriptions2513* <LI> tableIndexClustered - this is a clustered index2514* <LI> tableIndexHashed - this is a hashed index2515* <LI> tableIndexOther - this is some other style of index2516* </UL>2517* <LI><B>ORDINAL_POSITION</B> short {@code =>} column sequence number2518* within index; zero when TYPE is tableIndexStatistic2519* <LI><B>COLUMN_NAME</B> String {@code =>} column name; <code>null</code> when TYPE is2520* tableIndexStatistic2521* <LI><B>ASC_OR_DESC</B> String {@code =>} column sort sequence, "A" {@code =>} ascending,2522* "D" {@code =>} descending, may be <code>null</code> if sort sequence is not supported;2523* <code>null</code> when TYPE is tableIndexStatistic2524* <LI><B>CARDINALITY</B> long {@code =>} When TYPE is tableIndexStatistic, then2525* this is the number of rows in the table; otherwise, it is the2526* number of unique values in the index.2527* <LI><B>PAGES</B> long {@code =>} When TYPE is tableIndexStatisic then2528* this is the number of pages used for the table, otherwise it2529* is the number of pages used for the current index.2530* <LI><B>FILTER_CONDITION</B> String {@code =>} Filter condition, if any.2531* (may be <code>null</code>)2532* </OL>2533*2534* @param catalog a catalog name; must match the catalog name as it2535* is stored in this database; "" retrieves those without a catalog;2536* <code>null</code> means that the catalog name should not be used to narrow2537* the search2538* @param schema a schema name; must match the schema name2539* as it is stored in this database; "" retrieves those without a schema;2540* <code>null</code> means that the schema name should not be used to narrow2541* the search2542* @param table a table name; must match the table name as it is stored2543* in this database2544* @param unique when true, return only indices for unique values;2545* when false, return indices regardless of whether unique or not2546* @param approximate when true, result is allowed to reflect approximate2547* or out of data values; when false, results are requested to be2548* accurate2549* @return <code>ResultSet</code> - each row is an index column description2550* @exception SQLException if a database access error occurs2551*/2552ResultSet getIndexInfo(String catalog, String schema, String table,2553boolean unique, boolean approximate)2554throws SQLException;25552556/**2557* Indicates that this column contains table statistics that2558* are returned in conjunction with a table's index descriptions.2559* <P>2560* A possible value for column <code>TYPE</code> in the2561* <code>ResultSet</code> object returned by the method2562* <code>getIndexInfo</code>.2563*/2564short tableIndexStatistic = 0;25652566/**2567* Indicates that this table index is a clustered index.2568* <P>2569* A possible value for column <code>TYPE</code> in the2570* <code>ResultSet</code> object returned by the method2571* <code>getIndexInfo</code>.2572*/2573short tableIndexClustered = 1;25742575/**2576* Indicates that this table index is a hashed index.2577* <P>2578* A possible value for column <code>TYPE</code> in the2579* <code>ResultSet</code> object returned by the method2580* <code>getIndexInfo</code>.2581*/2582short tableIndexHashed = 2;25832584/**2585* Indicates that this table index is not a clustered2586* index, a hashed index, or table statistics;2587* it is something other than these.2588* <P>2589* A possible value for column <code>TYPE</code> in the2590* <code>ResultSet</code> object returned by the method2591* <code>getIndexInfo</code>.2592*/2593short tableIndexOther = 3;25942595//--------------------------JDBC 2.0-----------------------------25962597/**2598* Retrieves whether this database supports the given result set type.2599*2600* @param type defined in <code>java.sql.ResultSet</code>2601* @return <code>true</code> if so; <code>false</code> otherwise2602* @exception SQLException if a database access error occurs2603* @see Connection2604* @since 1.22605*/2606boolean supportsResultSetType(int type) throws SQLException;26072608/**2609* Retrieves whether this database supports the given concurrency type2610* in combination with the given result set type.2611*2612* @param type defined in <code>java.sql.ResultSet</code>2613* @param concurrency type defined in <code>java.sql.ResultSet</code>2614* @return <code>true</code> if so; <code>false</code> otherwise2615* @exception SQLException if a database access error occurs2616* @see Connection2617* @since 1.22618*/2619boolean supportsResultSetConcurrency(int type, int concurrency)2620throws SQLException;26212622/**2623*2624* Retrieves whether for the given type of <code>ResultSet</code> object,2625* the result set's own updates are visible.2626*2627* @param type the <code>ResultSet</code> type; one of2628* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2629* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2630* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2631* @return <code>true</code> if updates are visible for the given result set type;2632* <code>false</code> otherwise2633* @exception SQLException if a database access error occurs2634* @since 1.22635*/2636boolean ownUpdatesAreVisible(int type) throws SQLException;26372638/**2639* Retrieves whether a result set's own deletes are visible.2640*2641* @param type the <code>ResultSet</code> type; one of2642* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2643* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2644* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2645* @return <code>true</code> if deletes are visible for the given result set type;2646* <code>false</code> otherwise2647* @exception SQLException if a database access error occurs2648* @since 1.22649*/2650boolean ownDeletesAreVisible(int type) throws SQLException;26512652/**2653* Retrieves whether a result set's own inserts are visible.2654*2655* @param type the <code>ResultSet</code> type; one of2656* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2657* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2658* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2659* @return <code>true</code> if inserts are visible for the given result set type;2660* <code>false</code> otherwise2661* @exception SQLException if a database access error occurs2662* @since 1.22663*/2664boolean ownInsertsAreVisible(int type) throws SQLException;26652666/**2667* Retrieves whether updates made by others are visible.2668*2669* @param type the <code>ResultSet</code> type; one of2670* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2671* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2672* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2673* @return <code>true</code> if updates made by others2674* are visible for the given result set type;2675* <code>false</code> otherwise2676* @exception SQLException if a database access error occurs2677* @since 1.22678*/2679boolean othersUpdatesAreVisible(int type) throws SQLException;26802681/**2682* Retrieves whether deletes made by others are visible.2683*2684* @param type the <code>ResultSet</code> type; one of2685* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2686* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2687* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2688* @return <code>true</code> if deletes made by others2689* are visible for the given result set type;2690* <code>false</code> otherwise2691* @exception SQLException if a database access error occurs2692* @since 1.22693*/2694boolean othersDeletesAreVisible(int type) throws SQLException;26952696/**2697* Retrieves whether inserts made by others are visible.2698*2699* @param type the <code>ResultSet</code> type; one of2700* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2701* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2702* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2703* @return <code>true</code> if inserts made by others2704* are visible for the given result set type;2705* <code>false</code> otherwise2706* @exception SQLException if a database access error occurs2707* @since 1.22708*/2709boolean othersInsertsAreVisible(int type) throws SQLException;27102711/**2712* Retrieves whether or not a visible row update can be detected by2713* calling the method <code>ResultSet.rowUpdated</code>.2714*2715* @param type the <code>ResultSet</code> type; one of2716* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2717* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2718* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2719* @return <code>true</code> if changes are detected by the result set type;2720* <code>false</code> otherwise2721* @exception SQLException if a database access error occurs2722* @since 1.22723*/2724boolean updatesAreDetected(int type) throws SQLException;27252726/**2727* Retrieves whether or not a visible row delete can be detected by2728* calling the method <code>ResultSet.rowDeleted</code>. If the method2729* <code>deletesAreDetected</code> returns <code>false</code>, it means that2730* deleted rows are removed from the result set.2731*2732* @param type the <code>ResultSet</code> type; one of2733* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2734* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2735* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2736* @return <code>true</code> if deletes are detected by the given result set type;2737* <code>false</code> otherwise2738* @exception SQLException if a database access error occurs2739* @since 1.22740*/2741boolean deletesAreDetected(int type) throws SQLException;27422743/**2744* Retrieves whether or not a visible row insert can be detected2745* by calling the method <code>ResultSet.rowInserted</code>.2746*2747* @param type the <code>ResultSet</code> type; one of2748* <code>ResultSet.TYPE_FORWARD_ONLY</code>,2749* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or2750* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>2751* @return <code>true</code> if changes are detected by the specified result2752* set type; <code>false</code> otherwise2753* @exception SQLException if a database access error occurs2754* @since 1.22755*/2756boolean insertsAreDetected(int type) throws SQLException;27572758/**2759* Retrieves whether this database supports batch updates.2760*2761* @return <code>true</code> if this database supports batch updates;2762* <code>false</code> otherwise2763* @exception SQLException if a database access error occurs2764* @since 1.22765*/2766boolean supportsBatchUpdates() throws SQLException;27672768/**2769* Retrieves a description of the user-defined types (UDTs) defined2770* in a particular schema. Schema-specific UDTs may have type2771* <code>JAVA_OBJECT</code>, <code>STRUCT</code>,2772* or <code>DISTINCT</code>.2773*2774* <P>Only types matching the catalog, schema, type name and type2775* criteria are returned. They are ordered by <code>DATA_TYPE</code>,2776* <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code> and2777* <code>TYPE_NAME</code>. The type name parameter may be a fully-qualified2778* name. In this case, the catalog and schemaPattern parameters are2779* ignored.2780*2781* <P>Each type description has the following columns:2782* <OL>2783* <LI><B>TYPE_CAT</B> String {@code =>} the type's catalog (may be <code>null</code>)2784* <LI><B>TYPE_SCHEM</B> String {@code =>} type's schema (may be <code>null</code>)2785* <LI><B>TYPE_NAME</B> String {@code =>} type name2786* <LI><B>CLASS_NAME</B> String {@code =>} Java class name2787* <LI><B>DATA_TYPE</B> int {@code =>} type value defined in java.sql.Types.2788* One of JAVA_OBJECT, STRUCT, or DISTINCT2789* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the type2790* <LI><B>BASE_TYPE</B> short {@code =>} type code of the source type of a2791* DISTINCT type or the type that implements the user-generated2792* reference type of the SELF_REFERENCING_COLUMN of a structured2793* type as defined in java.sql.Types (<code>null</code> if DATA_TYPE is not2794* DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)2795* </OL>2796*2797* <P><B>Note:</B> If the driver does not support UDTs, an empty2798* result set is returned.2799*2800* @param catalog a catalog name; must match the catalog name as it2801* is stored in the database; "" retrieves those without a catalog;2802* <code>null</code> means that the catalog name should not be used to narrow2803* the search2804* @param schemaPattern a schema pattern name; must match the schema name2805* as it is stored in the database; "" retrieves those without a schema;2806* <code>null</code> means that the schema name should not be used to narrow2807* the search2808* @param typeNamePattern a type name pattern; must match the type name2809* as it is stored in the database; may be a fully qualified name2810* @param types a list of user-defined types (JAVA_OBJECT,2811* STRUCT, or DISTINCT) to include; <code>null</code> returns all types2812* @return <code>ResultSet</code> object in which each row describes a UDT2813* @exception SQLException if a database access error occurs2814* @see #getSearchStringEscape2815* @since 1.22816*/2817ResultSet getUDTs(String catalog, String schemaPattern,2818String typeNamePattern, int[] types)2819throws SQLException;28202821/**2822* Retrieves the connection that produced this metadata object.2823* <P>2824* @return the connection that produced this metadata object2825* @exception SQLException if a database access error occurs2826* @since 1.22827*/2828Connection getConnection() throws SQLException;28292830// ------------------- JDBC 3.0 -------------------------28312832/**2833* Retrieves whether this database supports savepoints.2834*2835* @return <code>true</code> if savepoints are supported;2836* <code>false</code> otherwise2837* @exception SQLException if a database access error occurs2838* @since 1.42839*/2840boolean supportsSavepoints() throws SQLException;28412842/**2843* Retrieves whether this database supports named parameters to callable2844* statements.2845*2846* @return <code>true</code> if named parameters are supported;2847* <code>false</code> otherwise2848* @exception SQLException if a database access error occurs2849* @since 1.42850*/2851boolean supportsNamedParameters() throws SQLException;28522853/**2854* Retrieves whether it is possible to have multiple <code>ResultSet</code> objects2855* returned from a <code>CallableStatement</code> object2856* simultaneously.2857*2858* @return <code>true</code> if a <code>CallableStatement</code> object2859* can return multiple <code>ResultSet</code> objects2860* simultaneously; <code>false</code> otherwise2861* @exception SQLException if a datanase access error occurs2862* @since 1.42863*/2864boolean supportsMultipleOpenResults() throws SQLException;28652866/**2867* Retrieves whether auto-generated keys can be retrieved after2868* a statement has been executed2869*2870* @return <code>true</code> if auto-generated keys can be retrieved2871* after a statement has executed; <code>false</code> otherwise2872*<p>If <code>true</code> is returned, the JDBC driver must support the2873* returning of auto-generated keys for at least SQL INSERT statements2874*<p>2875* @exception SQLException if a database access error occurs2876* @since 1.42877*/2878boolean supportsGetGeneratedKeys() throws SQLException;28792880/**2881* Retrieves a description of the user-defined type (UDT) hierarchies defined in a2882* particular schema in this database. Only the immediate super type/2883* sub type relationship is modeled.2884* <P>2885* Only supertype information for UDTs matching the catalog,2886* schema, and type name is returned. The type name parameter2887* may be a fully-qualified name. When the UDT name supplied is a2888* fully-qualified name, the catalog and schemaPattern parameters are2889* ignored.2890* <P>2891* If a UDT does not have a direct super type, it is not listed here.2892* A row of the <code>ResultSet</code> object returned by this method2893* describes the designated UDT and a direct supertype. A row has the following2894* columns:2895* <OL>2896* <LI><B>TYPE_CAT</B> String {@code =>} the UDT's catalog (may be <code>null</code>)2897* <LI><B>TYPE_SCHEM</B> String {@code =>} UDT's schema (may be <code>null</code>)2898* <LI><B>TYPE_NAME</B> String {@code =>} type name of the UDT2899* <LI><B>SUPERTYPE_CAT</B> String {@code =>} the direct super type's catalog2900* (may be <code>null</code>)2901* <LI><B>SUPERTYPE_SCHEM</B> String {@code =>} the direct super type's schema2902* (may be <code>null</code>)2903* <LI><B>SUPERTYPE_NAME</B> String {@code =>} the direct super type's name2904* </OL>2905*2906* <P><B>Note:</B> If the driver does not support type hierarchies, an2907* empty result set is returned.2908*2909* @param catalog a catalog name; "" retrieves those without a catalog;2910* <code>null</code> means drop catalog name from the selection criteria2911* @param schemaPattern a schema name pattern; "" retrieves those2912* without a schema2913* @param typeNamePattern a UDT name pattern; may be a fully-qualified2914* name2915* @return a <code>ResultSet</code> object in which a row gives information2916* about the designated UDT2917* @throws SQLException if a database access error occurs2918* @see #getSearchStringEscape2919* @since 1.42920*/2921ResultSet getSuperTypes(String catalog, String schemaPattern,2922String typeNamePattern) throws SQLException;29232924/**2925* Retrieves a description of the table hierarchies defined in a particular2926* schema in this database.2927*2928* <P>Only supertable information for tables matching the catalog, schema2929* and table name are returned. The table name parameter may be a fully-2930* qualified name, in which case, the catalog and schemaPattern parameters2931* are ignored. If a table does not have a super table, it is not listed here.2932* Supertables have to be defined in the same catalog and schema as the2933* sub tables. Therefore, the type description does not need to include2934* this information for the supertable.2935*2936* <P>Each type description has the following columns:2937* <OL>2938* <LI><B>TABLE_CAT</B> String {@code =>} the type's catalog (may be <code>null</code>)2939* <LI><B>TABLE_SCHEM</B> String {@code =>} type's schema (may be <code>null</code>)2940* <LI><B>TABLE_NAME</B> String {@code =>} type name2941* <LI><B>SUPERTABLE_NAME</B> String {@code =>} the direct super type's name2942* </OL>2943*2944* <P><B>Note:</B> If the driver does not support type hierarchies, an2945* empty result set is returned.2946*2947* @param catalog a catalog name; "" retrieves those without a catalog;2948* <code>null</code> means drop catalog name from the selection criteria2949* @param schemaPattern a schema name pattern; "" retrieves those2950* without a schema2951* @param tableNamePattern a table name pattern; may be a fully-qualified2952* name2953* @return a <code>ResultSet</code> object in which each row is a type description2954* @throws SQLException if a database access error occurs2955* @see #getSearchStringEscape2956* @since 1.42957*/2958ResultSet getSuperTables(String catalog, String schemaPattern,2959String tableNamePattern) throws SQLException;29602961/**2962* Indicates that <code>NULL</code> values might not be allowed.2963* <P>2964* A possible value for the column2965* <code>NULLABLE</code> in the <code>ResultSet</code> object2966* returned by the method <code>getAttributes</code>.2967*/2968short attributeNoNulls = 0;29692970/**2971* Indicates that <code>NULL</code> values are definitely allowed.2972* <P>2973* A possible value for the column <code>NULLABLE</code>2974* in the <code>ResultSet</code> object2975* returned by the method <code>getAttributes</code>.2976*/2977short attributeNullable = 1;29782979/**2980* Indicates that whether <code>NULL</code> values are allowed is not2981* known.2982* <P>2983* A possible value for the column <code>NULLABLE</code>2984* in the <code>ResultSet</code> object2985* returned by the method <code>getAttributes</code>.2986*/2987short attributeNullableUnknown = 2;29882989/**2990* Retrieves a description of the given attribute of the given type2991* for a user-defined type (UDT) that is available in the given schema2992* and catalog.2993* <P>2994* Descriptions are returned only for attributes of UDTs matching the2995* catalog, schema, type, and attribute name criteria. They are ordered by2996* <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code>,2997* <code>TYPE_NAME</code> and <code>ORDINAL_POSITION</code>. This description2998* does not contain inherited attributes.2999* <P>3000* The <code>ResultSet</code> object that is returned has the following3001* columns:3002* <OL>3003* <LI><B>TYPE_CAT</B> String {@code =>} type catalog (may be <code>null</code>)3004* <LI><B>TYPE_SCHEM</B> String {@code =>} type schema (may be <code>null</code>)3005* <LI><B>TYPE_NAME</B> String {@code =>} type name3006* <LI><B>ATTR_NAME</B> String {@code =>} attribute name3007* <LI><B>DATA_TYPE</B> int {@code =>} attribute type SQL type from java.sql.Types3008* <LI><B>ATTR_TYPE_NAME</B> String {@code =>} Data source dependent type name.3009* For a UDT, the type name is fully qualified. For a REF, the type name is3010* fully qualified and represents the target type of the reference type.3011* <LI><B>ATTR_SIZE</B> int {@code =>} column size. For char or date3012* types this is the maximum number of characters; for numeric or3013* decimal types this is precision.3014* <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where3015* DECIMAL_DIGITS is not applicable.3016* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)3017* <LI><B>NULLABLE</B> int {@code =>} whether NULL is allowed3018* <UL>3019* <LI> attributeNoNulls - might not allow NULL values3020* <LI> attributeNullable - definitely allows NULL values3021* <LI> attributeNullableUnknown - nullability unknown3022* </UL>3023* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>)3024* <LI><B>ATTR_DEF</B> String {@code =>} default value (may be <code>null</code>)3025* <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused3026* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused3027* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the3028* maximum number of bytes in the column3029* <LI><B>ORDINAL_POSITION</B> int {@code =>} index of the attribute in the UDT3030* (starting at 1)3031* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine3032* the nullability for a attribute.3033* <UL>3034* <LI> YES --- if the attribute can include NULLs3035* <LI> NO --- if the attribute cannot include NULLs3036* <LI> empty string --- if the nullability for the3037* attribute is unknown3038* </UL>3039* <LI><B>SCOPE_CATALOG</B> String {@code =>} catalog of table that is the3040* scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)3041* <LI><B>SCOPE_SCHEMA</B> String {@code =>} schema of table that is the3042* scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)3043* <LI><B>SCOPE_TABLE</B> String {@code =>} table name that is the scope of a3044* reference attribute (<code>null</code> if the DATA_TYPE isn't REF)3045* <LI><B>SOURCE_DATA_TYPE</B> short {@code =>} source type of a distinct type or user-generated3046* Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE3047* isn't DISTINCT or user-generated REF)3048* </OL>3049* @param catalog a catalog name; must match the catalog name as it3050* is stored in the database; "" retrieves those without a catalog;3051* <code>null</code> means that the catalog name should not be used to narrow3052* the search3053* @param schemaPattern a schema name pattern; must match the schema name3054* as it is stored in the database; "" retrieves those without a schema;3055* <code>null</code> means that the schema name should not be used to narrow3056* the search3057* @param typeNamePattern a type name pattern; must match the3058* type name as it is stored in the database3059* @param attributeNamePattern an attribute name pattern; must match the attribute3060* name as it is declared in the database3061* @return a <code>ResultSet</code> object in which each row is an3062* attribute description3063* @exception SQLException if a database access error occurs3064* @see #getSearchStringEscape3065* @since 1.43066*/3067ResultSet getAttributes(String catalog, String schemaPattern,3068String typeNamePattern, String attributeNamePattern)3069throws SQLException;30703071/**3072* Retrieves whether this database supports the given result set holdability.3073*3074* @param holdability one of the following constants:3075* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or3076* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>3077* @return <code>true</code> if so; <code>false</code> otherwise3078* @exception SQLException if a database access error occurs3079* @see Connection3080* @since 1.43081*/3082boolean supportsResultSetHoldability(int holdability) throws SQLException;30833084/**3085* Retrieves this database's default holdability for <code>ResultSet</code>3086* objects.3087*3088* @return the default holdability; either3089* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or3090* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>3091* @exception SQLException if a database access error occurs3092* @since 1.43093*/3094int getResultSetHoldability() throws SQLException;30953096/**3097* Retrieves the major version number of the underlying database.3098*3099* @return the underlying database's major version3100* @exception SQLException if a database access error occurs3101* @since 1.43102*/3103int getDatabaseMajorVersion() throws SQLException;31043105/**3106* Retrieves the minor version number of the underlying database.3107*3108* @return underlying database's minor version3109* @exception SQLException if a database access error occurs3110* @since 1.43111*/3112int getDatabaseMinorVersion() throws SQLException;31133114/**3115* Retrieves the major JDBC version number for this3116* driver.3117*3118* @return JDBC version major number3119* @exception SQLException if a database access error occurs3120* @since 1.43121*/3122int getJDBCMajorVersion() throws SQLException;31233124/**3125* Retrieves the minor JDBC version number for this3126* driver.3127*3128* @return JDBC version minor number3129* @exception SQLException if a database access error occurs3130* @since 1.43131*/3132int getJDBCMinorVersion() throws SQLException;31333134/**3135* A possible return value for the method3136* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate3137* whether the value returned by the method3138* <code>SQLException.getSQLState</code> is an3139* X/Open (now know as Open Group) SQL CLI SQLSTATE value.3140* <P>3141* @since 1.43142*/3143int sqlStateXOpen = 1;31443145/**3146* A possible return value for the method3147* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate3148* whether the value returned by the method3149* <code>SQLException.getSQLState</code> is an SQLSTATE value.3150* <P>3151* @since 1.63152*/3153int sqlStateSQL = 2;31543155/**3156* A possible return value for the method3157* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate3158* whether the value returned by the method3159* <code>SQLException.getSQLState</code> is an SQL99 SQLSTATE value.3160* <P>3161* <b>Note:</b>This constant remains only for compatibility reasons. Developers3162* should use the constant <code>sqlStateSQL</code> instead.3163*3164* @since 1.43165*/3166int sqlStateSQL99 = sqlStateSQL;31673168/**3169* Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code>3170* is X/Open (now known as Open Group) SQL CLI or SQL:2003.3171* @return the type of SQLSTATE; one of:3172* sqlStateXOpen or3173* sqlStateSQL3174* @throws SQLException if a database access error occurs3175* @since 1.43176*/3177int getSQLStateType() throws SQLException;31783179/**3180* Indicates whether updates made to a LOB are made on a copy or directly3181* to the LOB.3182* @return <code>true</code> if updates are made to a copy of the LOB;3183* <code>false</code> if updates are made directly to the LOB3184* @throws SQLException if a database access error occurs3185* @since 1.43186*/3187boolean locatorsUpdateCopy() throws SQLException;31883189/**3190* Retrieves whether this database supports statement pooling.3191*3192* @return <code>true</code> if so; <code>false</code> otherwise3193* @throws SQLException if a database access error occurs3194* @since 1.43195*/3196boolean supportsStatementPooling() throws SQLException;31973198//------------------------- JDBC 4.0 -----------------------------------31993200/**3201* Indicates whether or not this data source supports the SQL <code>ROWID</code> type,3202* and if so the lifetime for which a <code>RowId</code> object remains valid.3203* <p>3204* The returned int values have the following relationship:3205* <pre>{@code3206* ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION3207* < ROWID_VALID_SESSION < ROWID_VALID_FOREVER3208* }</pre>3209* so conditional logic such as3210* <pre>{@code3211* if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)3212* }</pre>3213* can be used. Valid Forever means valid across all Sessions, and valid for3214* a Session means valid across all its contained Transactions.3215*3216* @return the status indicating the lifetime of a <code>RowId</code>3217* @throws SQLException if a database access error occurs3218* @since 1.63219*/3220RowIdLifetime getRowIdLifetime() throws SQLException;32213222/**3223* Retrieves the schema names available in this database. The results3224* are ordered by <code>TABLE_CATALOG</code> and3225* <code>TABLE_SCHEM</code>.3226*3227* <P>The schema columns are:3228* <OL>3229* <LI><B>TABLE_SCHEM</B> String {@code =>} schema name3230* <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be <code>null</code>)3231* </OL>3232*3233*3234* @param catalog a catalog name; must match the catalog name as it is stored3235* in the database;"" retrieves those without a catalog; null means catalog3236* name should not be used to narrow down the search.3237* @param schemaPattern a schema name; must match the schema name as it is3238* stored in the database; null means3239* schema name should not be used to narrow down the search.3240* @return a <code>ResultSet</code> object in which each row is a3241* schema description3242* @exception SQLException if a database access error occurs3243* @see #getSearchStringEscape3244* @since 1.63245*/3246ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException;32473248/**3249* Retrieves whether this database supports invoking user-defined or vendor functions3250* using the stored procedure escape syntax.3251*3252* @return <code>true</code> if so; <code>false</code> otherwise3253* @exception SQLException if a database access error occurs3254* @since 1.63255*/3256boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException;32573258/**3259* Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> indicates3260* that all open ResultSets are closed, even ones that are holdable. When a <code>SQLException</code> occurs while3261* autocommit is <code>true</code>, it is vendor specific whether the JDBC driver responds with a commit operation, a3262* rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference3263* is in whether or not holdable ResultSets are closed.3264*3265* @return <code>true</code> if so; <code>false</code> otherwise3266* @exception SQLException if a database access error occurs3267* @since 1.63268*/3269boolean autoCommitFailureClosesAllResultSets() throws SQLException;3270/**3271* Retrieves a list of the client info properties3272* that the driver supports. The result set contains the following columns3273*3274* <ol>3275* <li><b>NAME</b> String{@code =>} The name of the client info property<br>3276* <li><b>MAX_LEN</b> int{@code =>} The maximum length of the value for the property<br>3277* <li><b>DEFAULT_VALUE</b> String{@code =>} The default value of the property<br>3278* <li><b>DESCRIPTION</b> String{@code =>} A description of the property. This will typically3279* contain information as to where this property is3280* stored in the database.3281* </ol>3282* <p>3283* The <code>ResultSet</code> is sorted by the NAME column3284* <p>3285* @return A <code>ResultSet</code> object; each row is a supported client info3286* property3287* <p>3288* @exception SQLException if a database access error occurs3289* <p>3290* @since 1.63291*/3292ResultSet getClientInfoProperties()3293throws SQLException;32943295/**3296* Retrieves a description of the system and user functions available3297* in the given catalog.3298* <P>3299* Only system and user function descriptions matching the schema and3300* function name criteria are returned. They are ordered by3301* <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>,3302* <code>FUNCTION_NAME</code> and3303* <code>SPECIFIC_ NAME</code>.3304*3305* <P>Each function description has the the following columns:3306* <OL>3307* <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be <code>null</code>)3308* <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be <code>null</code>)3309* <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name3310* used to invoke the function3311* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the function3312* <LI><B>FUNCTION_TYPE</B> short {@code =>} kind of function:3313* <UL>3314* <LI>functionResultUnknown - Cannot determine if a return value3315* or table will be returned3316* <LI> functionNoTable- Does not return a table3317* <LI> functionReturnsTable - Returns a table3318* </UL>3319* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies3320* this function within its schema. This is a user specified, or DBMS3321* generated, name that may be different then the <code>FUNCTION_NAME</code>3322* for example with overload functions3323* </OL>3324* <p>3325* A user may not have permission to execute any of the functions that are3326* returned by <code>getFunctions</code>3327*3328* @param catalog a catalog name; must match the catalog name as it3329* is stored in the database; "" retrieves those without a catalog;3330* <code>null</code> means that the catalog name should not be used to narrow3331* the search3332* @param schemaPattern a schema name pattern; must match the schema name3333* as it is stored in the database; "" retrieves those without a schema;3334* <code>null</code> means that the schema name should not be used to narrow3335* the search3336* @param functionNamePattern a function name pattern; must match the3337* function name as it is stored in the database3338* @return <code>ResultSet</code> - each row is a function description3339* @exception SQLException if a database access error occurs3340* @see #getSearchStringEscape3341* @since 1.63342*/3343ResultSet getFunctions(String catalog, String schemaPattern,3344String functionNamePattern) throws SQLException;3345/**3346* Retrieves a description of the given catalog's system or user3347* function parameters and return type.3348*3349* <P>Only descriptions matching the schema, function and3350* parameter name criteria are returned. They are ordered by3351* <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>,3352* <code>FUNCTION_NAME</code> and3353* <code>SPECIFIC_ NAME</code>. Within this, the return value,3354* if any, is first. Next are the parameter descriptions in call3355* order. The column descriptions follow in column number order.3356*3357* <P>Each row in the <code>ResultSet</code>3358* is a parameter description, column description or3359* return type description with the following fields:3360* <OL>3361* <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be <code>null</code>)3362* <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be <code>null</code>)3363* <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name3364* used to invoke the function3365* <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name3366* <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter:3367* <UL>3368* <LI> functionColumnUnknown - nobody knows3369* <LI> functionColumnIn - IN parameter3370* <LI> functionColumnInOut - INOUT parameter3371* <LI> functionColumnOut - OUT parameter3372* <LI> functionColumnReturn - function return value3373* <LI> functionColumnResult - Indicates that the parameter or column3374* is a column in the <code>ResultSet</code>3375* </UL>3376* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types3377* <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the3378* type name is fully qualified3379* <LI><B>PRECISION</B> int {@code =>} precision3380* <LI><B>LENGTH</B> int {@code =>} length in bytes of data3381* <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where3382* SCALE is not applicable.3383* <LI><B>RADIX</B> short {@code =>} radix3384* <LI><B>NULLABLE</B> short {@code =>} can it contain NULL.3385* <UL>3386* <LI> functionNoNulls - does not allow NULL values3387* <LI> functionNullable - allows NULL values3388* <LI> functionNullableUnknown - nullability unknown3389* </UL>3390* <LI><B>REMARKS</B> String {@code =>} comment describing column/parameter3391* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} the maximum length of binary3392* and character based parameters or columns. For any other datatype the returned value3393* is a NULL3394* <LI><B>ORDINAL_POSITION</B> int {@code =>} the ordinal position, starting3395* from 1, for the input and output parameters. A value of 03396* is returned if this row describes the function's return value.3397* For result set columns, it is the3398* ordinal position of the column in the result set starting from 1.3399* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine3400* the nullability for a parameter or column.3401* <UL>3402* <LI> YES --- if the parameter or column can include NULLs3403* <LI> NO --- if the parameter or column cannot include NULLs3404* <LI> empty string --- if the nullability for the3405* parameter or column is unknown3406* </UL>3407* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies3408* this function within its schema. This is a user specified, or DBMS3409* generated, name that may be different then the <code>FUNCTION_NAME</code>3410* for example with overload functions3411* </OL>3412*3413* <p>The PRECISION column represents the specified column size for the given3414* parameter or column.3415* For numeric data, this is the maximum precision. For character data, this is the length in characters.3416* For datetime datatypes, this is the length in characters of the String representation (assuming the3417* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,3418* this is the length in bytes. Null is returned for data types where the3419* column size is not applicable.3420* @param catalog a catalog name; must match the catalog name as it3421* is stored in the database; "" retrieves those without a catalog;3422* <code>null</code> means that the catalog name should not be used to narrow3423* the search3424* @param schemaPattern a schema name pattern; must match the schema name3425* as it is stored in the database; "" retrieves those without a schema;3426* <code>null</code> means that the schema name should not be used to narrow3427* the search3428* @param functionNamePattern a procedure name pattern; must match the3429* function name as it is stored in the database3430* @param columnNamePattern a parameter name pattern; must match the3431* parameter or column name as it is stored in the database3432* @return <code>ResultSet</code> - each row describes a3433* user function parameter, column or return type3434*3435* @exception SQLException if a database access error occurs3436* @see #getSearchStringEscape3437* @since 1.63438*/3439ResultSet getFunctionColumns(String catalog,3440String schemaPattern,3441String functionNamePattern,3442String columnNamePattern) throws SQLException;344334443445/**3446* Indicates that type of the parameter or column is unknown.3447* <P>3448* A possible value for the column3449* <code>COLUMN_TYPE</code>3450* in the <code>ResultSet</code>3451* returned by the method <code>getFunctionColumns</code>.3452*/3453int functionColumnUnknown = 0;34543455/**3456* Indicates that the parameter or column is an IN parameter.3457* <P>3458* A possible value for the column3459* <code>COLUMN_TYPE</code>3460* in the <code>ResultSet</code>3461* returned by the method <code>getFunctionColumns</code>.3462* @since 1.63463*/3464int functionColumnIn = 1;34653466/**3467* Indicates that the parameter or column is an INOUT parameter.3468* <P>3469* A possible value for the column3470* <code>COLUMN_TYPE</code>3471* in the <code>ResultSet</code>3472* returned by the method <code>getFunctionColumns</code>.3473* @since 1.63474*/3475int functionColumnInOut = 2;34763477/**3478* Indicates that the parameter or column is an OUT parameter.3479* <P>3480* A possible value for the column3481* <code>COLUMN_TYPE</code>3482* in the <code>ResultSet</code>3483* returned by the method <code>getFunctionColumns</code>.3484* @since 1.63485*/3486int functionColumnOut = 3;3487/**3488* Indicates that the parameter or column is a return value.3489* <P>3490* A possible value for the column3491* <code>COLUMN_TYPE</code>3492* in the <code>ResultSet</code>3493* returned by the method <code>getFunctionColumns</code>.3494* @since 1.63495*/3496int functionReturn = 4;34973498/**3499* Indicates that the parameter or column is a column in a result set.3500* <P>3501* A possible value for the column3502* <code>COLUMN_TYPE</code>3503* in the <code>ResultSet</code>3504* returned by the method <code>getFunctionColumns</code>.3505* @since 1.63506*/3507int functionColumnResult = 5;350835093510/**3511* Indicates that <code>NULL</code> values are not allowed.3512* <P>3513* A possible value for the column3514* <code>NULLABLE</code>3515* in the <code>ResultSet</code> object3516* returned by the method <code>getFunctionColumns</code>.3517* @since 1.63518*/3519int functionNoNulls = 0;35203521/**3522* Indicates that <code>NULL</code> values are allowed.3523* <P>3524* A possible value for the column3525* <code>NULLABLE</code>3526* in the <code>ResultSet</code> object3527* returned by the method <code>getFunctionColumns</code>.3528* @since 1.63529*/3530int functionNullable = 1;35313532/**3533* Indicates that whether <code>NULL</code> values are allowed3534* is unknown.3535* <P>3536* A possible value for the column3537* <code>NULLABLE</code>3538* in the <code>ResultSet</code> object3539* returned by the method <code>getFunctionColumns</code>.3540* @since 1.63541*/3542int functionNullableUnknown = 2;35433544/**3545* Indicates that it is not known whether the function returns3546* a result or a table.3547* <P>3548* A possible value for column <code>FUNCTION_TYPE</code> in the3549* <code>ResultSet</code> object returned by the method3550* <code>getFunctions</code>.3551* @since 1.63552*/3553int functionResultUnknown = 0;35543555/**3556* Indicates that the function does not return a table.3557* <P>3558* A possible value for column <code>FUNCTION_TYPE</code> in the3559* <code>ResultSet</code> object returned by the method3560* <code>getFunctions</code>.3561* @since 1.63562*/3563int functionNoTable = 1;35643565/**3566* Indicates that the function returns a table.3567* <P>3568* A possible value for column <code>FUNCTION_TYPE</code> in the3569* <code>ResultSet</code> object returned by the method3570* <code>getFunctions</code>.3571* @since 1.63572*/3573int functionReturnsTable = 2;35743575//--------------------------JDBC 4.1 -----------------------------35763577/**3578* Retrieves a description of the pseudo or hidden columns available3579* in a given table within the specified catalog and schema.3580* Pseudo or hidden columns may not always be stored within3581* a table and are not visible in a ResultSet unless they are3582* specified in the query's outermost SELECT list. Pseudo or hidden3583* columns may not necessarily be able to be modified. If there are3584* no pseudo or hidden columns, an empty ResultSet is returned.3585*3586* <P>Only column descriptions matching the catalog, schema, table3587* and column name criteria are returned. They are ordered by3588* <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>3589* and <code>COLUMN_NAME</code>.3590*3591* <P>Each column description has the following columns:3592* <OL>3593* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>)3594* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>)3595* <LI><B>TABLE_NAME</B> String {@code =>} table name3596* <LI><B>COLUMN_NAME</B> String {@code =>} column name3597* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types3598* <LI><B>COLUMN_SIZE</B> int {@code =>} column size.3599* <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where3600* DECIMAL_DIGITS is not applicable.3601* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)3602* <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the column. The3603* value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name PseudoColumnUsage.name()}3604* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>)3605* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the3606* maximum number of bytes in the column3607* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.3608* <UL>3609* <LI> YES --- if the column can include NULLs3610* <LI> NO --- if the column cannot include NULLs3611* <LI> empty string --- if the nullability for the column is unknown3612* </UL>3613* </OL>3614*3615* <p>The COLUMN_SIZE column specifies the column size for the given column.3616* For numeric data, this is the maximum precision. For character data, this is the length in characters.3617* For datetime datatypes, this is the length in characters of the String representation (assuming the3618* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,3619* this is the length in bytes. Null is returned for data types where the3620* column size is not applicable.3621*3622* @param catalog a catalog name; must match the catalog name as it3623* is stored in the database; "" retrieves those without a catalog;3624* <code>null</code> means that the catalog name should not be used to narrow3625* the search3626* @param schemaPattern a schema name pattern; must match the schema name3627* as it is stored in the database; "" retrieves those without a schema;3628* <code>null</code> means that the schema name should not be used to narrow3629* the search3630* @param tableNamePattern a table name pattern; must match the3631* table name as it is stored in the database3632* @param columnNamePattern a column name pattern; must match the column3633* name as it is stored in the database3634* @return <code>ResultSet</code> - each row is a column description3635* @exception SQLException if a database access error occurs3636* @see PseudoColumnUsage3637* @since 1.73638*/3639ResultSet getPseudoColumns(String catalog, String schemaPattern,3640String tableNamePattern, String columnNamePattern)3641throws SQLException;36423643/**3644* Retrieves whether a generated key will always be returned if the column3645* name(s) or index(es) specified for the auto generated key column(s)3646* are valid and the statement succeeds. The key that is returned may or3647* may not be based on the column(s) for the auto generated key.3648* Consult your JDBC driver documentation for additional details.3649* @return <code>true</code> if so; <code>false</code> otherwise3650* @exception SQLException if a database access error occurs3651* @since 1.73652*/3653boolean generatedKeyAlwaysReturned() throws SQLException;36543655//--------------------------JDBC 4.2 -----------------------------36563657/**3658*3659* Retrieves the maximum number of bytes this database allows for3660* the logical size for a {@code LOB}.3661*<p>3662* The default implementation will return {@code 0}3663*3664* @return the maximum number of bytes allowed; a result of zero3665* means that there is no limit or the limit is not known3666* @exception SQLException if a database access error occurs3667* @since 1.83668*/3669default long getMaxLogicalLobSize() throws SQLException {3670return 0;3671}36723673/**3674* Retrieves whether this database supports REF CURSOR.3675*<p>3676* The default implementation will return {@code false}3677*3678* @return {@code true} if this database supports REF CURSOR;3679* {@code false} otherwise3680* @exception SQLException if a database access error occurs3681* @since 1.83682*/3683default boolean supportsRefCursors() throws SQLException{3684return false;3685}36863687}368836893690