Path: blob/master/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
41153 views
/*1* Copyright (c) 1996, 2020, 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} to find out what data types can be used in a46* {@code CREATE TABLE} statement. Or a user might call the method47* {@code supportsCorrelatedSubqueries} to see if it is possible to use48* a correlated subquery or {@code supportsBatchUpdates} to see if it is49* possible to use batch updates.50* <P>51* Some {@code DatabaseMetaData} methods return lists of information52* in the form of {@code ResultSet} objects.53* Regular {@code ResultSet} methods, such as54* {@code getString} and {@code getInt}, can be used55* to retrieve the data from these {@code ResultSet} objects. If56* a given form of metadata is not available, an empty {@code ResultSet}57* will be returned. Additional columns beyond the columns defined to be58* returned by the {@code ResultSet} 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} 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}, that argument's criterion will68* be dropped from the search.69*70* @since 1.171*/72public interface DatabaseMetaData extends Wrapper {7374//----------------------------------------------------------------------75// First, a variety of minor information about the target database.7677/**78* Retrieves whether the current user can call all the procedures79* returned by the method {@code getProcedures}.80*81* @return {@code true} if so; {@code false} otherwise82* @throws SQLException if a database access error occurs83*/84boolean allProceduresAreCallable() throws SQLException;8586/**87* Retrieves whether the current user can use all the tables returned88* by the method {@code getTables} in a {@code SELECT}89* statement.90*91* @return {@code true} if so; {@code false} otherwise92* @throws SQLException if a database access error occurs93*/94boolean allTablesAreSelectable() throws SQLException;9596/**97* Retrieves the URL for this DBMS.98*99* @return the URL for this DBMS or {@code null} if it cannot be100* generated101* @throws SQLException if a database access error occurs102*/103String getURL() throws SQLException;104105/**106* Retrieves the user name as known to this database.107*108* @return the database user name109* @throws SQLException if a database access error occurs110*/111String getUserName() throws SQLException;112113/**114* Retrieves whether this database is in read-only mode.115*116* @return {@code true} if so; {@code false} otherwise117* @throws SQLException if a database access error occurs118*/119boolean isReadOnly() throws SQLException;120121/**122* Retrieves whether {@code NULL} values are sorted high.123* Sorted high means that {@code NULL} values124* sort higher than any other value in a domain. In an ascending order,125* if this method returns {@code true}, {@code NULL} values126* will appear at the end. By contrast, the method127* {@code nullsAreSortedAtEnd} indicates whether {@code NULL} values128* are sorted at the end regardless of sort order.129*130* @return {@code true} if so; {@code false} otherwise131* @throws SQLException if a database access error occurs132*/133boolean nullsAreSortedHigh() throws SQLException;134135/**136* Retrieves whether {@code NULL} values are sorted low.137* Sorted low means that {@code NULL} values138* sort lower than any other value in a domain. In an ascending order,139* if this method returns {@code true}, {@code NULL} values140* will appear at the beginning. By contrast, the method141* {@code nullsAreSortedAtStart} indicates whether {@code NULL} values142* are sorted at the beginning regardless of sort order.143*144* @return {@code true} if so; {@code false} otherwise145* @throws SQLException if a database access error occurs146*/147boolean nullsAreSortedLow() throws SQLException;148149/**150* Retrieves whether {@code NULL} values are sorted at the start regardless151* of sort order.152*153* @return {@code true} if so; {@code false} otherwise154* @throws SQLException if a database access error occurs155*/156boolean nullsAreSortedAtStart() throws SQLException;157158/**159* Retrieves whether {@code NULL} values are sorted at the end regardless of160* sort order.161*162* @return {@code true} if so; {@code false} otherwise163* @throws SQLException if a database access error occurs164*/165boolean nullsAreSortedAtEnd() throws SQLException;166167/**168* Retrieves the name of this database product.169*170* @return database product name171* @throws SQLException if a database access error occurs172*/173String getDatabaseProductName() throws SQLException;174175/**176* Retrieves the version number of this database product.177*178* @return database version number179* @throws SQLException if a database access error occurs180*/181String getDatabaseProductVersion() throws SQLException;182183/**184* Retrieves the name of this JDBC driver.185*186* @return JDBC driver name187* @throws SQLException if a database access error occurs188*/189String getDriverName() throws SQLException;190191/**192* Retrieves the version number of this JDBC driver as a {@code String}.193*194* @return JDBC driver version195* @throws SQLException if a database access error occurs196*/197String getDriverVersion() throws SQLException;198199/**200* Retrieves this JDBC driver's major version number.201*202* @return JDBC driver major version203*/204int getDriverMajorVersion();205206/**207* Retrieves this JDBC driver's minor version number.208*209* @return JDBC driver minor version number210*/211int getDriverMinorVersion();212213/**214* Retrieves whether this database stores tables in a local file.215*216* @return {@code true} if so; {@code false} otherwise217* @throws SQLException if a database access error occurs218*/219boolean usesLocalFiles() throws SQLException;220221/**222* Retrieves whether this database uses a file for each table.223*224* @return {@code true} if this database uses a local file for each table;225* {@code false} otherwise226* @throws SQLException if a database access error occurs227*/228boolean usesLocalFilePerTable() throws SQLException;229230/**231* Retrieves whether this database treats mixed case unquoted SQL identifiers as232* case sensitive and as a result stores them in mixed case.233*234* @return {@code true} if so; {@code false} otherwise235* @throws SQLException if a database access error occurs236*/237boolean supportsMixedCaseIdentifiers() throws SQLException;238239/**240* Retrieves whether this database treats mixed case unquoted SQL identifiers as241* case insensitive and stores them in upper case.242*243* @return {@code true} if so; {@code false} otherwise244* @throws SQLException if a database access error occurs245*/246boolean storesUpperCaseIdentifiers() throws SQLException;247248/**249* Retrieves whether this database treats mixed case unquoted SQL identifiers as250* case insensitive and stores them in lower case.251*252* @return {@code true} if so; {@code false} otherwise253* @throws SQLException if a database access error occurs254*/255boolean storesLowerCaseIdentifiers() throws SQLException;256257/**258* Retrieves whether this database treats mixed case unquoted SQL identifiers as259* case insensitive and stores them in mixed case.260*261* @return {@code true} if so; {@code false} otherwise262* @throws SQLException if a database access error occurs263*/264boolean storesMixedCaseIdentifiers() throws SQLException;265266/**267* Retrieves whether this database treats mixed case quoted SQL identifiers as268* case sensitive and as a result stores them in mixed case.269*270* @return {@code true} if so; {@code false} otherwise271* @throws SQLException if a database access error occurs272*/273boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;274275/**276* Retrieves whether this database treats mixed case quoted SQL identifiers as277* case insensitive and stores them in upper case.278*279* @return {@code true} if so; {@code false} otherwise280* @throws SQLException if a database access error occurs281*/282boolean storesUpperCaseQuotedIdentifiers() throws SQLException;283284/**285* Retrieves whether this database treats mixed case quoted SQL identifiers as286* case insensitive and stores them in lower case.287*288* @return {@code true} if so; {@code false} otherwise289* @throws SQLException if a database access error occurs290*/291boolean storesLowerCaseQuotedIdentifiers() throws SQLException;292293/**294* Retrieves whether this database treats mixed case quoted SQL identifiers as295* case insensitive and stores them in mixed case.296*297* @return {@code true} if so; {@code false} otherwise298* @throws SQLException if a database access error occurs299*/300boolean storesMixedCaseQuotedIdentifiers() throws SQLException;301302/**303* Retrieves the string used to quote SQL identifiers.304* This method returns a space " " if identifier quoting is not supported.305*306* @return the quoting string or a space if quoting is not supported307* @throws SQLException if a database access error occurs308*/309String getIdentifierQuoteString() throws SQLException;310311/**312* Retrieves a comma-separated list of all of this database's SQL keywords313* that are NOT also SQL:2003 keywords.314*315* @return the list of this database's keywords that are not also316* SQL:2003 keywords317* @throws SQLException if a database access error occurs318*/319String getSQLKeywords() throws SQLException;320321/**322* Retrieves a comma-separated list of math functions available with323* this database. These are the Open /Open CLI math function names used in324* the JDBC function escape clause.325*326* @return the list of math functions supported by this database327* @throws SQLException if a database access error occurs328*/329String getNumericFunctions() throws SQLException;330331/**332* Retrieves a comma-separated list of string functions available with333* this database. These are the Open Group CLI string function names used334* in the JDBC function escape clause.335*336* @return the list of string functions supported by this database337* @throws SQLException if a database access error occurs338*/339String getStringFunctions() throws SQLException;340341/**342* Retrieves a comma-separated list of system functions available with343* this database. These are the Open Group CLI system function names used344* in the JDBC function escape clause.345*346* @return a list of system functions supported by this database347* @throws SQLException if a database access error occurs348*/349String getSystemFunctions() throws SQLException;350351/**352* Retrieves a comma-separated list of the time and date functions available353* with this database.354*355* @return the list of time and date functions supported by this database356* @throws SQLException if a database access error occurs357*/358String getTimeDateFunctions() throws SQLException;359360/**361* Retrieves the string that can be used to escape wildcard characters.362* This is the string that can be used to escape '_' or '%' in363* the catalog search parameters that are a pattern (and therefore use one364* of the wildcard characters).365*366* <P>The '_' character represents any single character;367* the '%' character represents any sequence of zero or368* more characters.369*370* @return the string used to escape wildcard characters371* @throws SQLException if a database access error occurs372*/373String getSearchStringEscape() throws SQLException;374375/**376* Retrieves all the "extra" characters that can be used in unquoted377* identifier names (those beyond a-z, A-Z, 0-9 and _).378*379* @return the string containing the extra characters380* @throws SQLException if a database access error occurs381*/382String getExtraNameCharacters() throws SQLException;383384//--------------------------------------------------------------------385// Functions describing which features are supported.386387/**388* Retrieves whether this database supports {@code ALTER TABLE}389* with add column.390*391* @return {@code true} if so; {@code false} otherwise392* @throws SQLException if a database access error occurs393*/394boolean supportsAlterTableWithAddColumn() throws SQLException;395396/**397* Retrieves whether this database supports {@code ALTER TABLE}398* with drop column.399*400* @return {@code true} if so; {@code false} otherwise401* @throws SQLException if a database access error occurs402*/403boolean supportsAlterTableWithDropColumn() throws SQLException;404405/**406* Retrieves whether this database supports column aliasing.407*408* <P>If so, the SQL AS clause can be used to provide names for409* computed columns or to provide alias names for columns as410* required.411*412* @return {@code true} if so; {@code false} otherwise413* @throws SQLException if a database access error occurs414*/415boolean supportsColumnAliasing() throws SQLException;416417/**418* Retrieves whether this database supports concatenations between419* {@code NULL} and non-{@code NULL} values being420* {@code NULL}.421*422* @return {@code true} if so; {@code false} otherwise423* @throws SQLException if a database access error occurs424*/425boolean nullPlusNonNullIsNull() throws SQLException;426427/**428* Retrieves whether this database supports the JDBC scalar function429* {@code CONVERT} for the conversion of one JDBC type to another.430* The JDBC types are the generic SQL data types defined431* in {@code java.sql.Types}.432*433* @return {@code true} if so; {@code false} otherwise434* @throws SQLException if a database access error occurs435*/436boolean supportsConvert() throws SQLException;437438/**439* Retrieves whether this database supports the JDBC scalar function440* {@code CONVERT} for conversions between the JDBC types <i>fromType</i>441* and <i>toType</i>. The JDBC types are the generic SQL data types defined442* in {@code java.sql.Types}.443*444* @param fromType the type to convert from; one of the type codes from445* the class {@code java.sql.Types}446* @param toType the type to convert to; one of the type codes from447* the class {@code java.sql.Types}448* @return {@code true} if so; {@code false} otherwise449* @throws SQLException if a database access error occurs450* @see Types451*/452boolean supportsConvert(int fromType, int toType) throws SQLException;453454/**455* Retrieves whether this database supports table correlation names.456*457* @return {@code true} if so; {@code false} otherwise458* @throws SQLException if a database access error occurs459*/460boolean supportsTableCorrelationNames() throws SQLException;461462/**463* Retrieves whether, when table correlation names are supported, they464* are restricted to being different from the names of the tables.465*466* @return {@code true} if so; {@code false} otherwise467* @throws SQLException if a database access error occurs468*/469boolean supportsDifferentTableCorrelationNames() throws SQLException;470471/**472* Retrieves whether this database supports expressions in473* {@code ORDER BY} lists.474*475* @return {@code true} if so; {@code false} otherwise476* @throws SQLException if a database access error occurs477*/478boolean supportsExpressionsInOrderBy() throws SQLException;479480/**481* Retrieves whether this database supports using a column that is482* not in the {@code SELECT} statement in an483* {@code ORDER BY} clause.484*485* @return {@code true} if so; {@code false} otherwise486* @throws SQLException if a database access error occurs487*/488boolean supportsOrderByUnrelated() throws SQLException;489490/**491* Retrieves whether this database supports some form of492* {@code GROUP BY} clause.493*494* @return {@code true} if so; {@code false} otherwise495* @throws SQLException if a database access error occurs496*/497boolean supportsGroupBy() throws SQLException;498499/**500* Retrieves whether this database supports using a column that is501* not in the {@code SELECT} statement in a502* {@code GROUP BY} clause.503*504* @return {@code true} if so; {@code false} otherwise505* @throws SQLException if a database access error occurs506*/507boolean supportsGroupByUnrelated() throws SQLException;508509/**510* Retrieves whether this database supports using columns not included in511* the {@code SELECT} statement in a {@code GROUP BY} clause512* provided that all of the columns in the {@code SELECT} statement513* are included in the {@code GROUP BY} clause.514*515* @return {@code true} if so; {@code false} otherwise516* @throws SQLException if a database access error occurs517*/518boolean supportsGroupByBeyondSelect() throws SQLException;519520/**521* Retrieves whether this database supports specifying a522* {@code LIKE} escape clause.523*524* @return {@code true} if so; {@code false} otherwise525* @throws SQLException if a database access error occurs526*/527boolean supportsLikeEscapeClause() throws SQLException;528529/**530* Retrieves whether this database supports getting multiple531* {@code ResultSet} objects from a single call to the532* method {@code execute}.533*534* @return {@code true} if so; {@code false} otherwise535* @throws SQLException if a database access error occurs536*/537boolean supportsMultipleResultSets() throws SQLException;538539/**540* Retrieves whether this database allows having multiple541* transactions open at once (on different connections).542*543* @return {@code true} if so; {@code false} otherwise544* @throws SQLException if a database access error occurs545*/546boolean supportsMultipleTransactions() throws SQLException;547548/**549* Retrieves whether columns in this database may be defined as non-nullable.550*551* @return {@code true} if so; {@code false} otherwise552* @throws SQLException if a database access error occurs553*/554boolean supportsNonNullableColumns() throws SQLException;555556/**557* Retrieves whether this database supports the ODBC Minimum SQL grammar.558*559* @return {@code true} if so; {@code false} otherwise560* @throws SQLException if a database access error occurs561*/562boolean supportsMinimumSQLGrammar() throws SQLException;563564/**565* Retrieves whether this database supports the ODBC Core SQL grammar.566*567* @return {@code true} if so; {@code false} otherwise568* @throws SQLException if a database access error occurs569*/570boolean supportsCoreSQLGrammar() throws SQLException;571572/**573* Retrieves whether this database supports the ODBC Extended SQL grammar.574*575* @return {@code true} if so; {@code false} otherwise576* @throws SQLException if a database access error occurs577*/578boolean supportsExtendedSQLGrammar() throws SQLException;579580/**581* Retrieves whether this database supports the ANSI92 entry level SQL582* grammar.583*584* @return {@code true} if so; {@code false} otherwise585* @throws SQLException if a database access error occurs586*/587boolean supportsANSI92EntryLevelSQL() throws SQLException;588589/**590* Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.591*592* @return {@code true} if so; {@code false} otherwise593* @throws SQLException if a database access error occurs594*/595boolean supportsANSI92IntermediateSQL() throws SQLException;596597/**598* Retrieves whether this database supports the ANSI92 full SQL grammar supported.599*600* @return {@code true} if so; {@code false} otherwise601* @throws SQLException if a database access error occurs602*/603boolean supportsANSI92FullSQL() throws SQLException;604605/**606* Retrieves whether this database supports the SQL Integrity607* Enhancement Facility.608*609* @return {@code true} if so; {@code false} otherwise610* @throws SQLException if a database access error occurs611*/612boolean supportsIntegrityEnhancementFacility() throws SQLException;613614/**615* Retrieves whether this database supports some form of outer join.616*617* @return {@code true} if so; {@code false} otherwise618* @throws SQLException if a database access error occurs619*/620boolean supportsOuterJoins() throws SQLException;621622/**623* Retrieves whether this database supports full nested outer joins.624*625* @return {@code true} if so; {@code false} otherwise626* @throws SQLException if a database access error occurs627*/628boolean supportsFullOuterJoins() throws SQLException;629630/**631* Retrieves whether this database provides limited support for outer632* joins. (This will be {@code true} if the method633* {@code supportsFullOuterJoins} returns {@code true}).634*635* @return {@code true} if so; {@code false} otherwise636* @throws SQLException if a database access error occurs637*/638boolean supportsLimitedOuterJoins() throws SQLException;639640/**641* Retrieves the database vendor's preferred term for "schema".642*643* @return the vendor term for "schema"644* @throws SQLException if a database access error occurs645*/646String getSchemaTerm() throws SQLException;647648/**649* Retrieves the database vendor's preferred term for "procedure".650*651* @return the vendor term for "procedure"652* @throws SQLException if a database access error occurs653*/654String getProcedureTerm() throws SQLException;655656/**657* Retrieves the database vendor's preferred term for "catalog".658*659* @return the vendor term for "catalog"660* @throws SQLException if a database access error occurs661*/662String getCatalogTerm() throws SQLException;663664/**665* Retrieves whether a catalog appears at the start of a fully qualified666* table name. If not, the catalog appears at the end.667*668* @return {@code true} if the catalog name appears at the beginning669* of a fully qualified table name; {@code false} otherwise670* @throws SQLException if a database access error occurs671*/672boolean isCatalogAtStart() throws SQLException;673674/**675* Retrieves the {@code String} that this database uses as the676* separator between a catalog and table name.677*678* @return the separator string679* @throws SQLException if a database access error occurs680*/681String getCatalogSeparator() throws SQLException;682683/**684* Retrieves whether a schema name can be used in a data manipulation statement.685*686* @return {@code true} if so; {@code false} otherwise687* @throws SQLException if a database access error occurs688*/689boolean supportsSchemasInDataManipulation() throws SQLException;690691/**692* Retrieves whether a schema name can be used in a procedure call statement.693*694* @return {@code true} if so; {@code false} otherwise695* @throws SQLException if a database access error occurs696*/697boolean supportsSchemasInProcedureCalls() throws SQLException;698699/**700* Retrieves whether a schema name can be used in a table definition statement.701*702* @return {@code true} if so; {@code false} otherwise703* @throws SQLException if a database access error occurs704*/705boolean supportsSchemasInTableDefinitions() throws SQLException;706707/**708* Retrieves whether a schema name can be used in an index definition statement.709*710* @return {@code true} if so; {@code false} otherwise711* @throws SQLException if a database access error occurs712*/713boolean supportsSchemasInIndexDefinitions() throws SQLException;714715/**716* Retrieves whether a schema name can be used in a privilege definition statement.717*718* @return {@code true} if so; {@code false} otherwise719* @throws SQLException if a database access error occurs720*/721boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;722723/**724* Retrieves whether a catalog name can be used in a data manipulation statement.725*726* @return {@code true} if so; {@code false} otherwise727* @throws SQLException if a database access error occurs728*/729boolean supportsCatalogsInDataManipulation() throws SQLException;730731/**732* Retrieves whether a catalog name can be used in a procedure call statement.733*734* @return {@code true} if so; {@code false} otherwise735* @throws SQLException if a database access error occurs736*/737boolean supportsCatalogsInProcedureCalls() throws SQLException;738739/**740* Retrieves whether a catalog name can be used in a table definition statement.741*742* @return {@code true} if so; {@code false} otherwise743* @throws SQLException if a database access error occurs744*/745boolean supportsCatalogsInTableDefinitions() throws SQLException;746747/**748* Retrieves whether a catalog name can be used in an index definition statement.749*750* @return {@code true} if so; {@code false} otherwise751* @throws SQLException if a database access error occurs752*/753boolean supportsCatalogsInIndexDefinitions() throws SQLException;754755/**756* Retrieves whether a catalog name can be used in a privilege definition statement.757*758* @return {@code true} if so; {@code false} otherwise759* @throws SQLException if a database access error occurs760*/761boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;762763764/**765* Retrieves whether this database supports positioned {@code DELETE}766* statements.767*768* @return {@code true} if so; {@code false} otherwise769* @throws SQLException if a database access error occurs770*/771boolean supportsPositionedDelete() throws SQLException;772773/**774* Retrieves whether this database supports positioned {@code UPDATE}775* statements.776*777* @return {@code true} if so; {@code false} otherwise778* @throws SQLException if a database access error occurs779*/780boolean supportsPositionedUpdate() throws SQLException;781782/**783* Retrieves whether this database supports {@code SELECT FOR UPDATE}784* statements.785*786* @return {@code true} if so; {@code false} otherwise787* @throws SQLException if a database access error occurs788*/789boolean supportsSelectForUpdate() throws SQLException;790791/**792* Retrieves whether this database supports stored procedure calls793* that use the stored procedure escape syntax.794*795* @return {@code true} if so; {@code false} otherwise796* @throws SQLException if a database access error occurs797*/798boolean supportsStoredProcedures() throws SQLException;799800/**801* Retrieves whether this database supports subqueries in comparison802* expressions.803*804* @return {@code true} if so; {@code false} otherwise805* @throws SQLException if a database access error occurs806*/807boolean supportsSubqueriesInComparisons() throws SQLException;808809/**810* Retrieves whether this database supports subqueries in811* {@code EXISTS} expressions.812*813* @return {@code true} if so; {@code false} otherwise814* @throws SQLException if a database access error occurs815*/816boolean supportsSubqueriesInExists() throws SQLException;817818/**819* Retrieves whether this database supports subqueries in820* {@code IN} expressions.821*822* @return {@code true} if so; {@code false} otherwise823* @throws SQLException if a database access error occurs824*/825boolean supportsSubqueriesInIns() throws SQLException;826827/**828* Retrieves whether this database supports subqueries in quantified829* expressions.830*831* @return {@code true} if so; {@code false} otherwise832* @throws SQLException if a database access error occurs833*/834boolean supportsSubqueriesInQuantifieds() throws SQLException;835836/**837* Retrieves whether this database supports correlated subqueries.838*839* @return {@code true} if so; {@code false} otherwise840* @throws SQLException if a database access error occurs841*/842boolean supportsCorrelatedSubqueries() throws SQLException;843844/**845* Retrieves whether this database supports SQL {@code UNION}.846*847* @return {@code true} if so; {@code false} otherwise848* @throws SQLException if a database access error occurs849*/850boolean supportsUnion() throws SQLException;851852/**853* Retrieves whether this database supports SQL {@code UNION ALL}.854*855* @return {@code true} if so; {@code false} otherwise856* @throws SQLException if a database access error occurs857*/858boolean supportsUnionAll() throws SQLException;859860/**861* Retrieves whether this database supports keeping cursors open862* across commits.863*864* @return {@code true} if cursors always remain open;865* {@code false} if they might not remain open866* @throws SQLException if a database access error occurs867*/868boolean supportsOpenCursorsAcrossCommit() throws SQLException;869870/**871* Retrieves whether this database supports keeping cursors open872* across rollbacks.873*874* @return {@code true} if cursors always remain open;875* {@code false} if they might not remain open876* @throws SQLException if a database access error occurs877*/878boolean supportsOpenCursorsAcrossRollback() throws SQLException;879880/**881* Retrieves whether this database supports keeping statements open882* across commits.883*884* @return {@code true} if statements always remain open;885* {@code false} if they might not remain open886* @throws SQLException if a database access error occurs887*/888boolean supportsOpenStatementsAcrossCommit() throws SQLException;889890/**891* Retrieves whether this database supports keeping statements open892* across rollbacks.893*894* @return {@code true} if statements always remain open;895* {@code false} if they might not remain open896* @throws SQLException if a database access error occurs897*/898boolean supportsOpenStatementsAcrossRollback() throws SQLException;899900901902//----------------------------------------------------------------------903// The following group of methods exposes various limitations904// based on the target database with the current driver.905// Unless otherwise specified, a result of zero means there is no906// limit, or the limit is not known.907908/**909* Retrieves the maximum number of hex characters this database allows in an910* inline binary literal.911*912* @return max the maximum length (in hex characters) for a binary literal;913* a result of zero means that there is no limit or the limit914* is not known915* @throws SQLException if a database access error occurs916*/917int getMaxBinaryLiteralLength() throws SQLException;918919/**920* Retrieves the maximum number of characters this database allows921* for a character literal.922*923* @return the maximum number of characters allowed for a character literal;924* a result of zero means that there is no limit or the limit is925* not known926* @throws SQLException if a database access error occurs927*/928int getMaxCharLiteralLength() throws SQLException;929930/**931* Retrieves the maximum number of characters this database allows932* for a column name.933*934* @return the maximum number of characters allowed for a column name;935* a result of zero means that there is no limit or the limit936* is not known937* @throws SQLException if a database access error occurs938*/939int getMaxColumnNameLength() throws SQLException;940941/**942* Retrieves the maximum number of columns this database allows in a943* {@code GROUP BY} clause.944*945* @return the maximum number of columns allowed;946* a result of zero means that there is no limit or the limit947* is not known948* @throws SQLException if a database access error occurs949*/950int getMaxColumnsInGroupBy() throws SQLException;951952/**953* Retrieves the maximum number of columns this database allows in an index.954*955* @return the maximum number of columns allowed;956* a result of zero means that there is no limit or the limit957* is not known958* @throws SQLException if a database access error occurs959*/960int getMaxColumnsInIndex() throws SQLException;961962/**963* Retrieves the maximum number of columns this database allows in an964* {@code ORDER BY} clause.965*966* @return the maximum number of columns allowed;967* a result of zero means that there is no limit or the limit968* is not known969* @throws SQLException if a database access error occurs970*/971int getMaxColumnsInOrderBy() throws SQLException;972973/**974* Retrieves the maximum number of columns this database allows in a975* {@code SELECT} list.976*977* @return the maximum number of columns allowed;978* a result of zero means that there is no limit or the limit979* is not known980* @throws SQLException if a database access error occurs981*/982int getMaxColumnsInSelect() throws SQLException;983984/**985* Retrieves the maximum number of columns this database allows in a table.986*987* @return the maximum number of columns allowed;988* a result of zero means that there is no limit or the limit989* is not known990* @throws SQLException if a database access error occurs991*/992int getMaxColumnsInTable() throws SQLException;993994/**995* Retrieves the maximum number of concurrent connections to this996* database that are possible.997*998* @return the maximum number of active connections possible at one time;999* a result of zero means that there is no limit or the limit1000* is not known1001* @throws SQLException if a database access error occurs1002*/1003int getMaxConnections() throws SQLException;10041005/**1006* Retrieves the maximum number of characters that this database allows in a1007* cursor name.1008*1009* @return the maximum number of characters allowed in a cursor name;1010* a result of zero means that there is no limit or the limit1011* is not known1012* @throws SQLException if a database access error occurs1013*/1014int getMaxCursorNameLength() throws SQLException;10151016/**1017* Retrieves the maximum number of bytes this database allows for an1018* index, including all of the parts of the index.1019*1020* @return the maximum number of bytes allowed; this limit includes the1021* composite of all the constituent parts of the index;1022* a result of zero means that there is no limit or the limit1023* is not known1024* @throws SQLException if a database access error occurs1025*/1026int getMaxIndexLength() throws SQLException;10271028/**1029* Retrieves the maximum number of characters that this database allows in a1030* schema name.1031*1032* @return the maximum number of characters allowed in a schema name;1033* a result of zero means that there is no limit or the limit1034* is not known1035* @throws SQLException if a database access error occurs1036*/1037int getMaxSchemaNameLength() throws SQLException;10381039/**1040* Retrieves the maximum number of characters that this database allows in a1041* procedure name.1042*1043* @return the maximum number of characters allowed in a procedure name;1044* a result of zero means that there is no limit or the limit1045* is not known1046* @throws SQLException if a database access error occurs1047*/1048int getMaxProcedureNameLength() throws SQLException;10491050/**1051* Retrieves the maximum number of characters that this database allows in a1052* catalog name.1053*1054* @return the maximum number of characters allowed in a catalog name;1055* a result of zero means that there is no limit or the limit1056* is not known1057* @throws SQLException if a database access error occurs1058*/1059int getMaxCatalogNameLength() throws SQLException;10601061/**1062* Retrieves the maximum number of bytes this database allows in1063* a single row.1064*1065* @return the maximum number of bytes allowed for a row; a result of1066* zero means that there is no limit or the limit is not known1067* @throws SQLException if a database access error occurs1068*/1069int getMaxRowSize() throws SQLException;10701071/**1072* Retrieves whether the return value for the method1073* {@code getMaxRowSize} includes the SQL data types1074* {@code LONGVARCHAR} and {@code LONGVARBINARY}.1075*1076* @return {@code true} if so; {@code false} otherwise1077* @throws SQLException if a database access error occurs1078*/1079boolean doesMaxRowSizeIncludeBlobs() throws SQLException;10801081/**1082* Retrieves the maximum number of characters this database allows in1083* an SQL statement.1084*1085* @return the maximum number of characters allowed for an SQL statement;1086* a result of zero means that there is no limit or the limit1087* is not known1088* @throws SQLException if a database access error occurs1089*/1090int getMaxStatementLength() throws SQLException;10911092/**1093* Retrieves the maximum number of active statements to this database1094* that can be open at the same time.1095*1096* @return the maximum number of statements that can be open at one time;1097* a result of zero means that there is no limit or the limit1098* is not known1099* @throws SQLException if a database access error occurs1100*/1101int getMaxStatements() throws SQLException;11021103/**1104* Retrieves the maximum number of characters this database allows in1105* a table name.1106*1107* @return the maximum number of characters allowed for a table name;1108* a result of zero means that there is no limit or the limit1109* is not known1110* @throws SQLException if a database access error occurs1111*/1112int getMaxTableNameLength() throws SQLException;11131114/**1115* Retrieves the maximum number of tables this database allows in a1116* {@code SELECT} statement.1117*1118* @return the maximum number of tables allowed in a {@code SELECT}1119* statement; a result of zero means that there is no limit or1120* the limit is not known1121* @throws SQLException if a database access error occurs1122*/1123int getMaxTablesInSelect() throws SQLException;11241125/**1126* Retrieves the maximum number of characters this database allows in1127* a user name.1128*1129* @return the maximum number of characters allowed for a user name;1130* a result of zero means that there is no limit or the limit1131* is not known1132* @throws SQLException if a database access error occurs1133*/1134int getMaxUserNameLength() throws SQLException;11351136//----------------------------------------------------------------------11371138/**1139* Retrieves this database's default transaction isolation level. The1140* possible values are defined in {@code java.sql.Connection}.1141*1142* @return the default isolation level1143* @throws SQLException if a database access error occurs1144* @see Connection1145*/1146int getDefaultTransactionIsolation() throws SQLException;11471148/**1149* Retrieves whether this database supports transactions. If not, invoking the1150* method {@code commit} is a noop, and the isolation level is1151* {@code TRANSACTION_NONE}.1152*1153* @return {@code true} if transactions are supported;1154* {@code false} otherwise1155* @throws SQLException if a database access error occurs1156*/1157boolean supportsTransactions() throws SQLException;11581159/**1160* Retrieves whether this database supports the given transaction isolation level.1161*1162* @param level one of the transaction isolation levels defined in1163* {@code java.sql.Connection}1164* @return {@code true} if so; {@code false} otherwise1165* @throws SQLException if a database access error occurs1166* @see Connection1167*/1168boolean supportsTransactionIsolationLevel(int level)1169throws SQLException;11701171/**1172* Retrieves whether this database supports both data definition and1173* data manipulation statements within a transaction.1174*1175* @return {@code true} if so; {@code false} otherwise1176* @throws SQLException if a database access error occurs1177*/1178boolean supportsDataDefinitionAndDataManipulationTransactions()1179throws SQLException;1180/**1181* Retrieves whether this database supports only data manipulation1182* statements within a transaction.1183*1184* @return {@code true} if so; {@code false} otherwise1185* @throws SQLException if a database access error occurs1186*/1187boolean supportsDataManipulationTransactionsOnly()1188throws SQLException;11891190/**1191* Retrieves whether a data definition statement within a transaction forces1192* the transaction to commit.1193*1194* @return {@code true} if so; {@code false} otherwise1195* @throws SQLException if a database access error occurs1196*/1197boolean dataDefinitionCausesTransactionCommit()1198throws SQLException;11991200/**1201* Retrieves whether this database ignores a data definition statement1202* within a transaction.1203*1204* @return {@code true} if so; {@code false} otherwise1205* @throws SQLException if a database access error occurs1206*/1207boolean dataDefinitionIgnoredInTransactions()1208throws SQLException;12091210/**1211* Retrieves a description of the stored procedures available in the given1212* catalog.1213* <P>1214* Only procedure descriptions matching the schema and1215* procedure name criteria are returned. They are ordered by1216* {@code PROCEDURE_CAT}, {@code PROCEDURE_SCHEM},1217* {@code PROCEDURE_NAME} and {@code SPECIFIC_ NAME}.1218*1219* <P>Each procedure description has the following columns:1220* <OL>1221* <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be {@code null})1222* <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be {@code null})1223* <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name1224* <LI> reserved for future use1225* <LI> reserved for future use1226* <LI> reserved for future use1227* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the procedure1228* <LI><B>PROCEDURE_TYPE</B> short {@code =>} kind of procedure:1229* <UL>1230* <LI> procedureResultUnknown - Cannot determine if a return value1231* will be returned1232* <LI> procedureNoResult - Does not return a return value1233* <LI> procedureReturnsResult - Returns a return value1234* </UL>1235* <LI><B>SPECIFIC_NAME</B> String {@code =>} The name which uniquely identifies this1236* procedure within its schema.1237* </OL>1238* <p>1239* A user may not have permissions to execute any of the procedures that are1240* returned by {@code getProcedures}1241*1242* @param catalog a catalog name; must match the catalog name as it1243* is stored in the database; "" retrieves those without a catalog;1244* {@code null} means that the catalog name should not be used to narrow1245* the search1246* @param schemaPattern a schema name pattern; must match the schema name1247* as it is stored in the database; "" retrieves those without a schema;1248* {@code null} means that the schema name should not be used to narrow1249* the search1250* @param procedureNamePattern a procedure name pattern; must match the1251* procedure name as it is stored in the database1252* @return {@code ResultSet} - each row is a procedure description1253* @throws SQLException if a database access error occurs1254* @see #getSearchStringEscape1255*/1256ResultSet getProcedures(String catalog, String schemaPattern,1257String procedureNamePattern) throws SQLException;12581259/**1260* Indicates that it is not known whether the procedure returns1261* a result.1262* <P>1263* A possible value for column {@code PROCEDURE_TYPE} in the1264* {@code ResultSet} object returned by the method1265* {@code getProcedures}.1266*/1267int procedureResultUnknown = 0;12681269/**1270* Indicates that the procedure does not return a result.1271* <P>1272* A possible value for column {@code PROCEDURE_TYPE} in the1273* {@code ResultSet} object returned by the method1274* {@code getProcedures}.1275*/1276int procedureNoResult = 1;12771278/**1279* Indicates that the procedure returns a result.1280* <P>1281* A possible value for column {@code PROCEDURE_TYPE} in the1282* {@code ResultSet} object returned by the method1283* {@code getProcedures}.1284*/1285int procedureReturnsResult = 2;12861287/**1288* Retrieves a description of the given catalog's stored procedure parameter1289* and result columns.1290*1291* <P>Only descriptions matching the schema, procedure and1292* parameter name criteria are returned. They are ordered by1293* PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_NAME. Within this, the return value,1294* if any, is first. Next are the parameter descriptions in call1295* order. The column descriptions follow in column number order.1296*1297* <P>Each row in the {@code ResultSet} is a parameter description or1298* column description with the following fields:1299* <OL>1300* <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be {@code null})1301* <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be {@code null})1302* <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name1303* <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name1304* <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter:1305* <UL>1306* <LI> procedureColumnUnknown - nobody knows1307* <LI> procedureColumnIn - IN parameter1308* <LI> procedureColumnInOut - INOUT parameter1309* <LI> procedureColumnOut - OUT parameter1310* <LI> procedureColumnReturn - procedure return value1311* <LI> procedureColumnResult - result column in {@code ResultSet}1312* </UL>1313* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types1314* <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the1315* type name is fully qualified1316* <LI><B>PRECISION</B> int {@code =>} precision1317* <LI><B>LENGTH</B> int {@code =>} length in bytes of data1318* <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where1319* SCALE is not applicable.1320* <LI><B>RADIX</B> short {@code =>} radix1321* <LI><B>NULLABLE</B> short {@code =>} can it contain NULL.1322* <UL>1323* <LI> procedureNoNulls - does not allow NULL values1324* <LI> procedureNullable - allows NULL values1325* <LI> procedureNullableUnknown - nullability unknown1326* </UL>1327* <LI><B>REMARKS</B> String {@code =>} comment describing parameter/column1328* <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})1329* <UL>1330* <LI> The string NULL (not enclosed in quotes) - if NULL was specified as the default value1331* <LI> TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation1332* <LI> NULL - if a default value was not specified1333* </UL>1334* <LI><B>SQL_DATA_TYPE</B> int {@code =>} reserved for future use1335* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} reserved for future use1336* <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 a1337* NULL1338* <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 01339*is returned if this row describes the procedure's return value. For result set columns, it is the1340*ordinal position of the column in the result set starting from 1. If there are1341*multiple result sets, the column ordinal positions are implementation1342* defined.1343* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.1344* <UL>1345* <LI> YES --- if the column can include NULLs1346* <LI> NO --- if the column cannot include NULLs1347* <LI> empty string --- if the nullability for the1348* column is unknown1349* </UL>1350* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies this procedure within its schema.1351* </OL>1352*1353* <P><B>Note:</B> Some databases may not return the column1354* descriptions for a procedure.1355*1356* <p>The PRECISION column represents the specified column size for the given column.1357* For numeric data, this is the maximum precision. For character data, this is the length in characters.1358* For datetime datatypes, this is the length in characters of the String representation (assuming the1359* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1360* this is the length in bytes. Null is returned for data types where the1361* column size is not applicable.1362* @param catalog a catalog name; must match the catalog name as it1363* is stored in the database; "" retrieves those without a catalog;1364* {@code null} means that the catalog name should not be used to narrow1365* the search1366* @param schemaPattern a schema name pattern; must match the schema name1367* as it is stored in the database; "" retrieves those without a schema;1368* {@code null} means that the schema name should not be used to narrow1369* the search1370* @param procedureNamePattern a procedure name pattern; must match the1371* procedure name as it is stored in the database1372* @param columnNamePattern a column name pattern; must match the column name1373* as it is stored in the database1374* @return {@code ResultSet} - each row describes a stored procedure parameter or1375* column1376* @throws SQLException if a database access error occurs1377* @see #getSearchStringEscape1378*/1379ResultSet getProcedureColumns(String catalog,1380String schemaPattern,1381String procedureNamePattern,1382String columnNamePattern) throws SQLException;13831384/**1385* Indicates that type of the column is unknown.1386* <P>1387* A possible value for the column1388* {@code COLUMN_TYPE}1389* in the {@code ResultSet}1390* returned by the method {@code getProcedureColumns}.1391*/1392int procedureColumnUnknown = 0;13931394/**1395* Indicates that the column stores IN parameters.1396* <P>1397* A possible value for the column1398* {@code COLUMN_TYPE}1399* in the {@code ResultSet}1400* returned by the method {@code getProcedureColumns}.1401*/1402int procedureColumnIn = 1;14031404/**1405* Indicates that the column stores INOUT parameters.1406* <P>1407* A possible value for the column1408* {@code COLUMN_TYPE}1409* in the {@code ResultSet}1410* returned by the method {@code getProcedureColumns}.1411*/1412int procedureColumnInOut = 2;14131414/**1415* Indicates that the column stores OUT parameters.1416* <P>1417* A possible value for the column1418* {@code COLUMN_TYPE}1419* in the {@code ResultSet}1420* returned by the method {@code getProcedureColumns}.1421*/1422int procedureColumnOut = 4;1423/**1424* Indicates that the column stores return values.1425* <P>1426* A possible value for the column1427* {@code COLUMN_TYPE}1428* in the {@code ResultSet}1429* returned by the method {@code getProcedureColumns}.1430*/1431int procedureColumnReturn = 5;14321433/**1434* Indicates that the column stores results.1435* <P>1436* A possible value for the column1437* {@code COLUMN_TYPE}1438* in the {@code ResultSet}1439* returned by the method {@code getProcedureColumns}.1440*/1441int procedureColumnResult = 3;14421443/**1444* Indicates that {@code NULL} values are not allowed.1445* <P>1446* A possible value for the column1447* {@code NULLABLE}1448* in the {@code ResultSet} object1449* returned by the method {@code getProcedureColumns}.1450*/1451int procedureNoNulls = 0;14521453/**1454* Indicates that {@code NULL} values are allowed.1455* <P>1456* A possible value for the column1457* {@code NULLABLE}1458* in the {@code ResultSet} object1459* returned by the method {@code getProcedureColumns}.1460*/1461int procedureNullable = 1;14621463/**1464* Indicates that whether {@code NULL} values are allowed1465* is unknown.1466* <P>1467* A possible value for the column1468* {@code NULLABLE}1469* in the {@code ResultSet} object1470* returned by the method {@code getProcedureColumns}.1471*/1472int procedureNullableUnknown = 2;147314741475/**1476* Retrieves a description of the tables available in the given catalog.1477* Only table descriptions matching the catalog, schema, table1478* name and type criteria are returned. They are ordered by1479* {@code TABLE_TYPE}, {@code TABLE_CAT},1480* {@code TABLE_SCHEM} and {@code TABLE_NAME}.1481* <P>1482* Each table description has the following columns:1483* <OL>1484* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})1485* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})1486* <LI><B>TABLE_NAME</B> String {@code =>} table name1487* <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE",1488* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",1489* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".1490* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the table (may be {@code null})1491* <LI><B>TYPE_CAT</B> String {@code =>} the types catalog (may be {@code null})1492* <LI><B>TYPE_SCHEM</B> String {@code =>} the types schema (may be {@code null})1493* <LI><B>TYPE_NAME</B> String {@code =>} type name (may be {@code null})1494* <LI><B>SELF_REFERENCING_COL_NAME</B> String {@code =>} name of the designated1495* "identifier" column of a typed table (may be {@code null})1496* <LI><B>REF_GENERATION</B> String {@code =>} specifies how values in1497* SELF_REFERENCING_COL_NAME are created. Values are1498* "SYSTEM", "USER", "DERIVED". (may be {@code null})1499* </OL>1500*1501* <P><B>Note:</B> Some databases may not return information for1502* all tables.1503*1504* @param catalog a catalog name; must match the catalog name as it1505* is stored in the database; "" retrieves those without a catalog;1506* {@code null} means that the catalog name should not be used to narrow1507* the search1508* @param schemaPattern a schema name pattern; must match the schema name1509* as it is stored in the database; "" retrieves those without a schema;1510* {@code null} means that the schema name should not be used to narrow1511* the search1512* @param tableNamePattern a table name pattern; must match the1513* table name as it is stored in the database1514* @param types a list of table types, which must be from the list of table types1515* returned from {@link #getTableTypes},to include; {@code null} returns1516* all types1517* @return {@code ResultSet} - each row is a table description1518* @throws SQLException if a database access error occurs1519* @see #getSearchStringEscape1520*/1521ResultSet getTables(String catalog, String schemaPattern,1522String tableNamePattern, String types[]) throws SQLException;15231524/**1525* Retrieves the schema names available in this database. The results1526* are ordered by {@code TABLE_CATALOG} and1527* {@code TABLE_SCHEM}.1528*1529* <P>The schema columns are:1530* <OL>1531* <LI><B>TABLE_SCHEM</B> String {@code =>} schema name1532* <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be {@code null})1533* </OL>1534*1535* @return a {@code ResultSet} object in which each row is a1536* schema description1537* @throws SQLException if a database access error occurs1538*1539*/1540ResultSet getSchemas() throws SQLException;15411542/**1543* Retrieves the catalog names available in this database. The results1544* are ordered by catalog name.1545*1546* <P>The catalog column is:1547* <OL>1548* <LI><B>TABLE_CAT</B> String {@code =>} catalog name1549* </OL>1550*1551* @return a {@code ResultSet} object in which each row has a1552* single {@code String} column that is a catalog name1553* @throws SQLException if a database access error occurs1554*/1555ResultSet getCatalogs() throws SQLException;15561557/**1558* Retrieves the table types available in this database. The results1559* are ordered by table type.1560*1561* <P>The table type is:1562* <OL>1563* <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE",1564* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",1565* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".1566* </OL>1567*1568* @return a {@code ResultSet} object in which each row has a1569* single {@code String} column that is a table type1570* @throws SQLException if a database access error occurs1571*/1572ResultSet getTableTypes() throws SQLException;15731574/**1575* Retrieves a description of table columns available in1576* the specified catalog.1577*1578* <P>Only column descriptions matching the catalog, schema, table1579* and column name criteria are returned. They are ordered by1580* {@code TABLE_CAT},{@code TABLE_SCHEM},1581* {@code TABLE_NAME}, and {@code ORDINAL_POSITION}.1582*1583* <P>Each column description has the following columns:1584* <OL>1585* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})1586* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})1587* <LI><B>TABLE_NAME</B> String {@code =>} table name1588* <LI><B>COLUMN_NAME</B> String {@code =>} column name1589* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types1590* <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name,1591* for a UDT the type name is fully qualified1592* <LI><B>COLUMN_SIZE</B> int {@code =>} column size.1593* <LI><B>BUFFER_LENGTH</B> is not used.1594* <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where1595* DECIMAL_DIGITS is not applicable.1596* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)1597* <LI><B>NULLABLE</B> int {@code =>} is NULL allowed.1598* <UL>1599* <LI> columnNoNulls - might not allow {@code NULL} values1600* <LI> columnNullable - definitely allows {@code NULL} values1601* <LI> columnNullableUnknown - nullability unknown1602* </UL>1603* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be {@code null})1604* <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})1605* <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused1606* <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused1607* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the1608* maximum number of bytes in the column1609* <LI><B>ORDINAL_POSITION</B> int {@code =>} index of column in table1610* (starting at 1)1611* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.1612* <UL>1613* <LI> YES --- if the column can include NULLs1614* <LI> NO --- if the column cannot include NULLs1615* <LI> empty string --- if the nullability for the1616* column is unknown1617* </UL>1618* <LI><B>SCOPE_CATALOG</B> String {@code =>} catalog of table that is the scope1619* of a reference attribute ({@code null} if DATA_TYPE isn't REF)1620* <LI><B>SCOPE_SCHEMA</B> String {@code =>} schema of table that is the scope1621* of a reference attribute ({@code null} if the DATA_TYPE isn't REF)1622* <LI><B>SCOPE_TABLE</B> String {@code =>} table name that this the scope1623* of a reference attribute ({@code null} if the DATA_TYPE isn't REF)1624* <LI><B>SOURCE_DATA_TYPE</B> short {@code =>} source type of a distinct type or user-generated1625* Ref type, SQL type from java.sql.Types ({@code null} if DATA_TYPE1626* isn't DISTINCT or user-generated REF)1627* <LI><B>IS_AUTOINCREMENT</B> String {@code =>} Indicates whether this column is auto incremented1628* <UL>1629* <LI> YES --- if the column is auto incremented1630* <LI> NO --- if the column is not auto incremented1631* <LI> empty string --- if it cannot be determined whether the column is auto incremented1632* </UL>1633* <LI><B>IS_GENERATEDCOLUMN</B> String {@code =>} Indicates whether this is a generated column1634* <UL>1635* <LI> YES --- if this a generated column1636* <LI> NO --- if this not a generated column1637* <LI> empty string --- if it cannot be determined whether this is a generated column1638* </UL>1639* </OL>1640*1641* <p>The COLUMN_SIZE column specifies the column size for the given column.1642* For numeric data, this is the maximum precision. For character data, this is the length in characters.1643* For datetime datatypes, this is the length in characters of the String representation (assuming the1644* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1645* this is the length in bytes. Null is returned for data types where the1646* column size is not applicable.1647*1648* @param catalog a catalog name; must match the catalog name as it1649* is stored in the database; "" retrieves those without a catalog;1650* {@code null} means that the catalog name should not be used to narrow1651* the search1652* @param schemaPattern a schema name pattern; must match the schema name1653* as it is stored in the database; "" retrieves those without a schema;1654* {@code null} means that the schema name should not be used to narrow1655* the search1656* @param tableNamePattern a table name pattern; must match the1657* table name as it is stored in the database1658* @param columnNamePattern a column name pattern; must match the column1659* name as it is stored in the database1660* @return {@code ResultSet} - each row is a column description1661* @throws SQLException if a database access error occurs1662* @see #getSearchStringEscape1663*/1664ResultSet getColumns(String catalog, String schemaPattern,1665String tableNamePattern, String columnNamePattern)1666throws SQLException;16671668/**1669* Indicates that the column might not allow {@code NULL} values.1670* <P>1671* A possible value for the column1672* {@code NULLABLE}1673* in the {@code ResultSet} returned by the method1674* {@code getColumns}.1675*/1676int columnNoNulls = 0;16771678/**1679* Indicates that the column definitely allows {@code NULL} values.1680* <P>1681* A possible value for the column1682* {@code NULLABLE}1683* in the {@code ResultSet} returned by the method1684* {@code getColumns}.1685*/1686int columnNullable = 1;16871688/**1689* Indicates that the nullability of columns is unknown.1690* <P>1691* A possible value for the column1692* {@code NULLABLE}1693* in the {@code ResultSet} returned by the method1694* {@code getColumns}.1695*/1696int columnNullableUnknown = 2;16971698/**1699* Retrieves a description of the access rights for a table's columns.1700*1701* <P>Only privileges matching the column name criteria are1702* returned. They are ordered by COLUMN_NAME and PRIVILEGE.1703*1704* <P>Each privilege description has the following columns:1705* <OL>1706* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})1707* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})1708* <LI><B>TABLE_NAME</B> String {@code =>} table name1709* <LI><B>COLUMN_NAME</B> String {@code =>} column name1710* <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be {@code null})1711* <LI><B>GRANTEE</B> String {@code =>} grantee of access1712* <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,1713* INSERT, UPDATE, REFERENCES, ...)1714* <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted1715* to grant to others; "NO" if not; {@code null} if unknown1716* </OL>1717*1718* @param catalog a catalog name; must match the catalog name as it1719* is stored in the database; "" retrieves those without a catalog;1720* {@code null} means that the catalog name should not be used to narrow1721* the search1722* @param schema a schema name; must match the schema name as it is1723* stored in the database; "" retrieves those without a schema;1724* {@code null} means that the schema name should not be used to narrow1725* the search1726* @param table a table name; must match the table name as it is1727* stored in the database1728* @param columnNamePattern a column name pattern; must match the column1729* name as it is stored in the database1730* @return {@code ResultSet} - each row is a column privilege description1731* @throws SQLException if a database access error occurs1732* @see #getSearchStringEscape1733*/1734ResultSet getColumnPrivileges(String catalog, String schema,1735String table, String columnNamePattern) throws SQLException;17361737/**1738* Retrieves a description of the access rights for each table available1739* in a catalog. Note that a table privilege applies to one or1740* more columns in the table. It would be wrong to assume that1741* this privilege applies to all columns (this may be true for1742* some systems but is not true for all.)1743*1744* <P>Only privileges matching the schema and table name1745* criteria are returned. They are ordered by1746* {@code TABLE_CAT},1747* {@code TABLE_SCHEM}, {@code TABLE_NAME},1748* and {@code PRIVILEGE}.1749*1750* <P>Each privilege description has the following columns:1751* <OL>1752* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})1753* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})1754* <LI><B>TABLE_NAME</B> String {@code =>} table name1755* <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be {@code null})1756* <LI><B>GRANTEE</B> String {@code =>} grantee of access1757* <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,1758* INSERT, UPDATE, REFERENCES, ...)1759* <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted1760* to grant to others; "NO" if not; {@code null} if unknown1761* </OL>1762*1763* @param catalog a catalog name; must match the catalog name as it1764* is stored in the database; "" retrieves those without a catalog;1765* {@code null} means that the catalog name should not be used to narrow1766* the search1767* @param schemaPattern a schema name pattern; must match the schema name1768* as it is stored in the database; "" retrieves those without a schema;1769* {@code null} means that the schema name should not be used to narrow1770* the search1771* @param tableNamePattern a table name pattern; must match the1772* table name as it is stored in the database1773* @return {@code ResultSet} - each row is a table privilege description1774* @throws SQLException if a database access error occurs1775* @see #getSearchStringEscape1776*/1777ResultSet getTablePrivileges(String catalog, String schemaPattern,1778String tableNamePattern) throws SQLException;17791780/**1781* Retrieves a description of a table's optimal set of columns that1782* uniquely identifies a row. They are ordered by SCOPE.1783*1784* <P>Each column description has the following columns:1785* <OL>1786* <LI><B>SCOPE</B> short {@code =>} actual scope of result1787* <UL>1788* <LI> bestRowTemporary - very temporary, while using row1789* <LI> bestRowTransaction - valid for remainder of current transaction1790* <LI> bestRowSession - valid for remainder of current session1791* </UL>1792* <LI><B>COLUMN_NAME</B> String {@code =>} column name1793* <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from java.sql.Types1794* <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name,1795* for a UDT the type name is fully qualified1796* <LI><B>COLUMN_SIZE</B> int {@code =>} precision1797* <LI><B>BUFFER_LENGTH</B> int {@code =>} not used1798* <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where1799* DECIMAL_DIGITS is not applicable.1800* <LI><B>PSEUDO_COLUMN</B> short {@code =>} is this a pseudo column1801* like an Oracle ROWID1802* <UL>1803* <LI> bestRowUnknown - may or may not be pseudo column1804* <LI> bestRowNotPseudo - is NOT a pseudo column1805* <LI> bestRowPseudo - is a pseudo column1806* </UL>1807* </OL>1808*1809* <p>The COLUMN_SIZE column represents the specified column size for the given column.1810* For numeric data, this is the maximum precision. For character data, this is the length in characters.1811* For datetime datatypes, this is the length in characters of the String representation (assuming the1812* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1813* this is the length in bytes. Null is returned for data types where the1814* column size is not applicable.1815*1816* @param catalog a catalog name; must match the catalog name as it1817* is stored in the database; "" retrieves those without a catalog;1818* {@code null} means that the catalog name should not be used to narrow1819* the search1820* @param schema a schema name; must match the schema name1821* as it is stored in the database; "" retrieves those without a schema;1822* {@code null} means that the schema name should not be used to narrow1823* the search1824* @param table a table name; must match the table name as it is stored1825* in the database1826* @param scope the scope of interest; use same values as SCOPE1827* @param nullable include columns that are nullable.1828* @return {@code ResultSet} - each row is a column description1829* @throws SQLException if a database access error occurs1830*/1831ResultSet getBestRowIdentifier(String catalog, String schema,1832String table, int scope, boolean nullable) throws SQLException;18331834/**1835* Indicates that the scope of the best row identifier is1836* very temporary, lasting only while the1837* row is being used.1838* <P>1839* A possible value for the column1840* {@code SCOPE}1841* in the {@code ResultSet} object1842* returned by the method {@code getBestRowIdentifier}.1843*/1844int bestRowTemporary = 0;18451846/**1847* Indicates that the scope of the best row identifier is1848* the remainder of the current transaction.1849* <P>1850* A possible value for the column1851* {@code SCOPE}1852* in the {@code ResultSet} object1853* returned by the method {@code getBestRowIdentifier}.1854*/1855int bestRowTransaction = 1;18561857/**1858* Indicates that the scope of the best row identifier is1859* the remainder of the current session.1860* <P>1861* A possible value for the column1862* {@code SCOPE}1863* in the {@code ResultSet} object1864* returned by the method {@code getBestRowIdentifier}.1865*/1866int bestRowSession = 2;18671868/**1869* Indicates that the best row identifier may or may not be a pseudo column.1870* <P>1871* A possible value for the column1872* {@code PSEUDO_COLUMN}1873* in the {@code ResultSet} object1874* returned by the method {@code getBestRowIdentifier}.1875*/1876int bestRowUnknown = 0;18771878/**1879* Indicates that the best row identifier is NOT a pseudo column.1880* <P>1881* A possible value for the column1882* {@code PSEUDO_COLUMN}1883* in the {@code ResultSet} object1884* returned by the method {@code getBestRowIdentifier}.1885*/1886int bestRowNotPseudo = 1;18871888/**1889* Indicates that the best row identifier is a pseudo column.1890* <P>1891* A possible value for the column1892* {@code PSEUDO_COLUMN}1893* in the {@code ResultSet} object1894* returned by the method {@code getBestRowIdentifier}.1895*/1896int bestRowPseudo = 2;18971898/**1899* Retrieves a description of a table's columns that are automatically1900* updated when any value in a row is updated. They are1901* unordered.1902*1903* <P>Each column description has the following columns:1904* <OL>1905* <LI><B>SCOPE</B> short {@code =>} is not used1906* <LI><B>COLUMN_NAME</B> String {@code =>} column name1907* <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from {@code java.sql.Types}1908* <LI><B>TYPE_NAME</B> String {@code =>} Data source-dependent type name1909* <LI><B>COLUMN_SIZE</B> int {@code =>} precision1910* <LI><B>BUFFER_LENGTH</B> int {@code =>} length of column value in bytes1911* <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where1912* DECIMAL_DIGITS is not applicable.1913* <LI><B>PSEUDO_COLUMN</B> short {@code =>} whether this is pseudo column1914* like an Oracle ROWID1915* <UL>1916* <LI> versionColumnUnknown - may or may not be pseudo column1917* <LI> versionColumnNotPseudo - is NOT a pseudo column1918* <LI> versionColumnPseudo - is a pseudo column1919* </UL>1920* </OL>1921*1922* <p>The COLUMN_SIZE column represents the specified column size for the given column.1923* For numeric data, this is the maximum precision. For character data, this is the length in characters.1924* For datetime datatypes, this is the length in characters of the String representation (assuming the1925* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,1926* this is the length in bytes. Null is returned for data types where the1927* column size is not applicable.1928* @param catalog a catalog name; must match the catalog name as it1929* is stored in the database; "" retrieves those without a catalog;1930* {@code null} means that the catalog name should not be used to narrow1931* the search1932* @param schema a schema name; must match the schema name1933* as it is stored in the database; "" retrieves those without a schema;1934* {@code null} means that the schema name should not be used to narrow1935* the search1936* @param table a table name; must match the table name as it is stored1937* in the database1938* @return a {@code ResultSet} object in which each row is a1939* column description1940* @throws SQLException if a database access error occurs1941*/1942ResultSet getVersionColumns(String catalog, String schema,1943String table) throws SQLException;19441945/**1946* Indicates that this version column may or may not be a pseudo column.1947* <P>1948* A possible value for the column1949* {@code PSEUDO_COLUMN}1950* in the {@code ResultSet} object1951* returned by the method {@code getVersionColumns}.1952*/1953int versionColumnUnknown = 0;19541955/**1956* Indicates that this version column is NOT a pseudo column.1957* <P>1958* A possible value for the column1959* {@code PSEUDO_COLUMN}1960* in the {@code ResultSet} object1961* returned by the method {@code getVersionColumns}.1962*/1963int versionColumnNotPseudo = 1;19641965/**1966* Indicates that this version column is a pseudo column.1967* <P>1968* A possible value for the column1969* {@code PSEUDO_COLUMN}1970* in the {@code ResultSet} object1971* returned by the method {@code getVersionColumns}.1972*/1973int versionColumnPseudo = 2;19741975/**1976* Retrieves a description of the given table's primary key columns. They1977* are ordered by COLUMN_NAME.1978*1979* <P>Each primary key column description has the following columns:1980* <OL>1981* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})1982* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})1983* <LI><B>TABLE_NAME</B> String {@code =>} table name1984* <LI><B>COLUMN_NAME</B> String {@code =>} column name1985* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within primary key( a value1986* of 1 represents the first column of the primary key, a value of 2 would1987* represent the second column within the primary key).1988* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be {@code null})1989* </OL>1990*1991* @param catalog a catalog name; must match the catalog name as it1992* is stored in the database; "" retrieves those without a catalog;1993* {@code null} means that the catalog name should not be used to narrow1994* the search1995* @param schema a schema name; must match the schema name1996* as it is stored in the database; "" retrieves those without a schema;1997* {@code null} means that the schema name should not be used to narrow1998* the search1999* @param table a table name; must match the table name as it is stored2000* in the database2001* @return {@code ResultSet} - each row is a primary key column description2002* @throws SQLException if a database access error occurs2003*/2004ResultSet getPrimaryKeys(String catalog, String schema,2005String table) throws SQLException;20062007/**2008* Retrieves a description of the primary key columns that are2009* referenced by the given table's foreign key columns (the primary keys2010* imported by a table). They are ordered by PKTABLE_CAT,2011* PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.2012*2013* <P>Each primary key column description has the following columns:2014* <OL>2015* <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog2016* being imported (may be {@code null})2017* <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema2018* being imported (may be {@code null})2019* <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name2020* being imported2021* <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name2022* being imported2023* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be {@code null})2024* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be {@code null})2025* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2026* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2027* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within a foreign key( a value2028* of 1 represents the first column of the foreign key, a value of 2 would2029* represent the second column within the foreign key).2030* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to a2031* foreign key when the primary key is updated:2032* <UL>2033* <LI> importedNoAction - do not allow update of primary2034* key if it has been imported2035* <LI> importedKeyCascade - change imported key to agree2036* with primary key update2037* <LI> importedKeySetNull - change imported key to {@code NULL}2038* if its primary key has been updated2039* <LI> importedKeySetDefault - change imported key to default values2040* if its primary key has been updated2041* <LI> importedKeyRestrict - same as importedKeyNoAction2042* (for ODBC 2.x compatibility)2043* </UL>2044* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2045* the foreign key when primary is deleted.2046* <UL>2047* <LI> importedKeyNoAction - do not allow delete of primary2048* key if it has been imported2049* <LI> importedKeyCascade - delete rows that import a deleted key2050* <LI> importedKeySetNull - change imported key to NULL if2051* its primary key has been deleted2052* <LI> importedKeyRestrict - same as importedKeyNoAction2053* (for ODBC 2.x compatibility)2054* <LI> importedKeySetDefault - change imported key to default if2055* its primary key has been deleted2056* </UL>2057* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be {@code null})2058* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be {@code null})2059* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2060* constraints be deferred until commit2061* <UL>2062* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2063* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2064* <LI> importedKeyNotDeferrable - see SQL92 for definition2065* </UL>2066* </OL>2067*2068* @param catalog a catalog name; must match the catalog name as it2069* is stored in the database; "" retrieves those without a catalog;2070* {@code null} means that the catalog name should not be used to narrow2071* the search2072* @param schema a schema name; must match the schema name2073* as it is stored in the database; "" retrieves those without a schema;2074* {@code null} means that the schema name should not be used to narrow2075* the search2076* @param table a table name; must match the table name as it is stored2077* in the database2078* @return {@code ResultSet} - each row is a primary key column description2079* @throws SQLException if a database access error occurs2080* @see #getExportedKeys2081*/2082ResultSet getImportedKeys(String catalog, String schema,2083String table) throws SQLException;20842085/**2086* For the column {@code UPDATE_RULE},2087* indicates that2088* when the primary key is updated, the foreign key (imported key)2089* is changed to agree with it.2090* For the column {@code DELETE_RULE},2091* it indicates that2092* when the primary key is deleted, rows that imported that key2093* are deleted.2094* <P>2095* A possible value for the columns {@code UPDATE_RULE}2096* and {@code DELETE_RULE} in the2097* {@code ResultSet} objects returned by the methods2098* {@code getImportedKeys}, {@code getExportedKeys},2099* and {@code getCrossReference}.2100*/2101int importedKeyCascade = 0;21022103/**2104* For the column {@code UPDATE_RULE}, indicates that2105* a primary key may not be updated if it has been imported by2106* another table as a foreign key.2107* For the column {@code DELETE_RULE}, indicates that2108* a primary key may not be deleted if it has been imported by2109* another table as a foreign key.2110* <P>2111* A possible value for the columns {@code UPDATE_RULE}2112* and {@code DELETE_RULE} in the2113* {@code ResultSet} objects returned by the methods2114* {@code getImportedKeys}, {@code getExportedKeys},2115* and {@code getCrossReference}.2116*/2117int importedKeyRestrict = 1;21182119/**2120* For the columns {@code UPDATE_RULE}2121* and {@code DELETE_RULE}, indicates that2122* when the primary key is updated or deleted, the foreign key (imported key)2123* is changed to {@code NULL}.2124* <P>2125* A possible value for the columns {@code UPDATE_RULE}2126* and {@code DELETE_RULE} in the2127* {@code ResultSet} objects returned by the methods2128* {@code getImportedKeys}, {@code getExportedKeys},2129* and {@code getCrossReference}.2130*/2131int importedKeySetNull = 2;21322133/**2134* For the columns {@code UPDATE_RULE}2135* and {@code DELETE_RULE}, indicates that2136* if the primary key has been imported, it cannot be updated or deleted.2137* <P>2138* A possible value for the columns {@code UPDATE_RULE}2139* and {@code DELETE_RULE} in the2140* {@code ResultSet} objects returned by the methods2141* {@code getImportedKeys}, {@code getExportedKeys},2142* and {@code getCrossReference}.2143*/2144int importedKeyNoAction = 3;21452146/**2147* For the columns {@code UPDATE_RULE}2148* and {@code DELETE_RULE}, indicates that2149* if the primary key is updated or deleted, the foreign key (imported key)2150* is set to the default value.2151* <P>2152* A possible value for the columns {@code UPDATE_RULE}2153* and {@code DELETE_RULE} in the2154* {@code ResultSet} objects returned by the methods2155* {@code getImportedKeys}, {@code getExportedKeys},2156* and {@code getCrossReference}.2157*/2158int importedKeySetDefault = 4;21592160/**2161* Indicates deferrability. See SQL-92 for a definition.2162* <P>2163* A possible value for the column {@code DEFERRABILITY}2164* in the {@code ResultSet} objects returned by the methods2165* {@code getImportedKeys}, {@code getExportedKeys},2166* and {@code getCrossReference}.2167*/2168int importedKeyInitiallyDeferred = 5;21692170/**2171* Indicates deferrability. See SQL-92 for a definition.2172* <P>2173* A possible value for the column {@code DEFERRABILITY}2174* in the {@code ResultSet} objects returned by the methods2175* {@code getImportedKeys}, {@code getExportedKeys},2176* and {@code getCrossReference}.2177*/2178int importedKeyInitiallyImmediate = 6;21792180/**2181* Indicates deferrability. See SQL-92 for a definition.2182* <P>2183* A possible value for the column {@code DEFERRABILITY}2184* in the {@code ResultSet} objects returned by the methods2185* {@code getImportedKeys}, {@code getExportedKeys},2186* and {@code getCrossReference}.2187*/2188int importedKeyNotDeferrable = 7;21892190/**2191* Retrieves a description of the foreign key columns that reference the2192* given table's primary key columns (the foreign keys exported by a2193* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,2194* FKTABLE_NAME, and KEY_SEQ.2195*2196* <P>Each foreign key column description has the following columns:2197* <OL>2198* <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog (may be {@code null})2199* <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema (may be {@code null})2200* <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name2201* <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name2202* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be {@code null})2203* being exported (may be {@code null})2204* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be {@code null})2205* being exported (may be {@code null})2206* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2207* being exported2208* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2209* being exported2210* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value2211* of 1 represents the first column of the foreign key, a value of 2 would2212* represent the second column within the foreign key).2213* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to2214* foreign key when primary is updated:2215* <UL>2216* <LI> importedNoAction - do not allow update of primary2217* key if it has been imported2218* <LI> importedKeyCascade - change imported key to agree2219* with primary key update2220* <LI> importedKeySetNull - change imported key to {@code NULL} if2221* its primary key has been updated2222* <LI> importedKeySetDefault - change imported key to default values2223* if its primary key has been updated2224* <LI> importedKeyRestrict - same as importedKeyNoAction2225* (for ODBC 2.x compatibility)2226* </UL>2227* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2228* the foreign key when primary is deleted.2229* <UL>2230* <LI> importedKeyNoAction - do not allow delete of primary2231* key if it has been imported2232* <LI> importedKeyCascade - delete rows that import a deleted key2233* <LI> importedKeySetNull - change imported key to {@code NULL} if2234* its primary key has been deleted2235* <LI> importedKeyRestrict - same as importedKeyNoAction2236* (for ODBC 2.x compatibility)2237* <LI> importedKeySetDefault - change imported key to default if2238* its primary key has been deleted2239* </UL>2240* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be {@code null})2241* <LI><B>PK_NAME</B> String {@code =>} primary key name (may be {@code null})2242* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2243* constraints be deferred until commit2244* <UL>2245* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2246* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2247* <LI> importedKeyNotDeferrable - see SQL92 for definition2248* </UL>2249* </OL>2250*2251* @param catalog a catalog name; must match the catalog name as it2252* is stored in this database; "" retrieves those without a catalog;2253* {@code null} means that the catalog name should not be used to narrow2254* the search2255* @param schema a schema name; must match the schema name2256* as it is stored in the database; "" retrieves those without a schema;2257* {@code null} means that the schema name should not be used to narrow2258* the search2259* @param table a table name; must match the table name as it is stored2260* in this database2261* @return a {@code ResultSet} object in which each row is a2262* foreign key column description2263* @throws SQLException if a database access error occurs2264* @see #getImportedKeys2265*/2266ResultSet getExportedKeys(String catalog, String schema,2267String table) throws SQLException;22682269/**2270* Retrieves a description of the foreign key columns in the given foreign key2271* 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).2272* The number of columns returned from the parent table must match the number of2273* columns that make up the foreign key. They2274* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and2275* KEY_SEQ.2276*2277* <P>Each foreign key column description has the following columns:2278* <OL>2279* <LI><B>PKTABLE_CAT</B> String {@code =>} parent key table catalog (may be {@code null})2280* <LI><B>PKTABLE_SCHEM</B> String {@code =>} parent key table schema (may be {@code null})2281* <LI><B>PKTABLE_NAME</B> String {@code =>} parent key table name2282* <LI><B>PKCOLUMN_NAME</B> String {@code =>} parent key column name2283* <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be {@code null})2284* being exported (may be {@code null})2285* <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be {@code null})2286* being exported (may be {@code null})2287* <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name2288* being exported2289* <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name2290* being exported2291* <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value2292* of 1 represents the first column of the foreign key, a value of 2 would2293* represent the second column within the foreign key).2294* <LI><B>UPDATE_RULE</B> short {@code =>} What happens to2295* foreign key when parent key is updated:2296* <UL>2297* <LI> importedNoAction - do not allow update of parent2298* key if it has been imported2299* <LI> importedKeyCascade - change imported key to agree2300* with parent key update2301* <LI> importedKeySetNull - change imported key to {@code NULL} if2302* its parent key has been updated2303* <LI> importedKeySetDefault - change imported key to default values2304* if its parent key has been updated2305* <LI> importedKeyRestrict - same as importedKeyNoAction2306* (for ODBC 2.x compatibility)2307* </UL>2308* <LI><B>DELETE_RULE</B> short {@code =>} What happens to2309* the foreign key when parent key is deleted.2310* <UL>2311* <LI> importedKeyNoAction - do not allow delete of parent2312* key if it has been imported2313* <LI> importedKeyCascade - delete rows that import a deleted key2314* <LI> importedKeySetNull - change imported key to {@code NULL} if2315* its primary key has been deleted2316* <LI> importedKeyRestrict - same as importedKeyNoAction2317* (for ODBC 2.x compatibility)2318* <LI> importedKeySetDefault - change imported key to default if2319* its parent key has been deleted2320* </UL>2321* <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be {@code null})2322* <LI><B>PK_NAME</B> String {@code =>} parent key name (may be {@code null})2323* <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key2324* constraints be deferred until commit2325* <UL>2326* <LI> importedKeyInitiallyDeferred - see SQL92 for definition2327* <LI> importedKeyInitiallyImmediate - see SQL92 for definition2328* <LI> importedKeyNotDeferrable - see SQL92 for definition2329* </UL>2330* </OL>2331*2332* @param parentCatalog a catalog name; must match the catalog name2333* as it is stored in the database; "" retrieves those without a2334* catalog; {@code null} means drop catalog name from the selection criteria2335* @param parentSchema a schema name; must match the schema name as2336* it is stored in the database; "" retrieves those without a schema;2337* {@code null} means drop schema name from the selection criteria2338* @param parentTable the name of the table that exports the key; must match2339* the table name as it is stored in the database2340* @param foreignCatalog a catalog name; must match the catalog name as2341* it is stored in the database; "" retrieves those without a2342* catalog; {@code null} means drop catalog name from the selection criteria2343* @param foreignSchema a schema name; must match the schema name as it2344* is stored in the database; "" retrieves those without a schema;2345* {@code null} means drop schema name from the selection criteria2346* @param foreignTable the name of the table that imports the key; must match2347* the table name as it is stored in the database2348* @return {@code ResultSet} - each row is a foreign key column description2349* @throws SQLException if a database access error occurs2350* @see #getImportedKeys2351*/2352ResultSet getCrossReference(2353String parentCatalog, String parentSchema, String parentTable,2354String foreignCatalog, String foreignSchema, String foreignTable2355) throws SQLException;23562357/**2358* Retrieves a description of all the data types supported by2359* this database. They are ordered by DATA_TYPE and then by how2360* closely the data type maps to the corresponding JDBC SQL type.2361*2362* <P>If the database supports SQL distinct types, then getTypeInfo() will return2363* a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT.2364* If the database supports SQL structured types, then getTypeInfo() will return2365* a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT.2366*2367* <P>If SQL distinct or structured types are supported, then information on the2368* individual types may be obtained from the getUDTs() method.2369*2370*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})2378* <LI><B>LITERAL_SUFFIX</B> String {@code =>} suffix used to quote a literal2379* (may be {@code null})2380* <LI><B>CREATE_PARAMS</B> String {@code =>} parameters used in creating2381* the type (may be {@code null})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})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} object in which each row is an SQL2417* type description2418* @throws SQLException if a database access error occurs2419*/2420ResultSet getTypeInfo() throws SQLException;24212422/**2423* Indicates that a {@code NULL} value is NOT allowed for this2424* data type.2425* <P>2426* A possible value for column {@code NULLABLE} in the2427* {@code ResultSet} object returned by the method2428* {@code getTypeInfo}.2429*/2430int typeNoNulls = 0;24312432/**2433* Indicates that a {@code NULL} value is allowed for this2434* data type.2435* <P>2436* A possible value for column {@code NULLABLE} in the2437* {@code ResultSet} object returned by the method2438* {@code getTypeInfo}.2439*/2440int typeNullable = 1;24412442/**2443* Indicates that it is not known whether a {@code NULL} value2444* is allowed for this data type.2445* <P>2446* A possible value for column {@code NULLABLE} in the2447* {@code ResultSet} object returned by the method2448* {@code getTypeInfo}.2449*/2450int typeNullableUnknown = 2;24512452/**2453* Indicates that {@code WHERE} search clauses are not supported2454* for this type.2455* <P>2456* A possible value for column {@code SEARCHABLE} in the2457* {@code ResultSet} object returned by the method2458* {@code getTypeInfo}.2459*/2460int typePredNone = 0;24612462/**2463* Indicates that the data type2464* can be only be used in {@code WHERE} search clauses2465* that use {@code LIKE} predicates.2466* <P>2467* A possible value for column {@code SEARCHABLE} in the2468* {@code ResultSet} object returned by the method2469* {@code getTypeInfo}.2470*/2471int typePredChar = 1;24722473/**2474* Indicates that the data type can be only be used in {@code WHERE}2475* search clauses2476* that do not use {@code LIKE} predicates.2477* <P>2478* A possible value for column {@code SEARCHABLE} in the2479* {@code ResultSet} object returned by the method2480* {@code getTypeInfo}.2481*/2482int typePredBasic = 2;24832484/**2485* Indicates that all {@code WHERE} search clauses can be2486* based on this type.2487* <P>2488* A possible value for column {@code SEARCHABLE} in the2489* {@code ResultSet} object returned by the method2490* {@code getTypeInfo}.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})2501* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})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});2506* {@code null} when TYPE is tableIndexStatistic2507* <LI><B>INDEX_NAME</B> String {@code =>} index name; {@code null} 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 conjunction 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} 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} if sort sequence is not supported;2523* {@code null} 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 tableIndexStatistic 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})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} 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} 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} - each row is an index column description2550* @throws 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} in the2561* {@code ResultSet} object returned by the method2562* {@code getIndexInfo}.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} in the2570* {@code ResultSet} object returned by the method2571* {@code getIndexInfo}.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} in the2579* {@code ResultSet} object returned by the method2580* {@code getIndexInfo}.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} in the2590* {@code ResultSet} object returned by the method2591* {@code getIndexInfo}.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}2601* @return {@code true} if so; {@code false} otherwise2602* @throws 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}2613* @param concurrency type defined in {@code java.sql.ResultSet}2614* @return {@code true} if so; {@code false} otherwise2615* @throws 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} object,2625* the result set's own updates are visible.2626*2627* @param type the {@code ResultSet} type; one of2628* {@code ResultSet.TYPE_FORWARD_ONLY},2629* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2630* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2631* @return {@code true} if updates are visible for the given result set type;2632* {@code false} otherwise2633* @throws 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} type; one of2642* {@code ResultSet.TYPE_FORWARD_ONLY},2643* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2644* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2645* @return {@code true} if deletes are visible for the given result set type;2646* {@code false} otherwise2647* @throws 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} type; one of2656* {@code ResultSet.TYPE_FORWARD_ONLY},2657* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2658* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2659* @return {@code true} if inserts are visible for the given result set type;2660* {@code false} otherwise2661* @throws 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} type; one of2670* {@code ResultSet.TYPE_FORWARD_ONLY},2671* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2672* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2673* @return {@code true} if updates made by others2674* are visible for the given result set type;2675* {@code false} otherwise2676* @throws 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} type; one of2685* {@code ResultSet.TYPE_FORWARD_ONLY},2686* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2687* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2688* @return {@code true} if deletes made by others2689* are visible for the given result set type;2690* {@code false} otherwise2691* @throws 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} type; one of2700* {@code ResultSet.TYPE_FORWARD_ONLY},2701* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2702* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2703* @return {@code true} if inserts made by others2704* are visible for the given result set type;2705* {@code false} otherwise2706* @throws 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}.2714*2715* @param type the {@code ResultSet} type; one of2716* {@code ResultSet.TYPE_FORWARD_ONLY},2717* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2718* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2719* @return {@code true} if changes are detected by the result set type;2720* {@code false} otherwise2721* @throws 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}. If the method2729* {@code deletesAreDetected} returns {@code false}, it means that2730* deleted rows are removed from the result set.2731*2732* @param type the {@code ResultSet} type; one of2733* {@code ResultSet.TYPE_FORWARD_ONLY},2734* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2735* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2736* @return {@code true} if deletes are detected by the given result set type;2737* {@code false} otherwise2738* @throws 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}.2746*2747* @param type the {@code ResultSet} type; one of2748* {@code ResultSet.TYPE_FORWARD_ONLY},2749* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or2750* {@code ResultSet.TYPE_SCROLL_SENSITIVE}2751* @return {@code true} if changes are detected by the specified result2752* set type; {@code false} otherwise2753* @throws 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} if this database supports batch updates;2762* {@code false} otherwise2763* @throws 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 STRUCT},2772* or {@code DISTINCT}.2773*2774* <P>Only types matching the catalog, schema, type name and type2775* criteria are returned. They are ordered by {@code DATA_TYPE},2776* {@code TYPE_CAT}, {@code TYPE_SCHEM} and2777* {@code TYPE_NAME}. 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})2784* <LI><B>TYPE_SCHEM</B> String {@code =>} type's schema (may be {@code null})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} 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} 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} 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} returns all types2812* @return {@code ResultSet} object in which each row describes a UDT2813* @throws 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*2824* @return the connection that produced this metadata object2825* @throws 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} if savepoints are supported;2836* {@code false} otherwise2837* @throws 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} if named parameters are supported;2847* {@code false} otherwise2848* @throws 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} objects2855* returned from a {@code CallableStatement} object2856* simultaneously.2857*2858* @return {@code true} if a {@code CallableStatement} object2859* can return multiple {@code ResultSet} objects2860* simultaneously; {@code false} otherwise2861* @throws SQLException if a database 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} if auto-generated keys can be retrieved2871* after a statement has executed; {@code false} otherwise2872* <p>If {@code true} is returned, the JDBC driver must support the2873* returning of auto-generated keys for at least SQL INSERT statements2874*2875* @throws 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} 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})2897* <LI><B>TYPE_SCHEM</B> String {@code =>} UDT's schema (may be {@code null})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})2901* <LI><B>SUPERTYPE_SCHEM</B> String {@code =>} the direct super type's schema2902* (may be {@code null})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} 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} 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})2939* <LI><B>TABLE_SCHEM</B> String {@code =>} type's schema (may be {@code null})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} 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} 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} values might not be allowed.2963* <P>2964* A possible value for the column2965* {@code NULLABLE} in the {@code ResultSet} object2966* returned by the method {@code getAttributes}.2967*/2968short attributeNoNulls = 0;29692970/**2971* Indicates that {@code NULL} values are definitely allowed.2972* <P>2973* A possible value for the column {@code NULLABLE}2974* in the {@code ResultSet} object2975* returned by the method {@code getAttributes}.2976*/2977short attributeNullable = 1;29782979/**2980* Indicates that whether {@code NULL} values are allowed is not2981* known.2982* <P>2983* A possible value for the column {@code NULLABLE}2984* in the {@code ResultSet} object2985* returned by the method {@code getAttributes}.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 TYPE_SCHEM},2997* {@code TYPE_NAME} and {@code ORDINAL_POSITION}. This description2998* does not contain inherited attributes.2999* <P>3000* The {@code ResultSet} object that is returned has the following3001* columns:3002* <OL>3003* <LI><B>TYPE_CAT</B> String {@code =>} type catalog (may be {@code null})3004* <LI><B>TYPE_SCHEM</B> String {@code =>} type schema (may be {@code null})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})3024* <LI><B>ATTR_DEF</B> String {@code =>} default value (may be {@code null})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} 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} 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} 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} 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} 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} 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} object in which each row is an3062* attribute description3063* @throws 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} or3076* {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}3077* @return {@code true} if so; {@code false} otherwise3078* @throws 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}3086* objects.3087*3088* @return the default holdability; either3089* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or3090* {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}3091* @throws 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* @throws 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* @throws 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* @throws 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* @throws 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} which is used to indicate3137* whether the value returned by the method3138* {@code SQLException.getSQLState} is an3139* X/Open (now know as Open Group) SQL CLI SQLSTATE value.3140*3141* @since 1.43142*/3143int sqlStateXOpen = 1;31443145/**3146* A possible return value for the method3147* {@code DatabaseMetaData.getSQLStateType} which is used to indicate3148* whether the value returned by the method3149* {@code SQLException.getSQLState} is an SQLSTATE value.3150*3151* @since 1.63152*/3153int sqlStateSQL = 2;31543155/**3156* A possible return value for the method3157* {@code DatabaseMetaData.getSQLStateType} which is used to indicate3158* whether the value returned by the method3159* {@code SQLException.getSQLState} 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} instead.3163*3164* @since 1.43165*/3166int sqlStateSQL99 = sqlStateSQL;31673168/**3169* Indicates whether the SQLSTATE returned by {@code SQLException.getSQLState}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} if updates are made to a copy of the LOB;3183* {@code false} 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} if so; {@code false} otherwise3193* @throws SQLException if a database access error occurs3194* @since 1.43195*/3196boolean supportsStatementPooling() throws SQLException;31973198//------------------------- JDBC 4.0 -----------------------------------31993200/**3201* Indicates whether this data source supports the SQL {@code ROWID} type,3202* and the lifetime for which a {@link RowId} object remains valid.3203*3204* @return the status indicating the lifetime of a {@code RowId}3205* @throws SQLException if a database access error occurs3206* @since 1.63207*/3208RowIdLifetime getRowIdLifetime() throws SQLException;32093210/**3211* Retrieves the schema names available in this database. The results3212* are ordered by {@code TABLE_CATALOG} and3213* {@code TABLE_SCHEM}.3214*3215* <P>The schema columns are:3216* <OL>3217* <LI><B>TABLE_SCHEM</B> String {@code =>} schema name3218* <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be {@code null})3219* </OL>3220*3221*3222* @param catalog a catalog name; must match the catalog name as it is stored3223* in the database;"" retrieves those without a catalog; null means catalog3224* name should not be used to narrow down the search.3225* @param schemaPattern a schema name; must match the schema name as it is3226* stored in the database; null means3227* schema name should not be used to narrow down the search.3228* @return a {@code ResultSet} object in which each row is a3229* schema description3230* @throws SQLException if a database access error occurs3231* @see #getSearchStringEscape3232* @since 1.63233*/3234ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException;32353236/**3237* Retrieves whether this database supports invoking user-defined or vendor functions3238* using the stored procedure escape syntax.3239*3240* @return {@code true} if so; {@code false} otherwise3241* @throws SQLException if a database access error occurs3242* @since 1.63243*/3244boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException;32453246/**3247* Retrieves whether a {@code SQLException} while autoCommit is {@code true} indicates3248* that all open ResultSets are closed, even ones that are holdable. When a {@code SQLException} occurs while3249* autocommit is {@code true}, it is vendor specific whether the JDBC driver responds with a commit operation, a3250* rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference3251* is in whether or not holdable ResultSets are closed.3252*3253* @return {@code true} if so; {@code false} otherwise3254* @throws SQLException if a database access error occurs3255* @since 1.63256*/3257boolean autoCommitFailureClosesAllResultSets() throws SQLException;3258/**3259* Retrieves a list of the client info properties3260* that the driver supports. The result set contains the following columns3261*3262* <ol>3263* <li><b>NAME</b> String{@code =>} The name of the client info property<br>3264* <li><b>MAX_LEN</b> int{@code =>} The maximum length of the value for the property<br>3265* <li><b>DEFAULT_VALUE</b> String{@code =>} The default value of the property<br>3266* <li><b>DESCRIPTION</b> String{@code =>} A description of the property. This will typically3267* contain information as to where this property is3268* stored in the database.3269* </ol>3270* <p>3271* The {@code ResultSet} is sorted by the NAME column3272*3273* @return A {@code ResultSet} object; each row is a supported client info3274* property3275*3276* @throws SQLException if a database access error occurs3277*3278* @since 1.63279*/3280ResultSet getClientInfoProperties()3281throws SQLException;32823283/**3284* Retrieves a description of the system and user functions available3285* in the given catalog.3286* <P>3287* Only system and user function descriptions matching the schema and3288* function name criteria are returned. They are ordered by3289* {@code FUNCTION_CAT}, {@code FUNCTION_SCHEM},3290* {@code FUNCTION_NAME} and3291* {@code SPECIFIC_ NAME}.3292*3293* <P>Each function description has the following columns:3294* <OL>3295* <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be {@code null})3296* <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be {@code null})3297* <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name3298* used to invoke the function3299* <LI><B>REMARKS</B> String {@code =>} explanatory comment on the function3300* <LI><B>FUNCTION_TYPE</B> short {@code =>} kind of function:3301* <UL>3302* <LI>functionResultUnknown - Cannot determine if a return value3303* or table will be returned3304* <LI> functionNoTable- Does not return a table3305* <LI> functionReturnsTable - Returns a table3306* </UL>3307* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies3308* this function within its schema. This is a user specified, or DBMS3309* generated, name that may be different then the {@code FUNCTION_NAME}3310* for example with overload functions3311* </OL>3312* <p>3313* A user may not have permission to execute any of the functions that are3314* returned by {@code getFunctions}3315*3316* @param catalog a catalog name; must match the catalog name as it3317* is stored in the database; "" retrieves those without a catalog;3318* {@code null} means that the catalog name should not be used to narrow3319* the search3320* @param schemaPattern a schema name pattern; must match the schema name3321* as it is stored in the database; "" retrieves those without a schema;3322* {@code null} means that the schema name should not be used to narrow3323* the search3324* @param functionNamePattern a function name pattern; must match the3325* function name as it is stored in the database3326* @return {@code ResultSet} - each row is a function description3327* @throws SQLException if a database access error occurs3328* @see #getSearchStringEscape3329* @since 1.63330*/3331ResultSet getFunctions(String catalog, String schemaPattern,3332String functionNamePattern) throws SQLException;3333/**3334* Retrieves a description of the given catalog's system or user3335* function parameters and return type.3336*3337* <P>Only descriptions matching the schema, function and3338* parameter name criteria are returned. They are ordered by3339* {@code FUNCTION_CAT}, {@code FUNCTION_SCHEM},3340* {@code FUNCTION_NAME} and3341* {@code SPECIFIC_ NAME}. Within this, the return value,3342* if any, is first. Next are the parameter descriptions in call3343* order. The column descriptions follow in column number order.3344*3345* <P>Each row in the {@code ResultSet}3346* is a parameter description, column description or3347* return type description with the following fields:3348* <OL>3349* <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be {@code null})3350* <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be {@code null})3351* <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name3352* used to invoke the function3353* <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name3354* <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter:3355* <UL>3356* <LI> functionColumnUnknown - nobody knows3357* <LI> functionColumnIn - IN parameter3358* <LI> functionColumnInOut - INOUT parameter3359* <LI> functionColumnOut - OUT parameter3360* <LI> functionColumnReturn - function return value3361* <LI> functionColumnResult - Indicates that the parameter or column3362* is a column in the {@code ResultSet}3363* </UL>3364* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types3365* <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the3366* type name is fully qualified3367* <LI><B>PRECISION</B> int {@code =>} precision3368* <LI><B>LENGTH</B> int {@code =>} length in bytes of data3369* <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where3370* SCALE is not applicable.3371* <LI><B>RADIX</B> short {@code =>} radix3372* <LI><B>NULLABLE</B> short {@code =>} can it contain NULL.3373* <UL>3374* <LI> functionNoNulls - does not allow NULL values3375* <LI> functionNullable - allows NULL values3376* <LI> functionNullableUnknown - nullability unknown3377* </UL>3378* <LI><B>REMARKS</B> String {@code =>} comment describing column/parameter3379* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} the maximum length of binary3380* and character based parameters or columns. For any other datatype the returned value3381* is a NULL3382* <LI><B>ORDINAL_POSITION</B> int {@code =>} the ordinal position, starting3383* from 1, for the input and output parameters. A value of 03384* is returned if this row describes the function's return value.3385* For result set columns, it is the3386* ordinal position of the column in the result set starting from 1.3387* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine3388* the nullability for a parameter or column.3389* <UL>3390* <LI> YES --- if the parameter or column can include NULLs3391* <LI> NO --- if the parameter or column cannot include NULLs3392* <LI> empty string --- if the nullability for the3393* parameter or column is unknown3394* </UL>3395* <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies3396* this function within its schema. This is a user specified, or DBMS3397* generated, name that may be different then the {@code FUNCTION_NAME}3398* for example with overload functions3399* </OL>3400*3401* <p>The PRECISION column represents the specified column size for the given3402* parameter or column.3403* For numeric data, this is the maximum precision. For character data, this is the length in characters.3404* For datetime datatypes, this is the length in characters of the String representation (assuming the3405* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,3406* this is the length in bytes. Null is returned for data types where the3407* column size is not applicable.3408* @param catalog a catalog name; must match the catalog name as it3409* is stored in the database; "" retrieves those without a catalog;3410* {@code null} means that the catalog name should not be used to narrow3411* the search3412* @param schemaPattern a schema name pattern; must match the schema name3413* as it is stored in the database; "" retrieves those without a schema;3414* {@code null} means that the schema name should not be used to narrow3415* the search3416* @param functionNamePattern a procedure name pattern; must match the3417* function name as it is stored in the database3418* @param columnNamePattern a parameter name pattern; must match the3419* parameter or column name as it is stored in the database3420* @return {@code ResultSet} - each row describes a3421* user function parameter, column or return type3422*3423* @throws SQLException if a database access error occurs3424* @see #getSearchStringEscape3425* @since 1.63426*/3427ResultSet getFunctionColumns(String catalog,3428String schemaPattern,3429String functionNamePattern,3430String columnNamePattern) throws SQLException;343134323433/**3434* Indicates that type of the parameter or column is unknown.3435* <P>3436* A possible value for the column3437* {@code COLUMN_TYPE}3438* in the {@code ResultSet}3439* returned by the method {@code getFunctionColumns}.3440*/3441int functionColumnUnknown = 0;34423443/**3444* Indicates that the parameter or column is an IN parameter.3445* <P>3446* A possible value for the column3447* {@code COLUMN_TYPE}3448* in the {@code ResultSet}3449* returned by the method {@code getFunctionColumns}.3450* @since 1.63451*/3452int functionColumnIn = 1;34533454/**3455* Indicates that the parameter or column is an INOUT parameter.3456* <P>3457* A possible value for the column3458* {@code COLUMN_TYPE}3459* in the {@code ResultSet}3460* returned by the method {@code getFunctionColumns}.3461* @since 1.63462*/3463int functionColumnInOut = 2;34643465/**3466* Indicates that the parameter or column is an OUT parameter.3467* <P>3468* A possible value for the column3469* {@code COLUMN_TYPE}3470* in the {@code ResultSet}3471* returned by the method {@code getFunctionColumns}.3472* @since 1.63473*/3474int functionColumnOut = 3;3475/**3476* Indicates that the parameter or column is a return value.3477* <P>3478* A possible value for the column3479* {@code COLUMN_TYPE}3480* in the {@code ResultSet}3481* returned by the method {@code getFunctionColumns}.3482* @since 1.63483*/3484int functionReturn = 4;34853486/**3487* Indicates that the parameter or column is a column in a result set.3488* <P>3489* A possible value for the column3490* {@code COLUMN_TYPE}3491* in the {@code ResultSet}3492* returned by the method {@code getFunctionColumns}.3493* @since 1.63494*/3495int functionColumnResult = 5;349634973498/**3499* Indicates that {@code NULL} values are not allowed.3500* <P>3501* A possible value for the column3502* {@code NULLABLE}3503* in the {@code ResultSet} object3504* returned by the method {@code getFunctionColumns}.3505* @since 1.63506*/3507int functionNoNulls = 0;35083509/**3510* Indicates that {@code NULL} values are allowed.3511* <P>3512* A possible value for the column3513* {@code NULLABLE}3514* in the {@code ResultSet} object3515* returned by the method {@code getFunctionColumns}.3516* @since 1.63517*/3518int functionNullable = 1;35193520/**3521* Indicates that whether {@code NULL} values are allowed3522* is unknown.3523* <P>3524* A possible value for the column3525* {@code NULLABLE}3526* in the {@code ResultSet} object3527* returned by the method {@code getFunctionColumns}.3528* @since 1.63529*/3530int functionNullableUnknown = 2;35313532/**3533* Indicates that it is not known whether the function returns3534* a result or a table.3535* <P>3536* A possible value for column {@code FUNCTION_TYPE} in the3537* {@code ResultSet} object returned by the method3538* {@code getFunctions}.3539* @since 1.63540*/3541int functionResultUnknown = 0;35423543/**3544* Indicates that the function does not return a table.3545* <P>3546* A possible value for column {@code FUNCTION_TYPE} in the3547* {@code ResultSet} object returned by the method3548* {@code getFunctions}.3549* @since 1.63550*/3551int functionNoTable = 1;35523553/**3554* Indicates that the function returns a table.3555* <P>3556* A possible value for column {@code FUNCTION_TYPE} in the3557* {@code ResultSet} object returned by the method3558* {@code getFunctions}.3559* @since 1.63560*/3561int functionReturnsTable = 2;35623563//--------------------------JDBC 4.1 -----------------------------35643565/**3566* Retrieves a description of the pseudo or hidden columns available3567* in a given table within the specified catalog and schema.3568* Pseudo or hidden columns may not always be stored within3569* a table and are not visible in a ResultSet unless they are3570* specified in the query's outermost SELECT list. Pseudo or hidden3571* columns may not necessarily be able to be modified. If there are3572* no pseudo or hidden columns, an empty ResultSet is returned.3573*3574* <P>Only column descriptions matching the catalog, schema, table3575* and column name criteria are returned. They are ordered by3576* {@code TABLE_CAT},{@code TABLE_SCHEM}, {@code TABLE_NAME}3577* and {@code COLUMN_NAME}.3578*3579* <P>Each column description has the following columns:3580* <OL>3581* <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be {@code null})3582* <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be {@code null})3583* <LI><B>TABLE_NAME</B> String {@code =>} table name3584* <LI><B>COLUMN_NAME</B> String {@code =>} column name3585* <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types3586* <LI><B>COLUMN_SIZE</B> int {@code =>} column size.3587* <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where3588* DECIMAL_DIGITS is not applicable.3589* <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2)3590* <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the column. The3591* value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name PseudoColumnUsage.name()}3592* <LI><B>REMARKS</B> String {@code =>} comment describing column (may be {@code null})3593* <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the3594* maximum number of bytes in the column3595* <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column.3596* <UL>3597* <LI> YES --- if the column can include NULLs3598* <LI> NO --- if the column cannot include NULLs3599* <LI> empty string --- if the nullability for the column is unknown3600* </UL>3601* </OL>3602*3603* <p>The COLUMN_SIZE column specifies the column size for the given column.3604* For numeric data, this is the maximum precision. For character data, this is the length in characters.3605* For datetime datatypes, this is the length in characters of the String representation (assuming the3606* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,3607* this is the length in bytes. Null is returned for data types where the3608* column size is not applicable.3609*3610* @param catalog a catalog name; must match the catalog name as it3611* is stored in the database; "" retrieves those without a catalog;3612* {@code null} means that the catalog name should not be used to narrow3613* the search3614* @param schemaPattern a schema name pattern; must match the schema name3615* as it is stored in the database; "" retrieves those without a schema;3616* {@code null} means that the schema name should not be used to narrow3617* the search3618* @param tableNamePattern a table name pattern; must match the3619* table name as it is stored in the database3620* @param columnNamePattern a column name pattern; must match the column3621* name as it is stored in the database3622* @return {@code ResultSet} - each row is a column description3623* @throws SQLException if a database access error occurs3624* @see PseudoColumnUsage3625* @since 1.73626*/3627ResultSet getPseudoColumns(String catalog, String schemaPattern,3628String tableNamePattern, String columnNamePattern)3629throws SQLException;36303631/**3632* Retrieves whether a generated key will always be returned if the column3633* name(s) or index(es) specified for the auto generated key column(s)3634* are valid and the statement succeeds. The key that is returned may or3635* may not be based on the column(s) for the auto generated key.3636* Consult your JDBC driver documentation for additional details.3637* @return {@code true} if so; {@code false} otherwise3638* @throws SQLException if a database access error occurs3639* @since 1.73640*/3641boolean generatedKeyAlwaysReturned() throws SQLException;36423643//--------------------------JDBC 4.2 -----------------------------36443645/**3646*3647* Retrieves the maximum number of bytes this database allows for3648* the logical size for a {@code LOB}.3649*<p>3650* The default implementation will return {@code 0}3651*3652* @return the maximum number of bytes allowed; a result of zero3653* means that there is no limit or the limit is not known3654* @throws SQLException if a database access error occurs3655* @since 1.83656*/3657default long getMaxLogicalLobSize() throws SQLException {3658return 0;3659}36603661/**3662* Retrieves whether this database supports REF CURSOR.3663*<p>3664* The default implementation will return {@code false}3665*3666* @return {@code true} if this database supports REF CURSOR;3667* {@code false} otherwise3668* @throws SQLException if a database access error occurs3669* @since 1.83670*/3671default boolean supportsRefCursors() throws SQLException{3672return false;3673}36743675// JDBC 4.336763677/**3678* Retrieves whether this database supports sharding.3679* @implSpec3680* The default implementation will return {@code false}3681*3682* @return {@code true} if this database supports sharding;3683* {@code false} otherwise3684* @throws SQLException if a database access error occurs3685* @since 93686*/3687default boolean supportsSharding() throws SQLException {3688return false;3689}3690}369136923693