public interface DatabaseMetaData extends Wrapper
此接口由驱动程序供应商实现,让用户与基于JDBC技术(“JDBC驱动程序”)的驱动程序结合使用数据库管理系统(DBMS)的功能。 不同的关系DBMS通常支持不同的功能,以不同的方式实现功能,并使用不同的数据类型。 此外,驱动程序可以在DBMS提供的功能之上实现一个功能。 此界面中方法返回的信息适用于特定驱动程序和特定DBMS协同工作的功能。 请注意,如本文档所使用的,术语“数据库”通常用于指代驱动程序和DBMS。
此接口的用户通常是需要发现如何处理基础DBMS的工具。 对于旨在与多个DBMS一起使用的应用程序尤其如此。 例如,一个工具可能会使用方法getTypeInfo来查找可以在CREATE TABLE语句中使用哪些数据类型。 或者用户可能会调用方法supportsCorrelatedSubqueries查看是否可以使用相关的子查询或supportsBatchUpdates查看是否可以使用批量更新。
一些DatabaseMetaData方法以ResultSet对象的形式返回信息列表。 常规的ResultSet方法,例如getString和getInt可用于从这些ResultSet对象中检索数据。 如果一个给定形式的元数据不可用,将返回一个空的ResultSet 。 超出定义要由返回的列附加列ResultSet对象对于给定的方法可以通过本JDBC驱动程序供应商来定义,并且必须由他们的列标签进行访问。
一些DatabaseMetaData方法使用String模式的参数。 这些参数都有名称,如fooPattern。 在模式字符串中,“%”表示匹配0个或更多字符的任何子字符串,“_”表示匹配任何一个字符。 只返回与搜索模式匹配的元数据条目。 如果搜索模式参数设置为null ,则该参数的标准将从搜索中删除。
| Modifier and Type | Field and Description |
|---|---|
static short |
attributeNoNulls
表示可能不允许
NULL值。
|
static short |
attributeNullable
表示绝对允许
NULL值。
|
static short |
attributeNullableUnknown
表示是否允许使用
NULL值。
|
static int |
bestRowNotPseudo
表示最佳行标识符不是伪列。
|
static int |
bestRowPseudo
表示最佳行标识符是伪列。
|
static int |
bestRowSession
表示最佳行标识符的范围是当前会话的剩余部分。
|
static int |
bestRowTemporary
表示最佳行标识符的范围是非常临时的,只在该行被使用时持久化。
|
static int |
bestRowTransaction
表示最佳行标识符的范围是当前事务的剩余部分。
|
static int |
bestRowUnknown
表示最佳行标识符可能是伪列,也可能不是伪列。
|
static int |
columnNoNulls
表示该列可能不允许
NULL值。
|
static int |
columnNullable
表示该列绝对允许
NULL值。
|
static int |
columnNullableUnknown
表示列的无效性是未知的。
|
static int |
functionColumnIn
表示参数或列是IN参数。
|
static int |
functionColumnInOut
表示参数或列是INOUT参数。
|
static int |
functionColumnOut
表示参数或列是OUT参数。
|
static int |
functionColumnResult
表示参数或列是结果集中的列。
|
static int |
functionColumnUnknown
表示参数或列的类型未知。
|
static int |
functionNoNulls
表示
NULL值。
|
static int |
functionNoTable
表示该函数不返回表。
|
static int |
functionNullable
表示允许
NULL值。
|
static int |
functionNullableUnknown
表示是否允许
NULL值是未知的。
|
static int |
functionResultUnknown
表示不知道函数是返回结果还是表。
|
static int |
functionReturn
表示参数或列是返回值。
|
static int |
functionReturnsTable
表示该函数返回一个表。
|
static int |
importedKeyCascade
对于列
UPDATE_RULE ,表示当主键更新时,外键(导入的键)被更改为与其一致。
|
static int |
importedKeyInitiallyDeferred
表示延迟。
|
static int |
importedKeyInitiallyImmediate
表示延迟。
|
static int |
importedKeyNoAction
对于列
UPDATE_RULE和
DELETE_RULE ,表示如果主键已导入,则不能更新或删除。
|
static int |
importedKeyNotDeferrable
表示延迟。
|
static int |
importedKeyRestrict
对于列
UPDATE_RULE ,表示主键可能不被更新,如果它已被其他表导入为外键。
|
static int |
importedKeySetDefault
对于列
UPDATE_RULE和
DELETE_RULE ,表示如果主键被更新或删除,则外键(导入的键)被设置为默认值。
|
static int |
importedKeySetNull
对于列
UPDATE_RULE和
DELETE_RULE ,表示当主键被更新或删除时,外键(导入的键)被更改为
NULL 。
|
static int |
procedureColumnIn
表示列存储IN参数。
|
static int |
procedureColumnInOut
表示列存储INOUT参数。
|
static int |
procedureColumnOut
表示列存储OUT参数。
|
static int |
procedureColumnResult
表示列存储结果。
|
static int |
procedureColumnReturn
表示列存储返回值。
|
static int |
procedureColumnUnknown
表示列的类型未知。
|
static int |
procedureNoNulls
表示
NULL值。
|
static int |
procedureNoResult
表示该过程不返回结果。
|
static int |
procedureNullable
表示允许
NULL值。
|
static int |
procedureNullableUnknown
表示是否允许
NULL值是未知的。
|
static int |
procedureResultUnknown
表示不知道过程是否返回结果。
|
static int |
procedureReturnsResult
表示该过程返回结果。
|
static int |
sqlStateSQL
用于指示方法
DatabaseMetaData.getSQLStateType返回的值是否为SQLSTATE值的方法
SQLException.getSQLState可能返回值。
|
static int |
sqlStateSQL99
该方法一个可能的返回值
DatabaseMetaData.getSQLStateType ,其用于指示该方法返回的值是否
SQLException.getSQLState是一个SQL99 SQLSTATE值。
|
static int |
sqlStateXOpen
该方法一个可能的返回值
DatabaseMetaData.getSQLStateType ,其用于指示该方法返回的值是否
SQLException.getSQLState是X /打开(现在知道的公开组)SQL CLI SQLSTATE值。
|
static short |
tableIndexClustered
表示此表索引是聚簇索引。
|
static short |
tableIndexHashed
表示此索引是散列索引。
|
static short |
tableIndexOther
表示此表索引不是聚簇索引,散列索引或表统计信息;
这是其他的东西。
|
static short |
tableIndexStatistic
表示此列包含与表的索引描述一起返回的表统计信息。
|
static int |
typeNoNulls
表示此数据类型不允许使用
NULL值。
|
static int |
typeNullable
表示该数据类型允许使用
NULL值。
|
static int |
typeNullableUnknown
表示不知道是否允许此数据类型的
NULL值。
|
static int |
typePredBasic
表示数据类型只能在不使用
LIKE谓词的
WHERE搜索子句中使用。
|
static int |
typePredChar
指示该数据类型可以仅在使用
WHERE使用搜索子句
LIKE谓词。
|
static int |
typePredNone
表示此类型不支持
WHERE搜索子句。
|
static int |
typeSearchable
表示所有
WHERE搜索子句都可以基于此类型。
|
static int |
versionColumnNotPseudo
表示此版本列不是伪列。
|
static int |
versionColumnPseudo
表示此版本列是伪列。
|
static int |
versionColumnUnknown
表示此版本列可能是也可能不是伪列。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allProceduresAreCallable()
检索当前用户是否可以调用方法返回的所有过程
getProcedures 。
|
boolean |
allTablesAreSelectable()
检索当前用户是否可以使用方法
getTables在
SELECT语句中返回的所有表。
|
boolean |
autoCommitFailureClosesAllResultSets()
检索是否
SQLException当autoCommit为
true指示所有打开的ResultSets已关闭,即使那些可保持。
|
boolean |
dataDefinitionCausesTransactionCommit()
检索事务中的数据定义语句是否强制事务提交。
|
boolean |
dataDefinitionIgnoredInTransactions()
检索此数据库是否忽略事务中的数据定义语句。
|
boolean |
deletesAreDetected(int type)
检索是否通过调用方法
ResultSet.rowDeleted检测到可见的行删除。
|
boolean |
doesMaxRowSizeIncludeBlobs()
检索方法
getMaxRowSize的返回值是否包含SQL数据类型
LONGVARCHAR和
LONGVARBINARY 。
|
boolean |
generatedKeyAlwaysReturned()
检索如果为自动生成的密钥列指定的列名称或索引有效并且语句成功,将始终返回生成的密钥。
|
ResultSet |
getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)
检索给定模式和目录中可用的用户定义类型(UDT)给定类型的给定属性的描述。
|
ResultSet |
getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
检索表格唯一标识行的最佳列集描述。
|
ResultSet |
getCatalogs()
检索此数据库中可用的目录名称。
|
String |
getCatalogSeparator()
检索
String此数据库用作类别和表名之间的分隔符。
|
String |
getCatalogTerm()
检索“目录”的数据库供应商的首选项。
|
ResultSet |
getClientInfoProperties()
检索驱动程序支持的客户端信息属性的列表。
|
ResultSet |
getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)
检索表的列的访问权限的描述。
|
ResultSet |
getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
检索指定目录中可用的表列的描述。
|
Connection |
getConnection()
检索生成此元数据对象的连接。
|
ResultSet |
getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable)
检索引用主键的给定外键表中的外键列的描述,或表示父表的唯一约束的列(可以是相同表或不同表)。
|
int |
getDatabaseMajorVersion()
检索底层数据库的主版本号。
|
int |
getDatabaseMinorVersion()
检索底层数据库的次要版本号。
|
String |
getDatabaseProductName()
检索此数据库产品的名称。
|
String |
getDatabaseProductVersion()
检索此数据库产品的版本号。
|
int |
getDefaultTransactionIsolation()
检索此数据库的默认事务隔离级别。
|
int |
getDriverMajorVersion()
检索此JDBC驱动程序的主要版本号。
|
int |
getDriverMinorVersion()
检索此JDBC驱动程序的次要版本号。
|
String |
getDriverName()
检索此JDBC驱动程序的名称。
|
String |
getDriverVersion()
获取此JDBC驱动程序的版本号
String 。
|
ResultSet |
getExportedKeys(String catalog, String schema, String table)
检索引用给定表的主键列(由表导出的外键)的外键列的描述。
|
String |
getExtraNameCharacters()
检索可用于未引号的标识符名称(超出az,AZ,0-9和_)的所有“额外”字符。
|
ResultSet |
getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)
检索给定目录的系统或用户功能参数和返回类型的描述。
|
ResultSet |
getFunctions(String catalog, String schemaPattern, String functionNamePattern)
检索给定目录中可用的系统和用户功能的描述。
|
String |
getIdentifierQuoteString()
检索用于引用SQL标识符的字符串。
|
ResultSet |
getImportedKeys(String catalog, String schema, String table)
检索给定表的外键列(由表导入的主键)引用的主键列的描述。
|
ResultSet |
getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)
检索给定表的索引和统计信息的描述。
|
int |
getJDBCMajorVersion()
检索此驱动程序的主要JDBC版本号。
|
int |
getJDBCMinorVersion()
检索此驱动程序的次要JDBC版本号。
|
int |
getMaxBinaryLiteralLength()
检索数据库允许的内联二进制文字的最大十六进制数。
|
int |
getMaxCatalogNameLength()
检索此数据库在目录名称中允许的最大字符数。
|
int |
getMaxCharLiteralLength()
检索此数据库允许使用字符文字的最大字符数。
|
int |
getMaxColumnNameLength()
检索此数据库允许列名称的最大字符数。
|
int |
getMaxColumnsInGroupBy()
检索
GROUP BY子句中数据库允许的最大列数。
|
int |
getMaxColumnsInIndex()
检索数据库在索引中允许的最大列数。
|
int |
getMaxColumnsInOrderBy()
检索数据库在
ORDER BY子句中允许的最大列数。
|
int |
getMaxColumnsInSelect()
在
SELECT列表中
SELECT此数据库允许的最大列数。
|
int |
getMaxColumnsInTable()
检索数据库在表中允许的最大列数。
|
int |
getMaxConnections()
检索可能的此数据库的最大并发连接数。
|
int |
getMaxCursorNameLength()
检索该数据库在游标名称中允许的最大字符数。
|
int |
getMaxIndexLength()
检索数据库允许索引的最大字节数,包括索引的所有部分。
|
default long |
getMaxLogicalLobSize()
检索数据库允许
LOB的逻辑大小的最大字节数。
|
int |
getMaxProcedureNameLength()
检索此数据库在过程名称中允许的最大字符数。
|
int |
getMaxRowSize()
检索数据库在单行中允许的最大字节数。
|
int |
getMaxSchemaNameLength()
检索此数据库在模式名称中允许的最大字符数。
|
int |
getMaxStatementLength()
检索数据库在SQL语句中允许的最大字符数。
|
int |
getMaxStatements()
检索可以同时打开的此数据库的活动语句的最大数量。
|
int |
getMaxTableNameLength()
检索数据库在表名中允许的最大字符数。
|
int |
getMaxTablesInSelect()
检索数据库在
SELECT语句中允许的最大表数。
|
int |
getMaxUserNameLength()
检索数据库在用户名中允许的最大字符数。
|
String |
getNumericFunctions()
检索此数据库可用的逗号分隔的数学函数列表。
|
ResultSet |
getPrimaryKeys(String catalog, String schema, String table)
检索给定表的主键列的描述。
|
ResultSet |
getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
检索给定目录的存储过程参数和结果列的描述。
|
ResultSet |
getProcedures(String catalog, String schemaPattern, String procedureNamePattern)
检索给定目录中可用的存储过程的描述。
|
String |
getProcedureTerm()
检索“程序”的数据库供应商的首选项。
|
ResultSet |
getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
检索指定目录和模式中给定表中可用的伪列或隐藏列的描述。
|
int |
getResultSetHoldability()
检索此数据库对
ResultSet对象的默认保持性。
|
RowIdLifetime |
getRowIdLifetime()
指示此数据源是否支持SQL
ROWID类型,如果是,则
RowId对象的生存期保持有效。
|
ResultSet |
getSchemas()
检索此数据库中可用的模式名称。
|
ResultSet |
getSchemas(String catalog, String schemaPattern)
检索此数据库中可用的模式名称。
|
String |
getSchemaTerm()
检索“模式”的数据库供应商的首选项。
|
String |
getSearchStringEscape()
检索可以用来转义通配符的字符串。
|
String |
getSQLKeywords()
检索所有这些数据库的SQL关键字的逗号分隔列表,这些关键字也不是SQL:2003关键字。
|
int |
getSQLStateType()
指示由
SQLException.getSQLState返回的SQLSTATE是X / Open(现在称为Open Group)SQL CLI或SQL:2003。
|
String |
getStringFunctions()
检索此数据库可用的逗号分隔的字符串函数列表。
|
ResultSet |
getSuperTables(String catalog, String schemaPattern, String tableNamePattern)
检索此数据库中特定模式中定义的表层次结构的描述。
|
ResultSet |
getSuperTypes(String catalog, String schemaPattern, String typeNamePattern)
检索此数据库中特定模式中定义的用户定义类型(UDT)层次结构的描述。
|
String |
getSystemFunctions()
检索此数据库可用的系统函数的逗号分隔列表。
|
ResultSet |
getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
检索目录中可用的每个表的访问权限的描述。
|
ResultSet |
getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
检索给定目录中可用表的描述。
|
ResultSet |
getTableTypes()
检索此数据库中可用的表类型。
|
String |
getTimeDateFunctions()
检索此数据库可用的时间和日期函数的逗号分隔列表。
|
ResultSet |
getTypeInfo()
检索此数据库支持的所有数据类型的描述。
|
ResultSet |
getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)
检索在特定模式中定义的用户定义类型(UDT)的描述。
|
String |
getURL()
检索此DBMS的URL。
|
String |
getUserName()
检索此数据库已知的用户名。
|
ResultSet |
getVersionColumns(String catalog, String schema, String table)
检索表中更新行中任何值时自动更新的表的列的说明。
|
boolean |
insertsAreDetected(int type)
检索是否可以通过调用方法
ResultSet.rowInserted检测到可见行插入。
|
boolean |
isCatalogAtStart()
检索目录是否在完全限定的表名开始时显示。
|
boolean |
isReadOnly()
检索该数据库是否处于只读模式。
|
boolean |
locatorsUpdateCopy()
指示对LOB进行的更新是在副本上还是直接进行到LOB。
|
boolean |
nullPlusNonNullIsNull()
获取此数据库是否支持进行拼接
NULL和非
NULL值是
NULL 。
|
boolean |
nullsAreSortedAtEnd()
检索最终是否排序
NULL值,无论排序顺序如何。
|
boolean |
nullsAreSortedAtStart()
检索是否在开始排序
NULL值,无论排序顺序如何。
|
boolean |
nullsAreSortedHigh()
检索
NULL值是否高排序。
|
boolean |
nullsAreSortedLow()
检索
NULL值是否排序低。
|
boolean |
othersDeletesAreVisible(int type)
检索他人删除是否可见。
|
boolean |
othersInsertsAreVisible(int type)
检索他人所做的插入是否可见。
|
boolean |
othersUpdatesAreVisible(int type)
检索其他人所做的更新是否可见。
|
boolean |
ownDeletesAreVisible(int type)
检索结果集自身的删除是否可见。
|
boolean |
ownInsertsAreVisible(int type)
检索结果集是否可以看到自己的插入。
|
boolean |
ownUpdatesAreVisible(int type)
检索是否给定类型的
ResultSet对象,结果集的自己的更新是可见的。
|
boolean |
storesLowerCaseIdentifiers()
检索此数据库是否将混合大小写无引号SQL标识符视为不区分大小写,并将其存储为小写。
|
boolean |
storesLowerCaseQuotedIdentifiers()
检索此数据库是否将混合大小写的SQL标识符视为不区分大小写,并以小写形式存储。
|
boolean |
storesMixedCaseIdentifiers()
检索此数据库是否将混合大小写无引号SQL标识符视为不区分大小写,并以混合大小写存储。
|
boolean |
storesMixedCaseQuotedIdentifiers()
检索此数据库是否将混合大小写的SQL标识符视为不区分大小写,并以混合大小写存储。
|
boolean |
storesUpperCaseIdentifiers()
检索此数据库是否将混合大小写无引号SQL标识符视为不区分大小写,并将其存储为大写。
|
boolean |
storesUpperCaseQuotedIdentifiers()
检索此数据库是否将混合大小写引用的SQL标识符视为不区分大小写,并以大写形式存储。
|
boolean |
supportsAlterTableWithAddColumn()
检索此数据库是否支持带有添加列的
ALTER TABLE 。
|
boolean |
supportsAlterTableWithDropColumn()
检索此数据库是否支持具有删除列的
ALTER TABLE 。
|
boolean |
supportsANSI92EntryLevelSQL()
检索此数据库是否支持ANSI92入门级SQL语法。
|
boolean |
supportsANSI92FullSQL()
检索此数据库是否支持支持的ANSI92完整SQL语法。
|
boolean |
supportsANSI92IntermediateSQL()
检索此数据库是否支持支持ANSI92中间SQL语法。
|
boolean |
supportsBatchUpdates()
检索此数据库是否支持批量更新。
|
boolean |
supportsCatalogsInDataManipulation()
检索数据操作语句中是否可以使用目录名称。
|
boolean |
supportsCatalogsInIndexDefinitions()
检索是否可以在索引定义语句中使用目录名称。
|
boolean |
supportsCatalogsInPrivilegeDefinitions()
检索是否可以在特权定义语句中使用目录名称。
|
boolean |
supportsCatalogsInProcedureCalls()
检索是否可以在过程调用语句中使用目录名称。
|
boolean |
supportsCatalogsInTableDefinitions()
检索表定义语句中是否可以使用目录名称。
|
boolean |
supportsColumnAliasing()
检索此数据库是否支持列别名。
|
boolean |
supportsConvert()
检索此数据库是否支持JDBC标量函数
CONVERT ,以便将一种JDBC类型转换为另一种JDBC类型。
|
boolean |
supportsConvert(int fromType, int toType)
获取此数据库是否支持JDBC标量函数
CONVERT的JDBC类型
fromType和
toType之间的转换。
|
boolean |
supportsCoreSQLGrammar()
检索此数据库是否支持ODBC Core SQL语法。
|
boolean |
supportsCorrelatedSubqueries()
检索此数据库是否支持相关的子查询。
|
boolean |
supportsDataDefinitionAndDataManipulationTransactions()
检索此数据库是否支持事务中的数据定义和数据操作语句。
|
boolean |
supportsDataManipulationTransactionsOnly()
检索此数据库是否仅支持事务中的数据操作语句。
|
boolean |
supportsDifferentTableCorrelationNames()
检索是否支持表相关名称,它们被限制为与表的名称不同。
|
boolean |
supportsExpressionsInOrderBy()
检索此数据库是否支持
ORDER BY列表中的
ORDER BY 。
|
boolean |
supportsExtendedSQLGrammar()
检索此数据库是否支持ODBC扩展SQL语法。
|
boolean |
supportsFullOuterJoins()
检索此数据库是否支持完全嵌套的外连接。
|
boolean |
supportsGetGeneratedKeys()
检索在执行语句后是否可以检索自动生成的键
|
boolean |
supportsGroupBy()
检索此数据库是否支持某种形式的
GROUP BY子句。
|
boolean |
supportsGroupByBeyondSelect()
获取此数据库是否支持使用不包含在列
SELECT在一份声明中
GROUP BY条款规定,所有在列
SELECT声明都包含在在
GROUP BY条款。
|
boolean |
supportsGroupByUnrelated()
获取此数据库是否支持使用列,它是不是在
SELECT在一份声明中
GROUP BY条款。
|
boolean |
supportsIntegrityEnhancementFacility()
检索此数据库是否支持SQL完整性增强工具。
|
boolean |
supportsLikeEscapeClause()
检索此数据库是否支持指定
LIKE escape子句。
|
boolean |
supportsLimitedOuterJoins()
检索此数据库是否为外连接提供有限的支持。
|
boolean |
supportsMinimumSQLGrammar()
检索此数据库是否支持ODBC最低SQL语法。
|
boolean |
supportsMixedCaseIdentifiers()
检索此数据库是否将混合大小写不引用的SQL标识符视为区分大小写,并将结果存储在混合大小写中。
|
boolean |
supportsMixedCaseQuotedIdentifiers()
检索此数据库是否将混合大小写的SQL标识符视为区分大小写,并将结果存储在混合大小写中。
|
boolean |
supportsMultipleOpenResults()
检索是否有可能具有多个
ResultSet对象从一个返回
CallableStatement对象同时进行。
|
boolean |
supportsMultipleResultSets()
检索此数据库是否支持从方法
execute的单一调用中获取多个
ResultSet对象。
|
boolean |
supportsMultipleTransactions()
检索此数据库是否允许同时打开多个事务(在不同的连接上)。
|
boolean |
supportsNamedParameters()
检索此数据库是否支持可调用语句的命名参数。
|
boolean |
supportsNonNullableColumns()
检索此数据库中的列是否可以被定义为不可为空。
|
boolean |
supportsOpenCursorsAcrossCommit()
检索此数据库是否支持保持游标在提交之间打开。
|
boolean |
supportsOpenCursorsAcrossRollback()
检索此数据库是否支持在回滚之间保持光标打开。
|
boolean |
supportsOpenStatementsAcrossCommit()
检索此数据库是否支持在提交之间保留语句。
|
boolean |
supportsOpenStatementsAcrossRollback()
检索此数据库是否支持在回滚期间保持语句打开。
|
boolean |
supportsOrderByUnrelated()
检索此数据库是否支持使用不在
ORDER BY子句中的
SELECT语句中的
ORDER BY 。
|
boolean |
supportsOuterJoins()
检索此数据库是否支持某种形式的外连接。
|
boolean |
supportsPositionedDelete()
检索此数据库是否支持定位
DELETE语句。
|
boolean |
supportsPositionedUpdate()
检索此数据库是否支持定位
UPDATE语句。
|
default boolean |
supportsRefCursors()
检索此数据库是否支持REF CURSOR。
|
boolean |
supportsResultSetConcurrency(int type, int concurrency)
检索此数据库是否支持给定的并发类型与给定的结果集类型的组合。
|
boolean |
supportsResultSetHoldability(int holdability)
检索此数据库是否支持给定的结果集保持性。
|
boolean |
supportsResultSetType(int type)
检索此数据库是否支持给定的结果集类型。
|
boolean |
supportsSavepoints()
检索此数据库是否支持保存点。
|
boolean |
supportsSchemasInDataManipulation()
检索是否可以在数据操作语句中使用模式名称。
|
boolean |
supportsSchemasInIndexDefinitions()
检索是否可以在索引定义语句中使用模式名称。
|
boolean |
supportsSchemasInPrivilegeDefinitions()
检索是否可以在特权定义语句中使用模式名称。
|
boolean |
supportsSchemasInProcedureCalls()
检索是否可以在过程调用语句中使用模式名称。
|
boolean |
supportsSchemasInTableDefinitions()
检索表定义语句中是否可以使用模式名称。
|
boolean |
supportsSelectForUpdate()
检索此数据库是否支持
SELECT FOR UPDATE语句。
|
boolean |
supportsStatementPooling()
检索此数据库是否支持语句池。
|
boolean |
supportsStoredFunctionsUsingCallSyntax()
检索此数据库是否支持使用存储过程转义语法调用用户定义或供应商功能。
|
boolean |
supportsStoredProcedures()
检索此数据库是否支持使用存储过程转义语法的存储过程调用。
|
boolean |
supportsSubqueriesInComparisons()
检索此数据库是否支持比较表达式中的子查询。
|
boolean |
supportsSubqueriesInExists()
检索此数据库是否支持EXISTS表达式中的
EXISTS查询。
|
boolean |
supportsSubqueriesInIns()
检索此数据库是否支持IN表达式中的
IN查询。
|
boolean |
supportsSubqueriesInQuantifieds()
检索此数据库是否支持量化表达式中的子查询。
|
boolean |
supportsTableCorrelationNames()
检索此数据库是否支持表相关名称。
|
boolean |
supportsTransactionIsolationLevel(int level)
检索此数据库是否支持给定的事务隔离级别。
|
boolean |
supportsTransactions()
检索此数据库是否支持事务。
|
boolean |
supportsUnion()
检索此数据库是否支持SQL
UNION 。
|
boolean |
supportsUnionAll()
检索此数据库是否支持SQL
UNION ALL 。
|
boolean |
updatesAreDetected(int type)
检索是否可以通过调用方法
ResultSet.rowUpdated检测到可见行更新。
|
boolean |
usesLocalFilePerTable()
检索此数据库是否为每个表使用一个文件。
|
boolean |
usesLocalFiles()
检索此数据库是否将表存储在本地文件中。
|
isWrapperFor, unwrapstatic final int procedureResultUnknown
列的可能值PROCEDURE_TYPE在ResultSet该方法返回对象getProcedures 。
static final int procedureNoResult
列的可能值PROCEDURE_TYPE在ResultSet该方法返回对象getProcedures 。
static final int procedureReturnsResult
方法getProcedures返回的ResultSet对象中的列PROCEDURE_TYPE可能值。
static final int procedureColumnUnknown
一个可能的值为COLUMN_TYPE的ResultSet返回方法getProcedureColumns 。
static final int procedureColumnIn
一个可能的值为COLUMN_TYPE在ResultSet返回的方法getProcedureColumns 。
static final int procedureColumnInOut
一个可能的值为COLUMN_TYPE的ResultSet返回方法getProcedureColumns 。
static final int procedureColumnOut
一个可能的值为COLUMN_TYPE在ResultSet返回的方法getProcedureColumns 。
static final int procedureColumnReturn
可能的值为COLUMN_TYPE在ResultSet返回的方法getProcedureColumns 。
static final int procedureColumnResult
一个可能的值为COLUMN_TYPE在ResultSet返回的方法getProcedureColumns 。
static final int procedureNoNulls
NULL值。
方法getProcedureColumns返回的ResultSet对象中的列NULLABLE可能值。
static final int procedureNullable
NULL值。
方法getProcedureColumns返回的ResultSet对象中的列NULLABLE可能值。
static final int procedureNullableUnknown
NULL值是未知的。
方法getProcedureColumns返回的ResultSet对象中的列NULLABLE可能值。
static final int columnNoNulls
NULL值。
一个可能的值为NULLABLE的ResultSet返回方法getColumns 。
static final int columnNullable
NULL值。
一个可能的值为NULLABLE在ResultSet返回的方法getColumns 。
static final int columnNullableUnknown
一个可能的值为NULLABLE在ResultSet返回的方法getColumns 。
static final int bestRowTemporary
方法getBestRowIdentifier返回的ResultSet对象中的列SCOPE可能值。
static final int bestRowTransaction
方法getBestRowIdentifier返回的ResultSet对象中的列SCOPE可能值。
static final int bestRowSession
方法getBestRowIdentifier返回的ResultSet对象中的列SCOPE可能值。
static final int bestRowUnknown
方法getBestRowIdentifier返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int bestRowNotPseudo
方法getBestRowIdentifier返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int bestRowPseudo
方法getBestRowIdentifier返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int versionColumnUnknown
方法getVersionColumns返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int versionColumnNotPseudo
方法getVersionColumns返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int versionColumnPseudo
方法getVersionColumns返回的ResultSet对象中的列PSEUDO_COLUMN可能值。
static final int importedKeyCascade
UPDATE_RULE ,表示当主键更新时,外键(导入的键)被更改为与其一致。
对于列DELETE_RULE ,它表示当主键被删除时,导入该键的行被删除。
对于各列的可能值UPDATE_RULE和DELETE_RULE在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeyRestrict
UPDATE_RULE ,表示如果主键作为外键导入另一个表,则可能不更新主键。
对于列DELETE_RULE ,表示如果主键作为外键导入另一个表,则主键可能不会被删除。
对于各列的可能值UPDATE_RULE和DELETE_RULE在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeySetNull
UPDATE_RULE和DELETE_RULE ,指示当主键被更新或删除时,外键(导入的键)被更改为NULL 。
对于各列的可能值UPDATE_RULE和DELETE_RULE在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeyNoAction
UPDATE_RULE和DELETE_RULE ,表示如果主键已导入,则无法更新或删除。
对于各列的可能值UPDATE_RULE和DELETE_RULE在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeySetDefault
UPDATE_RULE和DELETE_RULE ,表示如果主键被更新或删除,则外键(导入的键)被设置为默认值。
对于各列的可能值UPDATE_RULE和DELETE_RULE在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeyInitiallyDeferred
该列的可能值DEFERRABILITY在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeyInitiallyImmediate
该列的可能值DEFERRABILITY在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int importedKeyNotDeferrable
该列的可能值DEFERRABILITY在ResultSet通过所述方法返回的对象getImportedKeys , getExportedKeys和getCrossReference 。
static final int typeNoNulls
NULL值。
在方法getTypeInfo返回的ResultSet对象中的列NULLABLE可能值。
static final int typeNullable
NULL值。
方法getTypeInfo返回的ResultSet对象中的列NULLABLE可能值。
static final int typeNullableUnknown
NULL值。
列的可能值NULLABLE在ResultSet该方法返回对象getTypeInfo 。
static final int typePredNone
WHERE搜索子句。
列的可能值SEARCHABLE在ResultSet该方法返回对象getTypeInfo 。
static final int typePredChar
WHERE使用搜索子句LIKE谓词。
方法getTypeInfo返回的ResultSet对象中的列SEARCHABLE可能值。
static final int typePredBasic
LIKE谓词的WHERE搜索条款中使用。
方法getTypeInfo返回的ResultSet对象中的列SEARCHABLE可能值。
static final int typeSearchable
WHERE搜索子句都可以基于此类型。
列的可能值SEARCHABLE在ResultSet该方法返回对象getTypeInfo 。
static final short tableIndexStatistic
方法getIndexInfo返回的ResultSet对象中的列TYPE可能值。
static final short tableIndexClustered
方法getIndexInfo返回的ResultSet对象中的列TYPE可能值。
static final short tableIndexHashed
列的可能值TYPE在ResultSet该方法返回对象getIndexInfo 。
static final short tableIndexOther
TYPE中ResultSet对象的值可能由方法getIndexInfo返回。
static final short attributeNoNulls
NULL值。
方法getAttributes返回的ResultSet对象中的列NULLABLE可能值。
static final short attributeNullable
NULL值。
方法getAttributes返回的ResultSet对象中的列NULLABLE可能值。
static final short attributeNullableUnknown
NULL是不知道的。
方法getAttributes返回的ResultSet对象中的列NULLABLE可能值。
static final int sqlStateXOpen
DatabaseMetaData.getSQLStateType ,其用于指示该方法返回的值是否
SQLException.getSQLState是X /打开(现在知道的公开组)SQL CLI SQLSTATE值。
static final int sqlStateSQL
DatabaseMetaData.getSQLStateType ,其用于指示该方法返回的值是否
SQLException.getSQLState是SQLSTATE值。
static final int sqlStateSQL99
DatabaseMetaData.getSQLStateType ,其用于指示该方法返回的值是否SQLException.getSQLState是一个SQL99 SQLSTATE值。
注意:这个常数只是出于兼容性原因。 开发人员应该使用常数sqlStateSQL代替。
static final int functionColumnUnknown
可能的值为COLUMN_TYPE在ResultSet由方法getFunctionColumns返回。
static final int functionColumnIn
该列的可能值COLUMN_TYPE在ResultSet该方法返回getFunctionColumns 。
static final int functionColumnInOut
一个可能的值为COLUMN_TYPE的ResultSet返回方法getFunctionColumns 。
static final int functionColumnOut
一个可能的值为COLUMN_TYPE的ResultSet返回方法getFunctionColumns 。
static final int functionReturn
一个可能的值为COLUMN_TYPE在ResultSet返回的方法getFunctionColumns 。
static final int functionColumnResult
一个可能的值为COLUMN_TYPE的ResultSet返回方法getFunctionColumns 。
static final int functionNoNulls
NULL值。
方法getFunctionColumns返回的ResultSet对象中的列NULLABLE可能值。
static final int functionNullable
NULL值。
方法getFunctionColumns返回的ResultSet对象中的列NULLABLE可能值。
static final int functionNullableUnknown
NULL值是未知的。
NULLABLE中的ResultSet对象可能的值由方法getFunctionColumns返回。
static final int functionResultUnknown
列的可能值FUNCTION_TYPE在ResultSet该方法返回对象getFunctions 。
static final int functionNoTable
方法getFunctions返回的ResultSet对象中的列FUNCTION_TYPE可能值。
static final int functionReturnsTable
方法getFunctions返回的ResultSet对象中的列FUNCTION_TYPE可能值。
boolean allProceduresAreCallable()
throws SQLException
getProcedures 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean allTablesAreSelectable()
throws SQLException
getTables在
SELECT语句中返回的所有表。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
String getURL() throws SQLException
null如果无法生成
SQLException - 如果发生数据库访问错误
String getUserName() throws SQLException
SQLException - 如果发生数据库访问错误
boolean isReadOnly()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean nullsAreSortedHigh()
throws SQLException
NULL值是否高排序。
排序高意味着NULL值排序高于域中的任何其他值。
按升序排列,如果此方法返回true , NULL将出现NULL值。
相比之下,方法nullsAreSortedAtEnd指示是否在最后排序NULL值,而不管排序顺序如何。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean nullsAreSortedLow()
throws SQLException
NULL值是否排序低。
排序为低意味着NULL值排序低于域中的任何其他值。
按升序排列,如果此方法返回true ,则NULL时将显示NULL值。
相比之下,方法nullsAreSortedAtStart指示是否在开始排序NULL值,而不管排序顺序如何。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean nullsAreSortedAtStart()
throws SQLException
NULL值在起始处排序,不管排序顺序如何。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean nullsAreSortedAtEnd()
throws SQLException
NULL值,无论排序顺序如何。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
String getDatabaseProductName() throws SQLException
SQLException - 如果发生数据库访问错误
String getDatabaseProductVersion() throws SQLException
SQLException - 如果发生数据库访问错误
String getDriverName() throws SQLException
SQLException - 如果发生数据库访问错误
String getDriverVersion() throws SQLException
String 。
SQLException - 如果发生数据库访问错误
int getDriverMajorVersion()
int getDriverMinorVersion()
boolean usesLocalFiles()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean usesLocalFilePerTable()
throws SQLException
true如果此数据库为每个表使用本地文件;
false另外
SQLException - 如果发生数据库访问错误
boolean supportsMixedCaseIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean storesUpperCaseIdentifiers()
throws SQLException
true如果是这样的话
false否则
SQLException - 如果发生数据库访问错误
boolean storesLowerCaseIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean storesMixedCaseIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsMixedCaseQuotedIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean storesUpperCaseQuotedIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean storesLowerCaseQuotedIdentifiers()
throws SQLException
true如果是的话
false否则
SQLException - 如果发生数据库访问错误
boolean storesMixedCaseQuotedIdentifiers()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
String getIdentifierQuoteString() throws SQLException
SQLException - 如果发生数据库访问错误
String getSQLKeywords() throws SQLException
SQLException - 如果发生数据库访问错误
String getNumericFunctions() throws SQLException
SQLException - 如果发生数据库访问错误
String getStringFunctions() throws SQLException
SQLException - 如果发生数据库访问错误
String getSystemFunctions() throws SQLException
SQLException - 如果发生数据库访问错误
String getTimeDateFunctions() throws SQLException
SQLException - 如果发生数据库访问错误
String getSearchStringEscape() throws SQLException
'_'字符代表任何单个字符; '%'字符表示零个或多个字符的任何序列。
SQLException - 如果发生数据库访问错误
String getExtraNameCharacters() throws SQLException
SQLException - 如果发生数据库访问错误
boolean supportsAlterTableWithAddColumn()
throws SQLException
ALTER TABLE 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsAlterTableWithDropColumn()
throws SQLException
ALTER TABLE 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsColumnAliasing()
throws SQLException
如果是这样,可以使用SQL AS子句为计算列提供名称,或者根据需要为列提供别名。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean nullPlusNonNullIsNull()
throws SQLException
NULL和非
NULL值是
NULL 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsConvert()
throws SQLException
CONVERT以将一种JDBC类型转换为另一种JDBC类型。
JDBC类型是在java.sql.Types定义的通用SQL数据类型。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsConvert(int fromType,
int toType)
throws SQLException
CONVERT的JDBC类型fromType和toType之间的转换。
JDBC类型是java.sql.Types定义的通用SQL数据类型。
fromType - 转换的类型;
其中一种来自类java.sql.Types的类型代码
toType - 要转换的类型;
来自类别java.sql.Types的类型代码java.sql.Types
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
Types
boolean supportsTableCorrelationNames()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsDifferentTableCorrelationNames()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsExpressionsInOrderBy()
throws SQLException
ORDER BY列表中的
ORDER BY 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsOrderByUnrelated()
throws SQLException
SELECT在声明
ORDER BY条款。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsGroupBy()
throws SQLException
GROUP BY子句。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsGroupByUnrelated()
throws SQLException
GROUP BY子句中的
SELECT语句中的
GROUP BY 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsGroupByBeyondSelect()
throws SQLException
SELECT在一份声明中
GROUP BY条款规定,所有在列
SELECT声明都包含在在
GROUP BY条款。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsLikeEscapeClause()
throws SQLException
LIKE escape子句。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsMultipleResultSets()
throws SQLException
execute获取多个
ResultSet对象。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsMultipleTransactions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsNonNullableColumns()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsMinimumSQLGrammar()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCoreSQLGrammar()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsExtendedSQLGrammar()
throws SQLException
true如果是的话
false否则
SQLException - 如果发生数据库访问错误
boolean supportsANSI92EntryLevelSQL()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsANSI92IntermediateSQL()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsANSI92FullSQL()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsIntegrityEnhancementFacility()
throws SQLException
true如果是的话
false另外
SQLException - 如果发生数据库访问错误
boolean supportsOuterJoins()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsFullOuterJoins()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsLimitedOuterJoins()
throws SQLException
true如果方法supportsFullOuterJoins返回true )。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
String getSchemaTerm() throws SQLException
SQLException - 如果发生数据库访问错误
String getProcedureTerm() throws SQLException
SQLException - 如果发生数据库访问错误
String getCatalogTerm() throws SQLException
SQLException - 如果发生数据库访问错误
boolean isCatalogAtStart()
throws SQLException
true如果目录名出现在完全限定表名的开头;
false否则
SQLException - 如果发生数据库访问错误
String getCatalogSeparator() throws SQLException
String此数据库用作类别和表名之间的分隔符。
SQLException - 如果发生数据库访问错误
boolean supportsSchemasInDataManipulation()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSchemasInProcedureCalls()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSchemasInTableDefinitions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSchemasInIndexDefinitions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSchemasInPrivilegeDefinitions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCatalogsInDataManipulation()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCatalogsInProcedureCalls()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCatalogsInTableDefinitions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCatalogsInIndexDefinitions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCatalogsInPrivilegeDefinitions()
throws SQLException
true如果是这样的话
false否则
SQLException - 如果发生数据库访问错误
boolean supportsPositionedDelete()
throws SQLException
DELETE语句。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsPositionedUpdate()
throws SQLException
UPDATE语句。
true如果是的话
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSelectForUpdate()
throws SQLException
SELECT FOR UPDATE语句。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsStoredProcedures()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSubqueriesInComparisons()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSubqueriesInExists()
throws SQLException
EXISTS查询。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSubqueriesInIns()
throws SQLException
IN查询。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsSubqueriesInQuantifieds()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsCorrelatedSubqueries()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsUnion()
throws SQLException
UNION 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsUnionAll()
throws SQLException
UNION ALL 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsOpenCursorsAcrossCommit()
throws SQLException
true如果游标始终保持打开状态;
false如果他们可能不保持打开
SQLException - 如果发生数据库访问错误
boolean supportsOpenCursorsAcrossRollback()
throws SQLException
true如果游标始终保持打开状态;
false如果他们可能不会保持开放
SQLException - 如果发生数据库访问错误
boolean supportsOpenStatementsAcrossCommit()
throws SQLException
true if语句总是保持打开状态;
false如果他们可能不会保持开放
SQLException - 如果发生数据库访问错误
boolean supportsOpenStatementsAcrossRollback()
throws SQLException
true if语句总是保持打开;
false如果他们可能不会保持开放
SQLException - 如果发生数据库访问错误
int getMaxBinaryLiteralLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxCharLiteralLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxColumnNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxColumnsInGroupBy()
throws SQLException
GROUP BY子句中允许的最大列数。
SQLException - 如果发生数据库访问错误
int getMaxColumnsInIndex()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxColumnsInOrderBy()
throws SQLException
ORDER BY子句中允许的最大列数。
SQLException - 如果发生数据库访问错误
int getMaxColumnsInSelect()
throws SQLException
SELECT列表中
SELECT此数据库允许的最大列数。
SQLException - 如果发生数据库访问错误
int getMaxColumnsInTable()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxConnections()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxCursorNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxIndexLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxSchemaNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxProcedureNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxCatalogNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxRowSize()
throws SQLException
SQLException - 如果数据库访问错误发生
boolean doesMaxRowSizeIncludeBlobs()
throws SQLException
getMaxRowSize的返回值是否包含SQL数据类型
LONGVARCHAR和
LONGVARBINARY 。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
int getMaxStatementLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxStatements()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxTableNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getMaxTablesInSelect()
throws SQLException
SELECT声明。
SELECT语句中允许的最大表数;
零的结果意味着没有限制或限制是不知道的
SQLException - 如果发生数据库访问错误
int getMaxUserNameLength()
throws SQLException
SQLException - 如果发生数据库访问错误
int getDefaultTransactionIsolation()
throws SQLException
java.sql.Connection中定义。
SQLException - 如果发生数据库访问错误
Connection
boolean supportsTransactions()
throws SQLException
commit是noop,隔离级别是TRANSACTION_NONE 。
true如果支持交易;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsTransactionIsolationLevel(int level)
throws SQLException
level - java.sql.Connection中定义的事务隔离级别
java.sql.Connection
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
Connection
boolean supportsDataDefinitionAndDataManipulationTransactions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsDataManipulationTransactionsOnly()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean dataDefinitionCausesTransactionCommit()
throws SQLException
true如果是这样的话
false否则
SQLException - 如果发生数据库访问错误
boolean dataDefinitionIgnoredInTransactions()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException
仅返回与模式和过程名称标准相匹配的过程描述。 他们被下令PROCEDURE_CAT , PROCEDURE_SCHEM , PROCEDURE_NAME和SPECIFIC_ NAME 。
每个过程描述都具有以下列:
=>过程目录(可能为null ) =>过程模式(可以是null ) =>过程名称 =>对过程的解释性评论 =>种程序:
=>在其模式中唯一标识此=>的名称。 用户可能没有权限执行getProcedures返回的getProcedures
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示不应该使用模式名称来缩小搜索范围
procedureNamePattern - 程序名称模式;
必须与存储在数据库中的过程名称相匹配
ResultSet - 每行是一个过程描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException
仅返回与模式,过程和参数名称标准相匹配的描述。 它们由PROCEDURE_CAT,PROCEDURE_SCHEM,PROCEDURE_NAME和SPECIFIC_NAME命令。 在这里,返回值(如果有的话)是第一个。 接下来是呼叫顺序中的参数说明。 列描述按照列号顺序。
ResultSet中的每一行是带有以下字段的参数描述或列描述:
=>过程目录(可能为null ) =>过程模式(可能为null ) =>过程名称 =>列/参数名称 =>列/参数:
ResultSet =>来自java.sql.Types的SQL类型 => SQL类型名称,对于UDT类型,类型名称是完全限定的 =>精度 =>以字节为单位的数据长度 => scale - 为SCALE不适用的数据类型返回null。 =>基数 =>可以包含NULL。
=>描述参数/列 =>列的默认值,当值以单引号括起时,应将其解释为字符串(可能为null )
=>保留供将来使用 =>保留供将来使用 =>基于二进制和字符的列的最大长度。 对于任何其他数据类型,返回的值为NULL =>从1开始的顺序位置,用于过程的输入和输出参数。 如果此行描述过程的返回值,则返回值0。 对于结果集列,它是从1开始的结果集中的列的顺序位置。如果有多个结果集,则列序号位置是实现定义的。 => ISO规则用于确定列的可空性。
=>在其模式中唯一标识此=>的名称。 注意:某些数据库可能不返回过程的列描述。
PRECISION列表示给定列的指定列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
procedureNamePattern - 过程名称模式;
必须与存储在数据库中的过程名称相匹配
columnNamePattern - 列名称模式;
必须匹配存储在数据库中的列名称
ResultSet - 每行描述一个存储过程参数或列
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException
TABLE_TYPE , TABLE_CAT , TABLE_SCHEM和TABLE_NAME 。
每个表格描述包含以下列:
=>表目录(可能为null ) =>表格式(可能为null ) =>表名 =>表类型。 典型的类型是“TABLE”,“VIEW”,“SYSTEM TABLE”,“GLOBAL TEMPORARY”,“LOCAL TEMPORARY”,“ALIAS”,“SYNONYM”。 =>对表的解释性评论 =>类型目录(可能为null ) =>类型模式(可能是null ) =>类型名称(可能为null ) =>类型表的指定“标识符”列的名称(可能为null ) =>指定如何创建SELF_REFERENCING_COL_NAME中的值。 值为“SYSTEM”,“USER”,“DERIVED”。 (可能是null ) 注意:某些数据库可能不返回所有表的信息。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
tableNamePattern - 表名模式;
必须匹配存储在数据库中的表名称
types - 表格类型的列表,它们必须来自于从getTableTypes()返回的表格类型列表,以包括;
null返回所有类型
ResultSet - 每一行都是一个表的描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getSchemas() throws SQLException
TABLE_CATALOG和TABLE_SCHEM 。
模式列为:
=>模式名称 =>目录名称(可能为null ) ResultSet对象,其中每行都是模式描述
SQLException - 如果发生数据库访问错误
ResultSet getCatalogs() throws SQLException
目录栏是:
=>目录名称 ResultSet对象,其中每行具有单个
String列,即目录名称
SQLException - 如果发生数据库访问错误
ResultSet getTableTypes() throws SQLException
表格类型是:
=>表类型。 典型的类型是“TABLE”,“VIEW”,“SYSTEM TABLE”,“GLOBAL TEMPORARY”,“LOCAL TEMPORARY”,“ALIAS”,“SYNONYM”。 ResultSet对象,其中每行具有单个
String列,即表类型
SQLException - 如果发生数据库访问错误
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
仅返回与目录,模式,表和列名称标准相匹配的列描述。 他们被下令TABLE_CAT , TABLE_SCHEM , TABLE_NAME和ORDINAL_POSITION 。
每列描述具有以下列:
=>表目录(可能为null ) =>表格式(可能是null ) =>表名 =>列名 => SQL类型 =>数据源相关类型名称,对于UDT,类型名称是完全限定的 =>列大小。 =>小数位数。 对于DECIMAL_DIGITS不适用的数据类型,返回空值。 =>基数(通常为10或2) =>允许NULL。
NULL值 NULL值 =>注释描述列(可能为null ) =>列的默认值,当值以单引号括起时,应将其解释为字符串(可能为null ) => =>未使用 =>用于char类型列中最大字节数 =>表中的列索引(从1开始) => ISO规则用于确定列的可空性。
=>目录表的,它是引用属性的范围( null如果DATA_TYPE不是REF) =>作为参考属性范围的表格( null如果DATA_TYPE不是REF) =>表名称,该引用属性的(范围null如果DATA_TYPE不是REF) =>源类型来自java.sql.Types的独特的类型或用户生成Ref类型,SQL型的( null如果DATA_TYPE不是DISTINCT或用户生成的REF) =>指示此列是否自动递增
=>指示这是否是生成的列
COLUMN_SIZE列指定给定列的列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示不应该使用模式名称来缩小搜索范围
tableNamePattern - 表名模式;
必须匹配存储在数据库中的表名称
columnNamePattern - 列名称模式;
必须匹配存储在数据库中的列名称
ResultSet - 每行都是列描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException
只返回匹配列名称条件的权限。 它们由COLUMN_NAME和PRIVILEGE命令。
每个权限描述都具有以下列:
=>表目录(可能为null ) =>表格式(可能是null ) =>表名 =>列名称 =>设保人访问(可能为null ) =>访问=>人 =>访问名称(SELECT,INSERT,UPDATE,REFRENCES,...) =>如果受让人被允许授予他人, => “是” “否”如果没有; null如果未知 catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在数据库中的表名称
columnNamePattern - 列名称模式;
必须匹配存储在数据库中的列名称
ResultSet - 每行都是列特权描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
只返回匹配模式和表名称条件的权限。 他们被下令TABLE_CAT , TABLE_SCHEM , TABLE_NAME和PRIVILEGE 。
每个权限描述都具有以下列:
=>表目录(可能为null ) =>表格式(可能为null ) =>表名 =>设保人访问(可能为null ) =>接受授权 =>访问名称(SELECT,INSERT,UPDATE,REFRENCES,...) => “是”如果被授权者被允许授予他人; “否”如果没有; null如果未知 catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
tableNamePattern - 表名称模式;
必须匹配存储在数据库中的表名称
ResultSet - 每行都是一个表特权描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException
每列描述具有以下列:
=>实际结果范围
=>列名 =>来自java.sql.Types的SQL数据类型 =>数据源相关类型名称,对于UDT,类型名称是完全限定的 =>精度 =>未使用 => scale - 对于DECIMAL_DIGITS不适用的数据类型返回空值。 =>是一个类似Oracle ROWID的伪列
COLUMN_SIZE列表示给定列的指定列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在数据库中的表名称
scope - 感兴趣的范围;
使用与SCOPE相同的值
nullable - 包含可空的列。
ResultSet - 每行都是列描述
SQLException - 如果发生数据库访问错误
ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
每列描述具有以下列:
=>未使用 =>列名称 => SQL数据类型,从java.sql.Types =>数据源相关类型名称 =>精度 =>列值的长度,以字节为单位 => scale - 对于DECIMAL_DIGITS不适用的数据类型返回空值。 =>这是伪列如Oracle ROWID
COLUMN_SIZE列表示给定列的指定列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在数据库中的表名称
ResultSet对象,其中每行都是列描述
SQLException - 如果发生数据库访问错误
ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException
每个主键列描述具有以下列:
=>表目录(可能为null ) =>表格式(可能为null ) =>表名 =>列名 =>主键中的序列号(值1表示主键的第一列,值2表示主键中的第二列)。 =>主键名称(可能为null ) catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在数据库中的表名称
ResultSet - 每行是主键列描述
SQLException - 如果发生数据库访问错误
ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
每个主键列描述具有以下列:
=> (可能为null ) =>正在导入的主键表模式(可能为null ) => => =>外键表目录(可能为null ) =>外键表格式(可能为null ) =>外键表名 =>外键列名 =>外键中的序列号(值1表示外键的第一列,值2表示外键中的第二列)。 =>主键更新时外键会发生什么:
NULL导入的键更改为NULL =>当删除主键时,外键会发生什么。
=>外键名称(可能为null ) =>主键名称(可能为null ) =>可以将外键约束的评估推迟到提交
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在数据库中的表名称
ResultSet - 每行是主键列描述
SQLException - 如果发生数据库访问错误
getExportedKeys(java.lang.String, java.lang.String, java.lang.String)
ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
每个外键列描述具有以下列:
=>主键表目录(可能为null ) =>主键表格式(可能为null ) =>主键表名 =>主键列名称 =>正在出口的外键表目录(可能为null )(可能为null ) =>正在导出的外键表格式(可能为null )(可能为null ) =>正在导出的外键表名 =>外键列名 =>外键序列号(值1表示外键的第一列,值2表示外键中的第二列)。 =>主更新时外键会发生什么:
NULL导入的键更改为NULL =>当删除主键时,外键会发生什么。
NULL导入的键更改为NULL =>外键名称(可能为null ) =>主键名称(可能为null ) =>可以将外键约束的评估推迟到提交
catalog - 目录名称;
必须匹配存储在此数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在此数据库中的表名称
ResultSet对象,其中每行是外键列描述
SQLException - 如果发生数据库访问错误
getImportedKeys(java.lang.String, java.lang.String, java.lang.String)
ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
每个外键列描述具有以下列:
=>父键表目录(可能为null ) =>父键表模式(可能为null ) =>父键表名 =>父键列名 =>正在导出的外键表目录(可能为null )(可能为null ) =>正在导出的外键表格式(可能为null )(可能为null ) =>正在导出的外键表名 =>正在导出的外键列名 =>外键序列号(值为1表示外键的第一列,值2表示外键中的第二列)。 =>父键更新时外键会发生什么:
NULL导入的键更改为NULL =>删除父键时,外键会发生什么。
NULL导入的键更改为NULL =>外键名称(可能为null ) =>父密钥名称(可能为null ) =>可以将外键约束的评估推迟到提交之前
parentCatalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示从选择条件删除目录名称
parentSchema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示从选择条件中删除模式名称
parentTable - 导出密钥的表的名称;
必须匹配存储在数据库中的表名称
foreignCatalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示从选择条件中删除目录名称
foreignSchema - 模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null表示从选择条件中删除模式名称
foreignTable - 导入密钥的表的名称;
必须匹配存储在数据库中的表名称
ResultSet - 每行是外键列描述
SQLException - 如果发生数据库访问错误
getImportedKeys(java.lang.String, java.lang.String, java.lang.String)
ResultSet getTypeInfo() throws SQLException
如果数据库支持SQL distinct类型,那么getTypeInfo()将返回一行具有DISTINCT的TYPE_NAME和Types.DISTINCT的DATA_TYPE。 如果数据库支持SQL结构化类型,那么getTypeInfo()将返回一个TYPE_NAME为STRUCT和DATA_TYPE为Types.STRUCT的单行。
如果支持SQL不同或结构化类型,则可以从getUDTs()方法获取有关各个类型的信息。
每个类型的描述都有以下列:
=>类型名称 => SQL数据类型 =>最大精度 =>用于引用文字的前缀(可能为null ) =>用于引用文字的后缀(可能是null ) =>用于创建类型的参数(可能为null ) =>可以为此类型使用NULL。
=>是区分大小写的。 =>可以使用基于此类型的“WHERE”:
=>是无符号的。 =>可以是一个货币值。 =>可以用于自动递增值。 =>类型名称的本地化版本(可能为null ) =>最小比例 =>最大比例 => =>未使用 =>通常为2或10 PRECISION列表示服务器为给定数据类型支持的最大列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
ResultSet对象,其中每行都是SQL类型描述
SQLException - 如果发生数据库访问错误
ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException
每个索引列描述具有以下列:
=>表目录(可能为null ) =>表格式(可能为null ) =>表名 =>索引值不唯一。 TYPE为tableIndexStatistic时为false =>索引目录(可能为null ); null当TYPE为tableIndexStatistic =>索引名称; null当TYPE为tableIndexStatistic =>索引类型:
=>索引中的列序列号; TYPE为tableIndexStatistic时为零 =>列名称; null当TYPE为tableIndexStatistic =>列排序序列,“A” =>升序,“D” =>下降,可能是null如果不支持排序顺序; null当TYPE是tableIndexStatistic =>当TYPE是tableIndexStatistic时,这是表中的行数; 否则,它是索引中唯一值的数量。 =>当TYPE是tableIndexStatisic时,这是用于表的页数,否则是当前索引使用的页数。 =>过滤条件(如果有)。 (可能是null ) catalog - 目录名称;
必须匹配存储在此数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schema - 模式名称;
必须与存储在此数据库中的模式名称相匹配;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
table - 表名;
必须匹配存储在此数据库中的表名称
unique - 如果为true,则只返回唯一值的索引;
当假,返回指数,不管是否唯一
approximate - 如果为true,则允许结果反映近似值或数据值;
如果虚假,请求结果准确
ResultSet - 每行是索引列描述
SQLException - 如果发生数据库访问错误
boolean supportsResultSetType(int type)
throws SQLException
type - 在
java.sql.ResultSet定义
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
Connection
boolean supportsResultSetConcurrency(int type,
int concurrency)
throws SQLException
type - 在
java.sql.ResultSet定义
concurrency - 在
java.sql.ResultSet定义的
java.sql.ResultSet
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
Connection
boolean ownUpdatesAreVisible(int type)
throws SQLException
ResultSet对象,结果集的自己的更新是可见的。
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果给定结果集类型的更新可见;
false否则
SQLException - 如果发生数据库访问错误
boolean ownDeletesAreVisible(int type)
throws SQLException
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果删除对于给定的结果集类型可见;
false否则
SQLException - 如果发生数据库访问错误
boolean ownInsertsAreVisible(int type)
throws SQLException
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果给定的结果集类型的插入是可见的;
false否则
SQLException - 如果发生数据库访问错误
boolean othersUpdatesAreVisible(int type)
throws SQLException
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果其他人所做的更新对于给定的结果集类型可见;
false否则
SQLException - 如果发生数据库访问错误
boolean othersDeletesAreVisible(int type)
throws SQLException
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果其他人所做的删除对于给定的结果集类型可见;
false否则
SQLException - 如果发生数据库访问错误
boolean othersInsertsAreVisible(int type)
throws SQLException
type - ResultSet类型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果其他人所做的插入对于给定的结果集类型可见;
false否则
SQLException - 如果发生数据库访问错误
boolean updatesAreDetected(int type)
throws SQLException
ResultSet.rowUpdated检测到可见行更新。
type - ResultSet型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果结果集类型检测到更改;
false否则
SQLException - 如果发生数据库访问错误
boolean deletesAreDetected(int type)
throws SQLException
ResultSet.rowDeleted可以检测到可见行删除。
如果方法deletesAreDetected返回false ,则意味着删除的行将从结果集中删除。
type - ResultSet类型;
之一ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE ,或ResultSet.TYPE_SCROLL_SENSITIVE
true如果由给定的结果集类型检测到删除;
false否则
SQLException - 如果发生数据库访问错误
boolean insertsAreDetected(int type)
throws SQLException
ResultSet.rowInserted检测到可见的行插入。
type - ResultSet类型;
ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE或ResultSet.TYPE_SCROLL_SENSITIVE
true如果由指定的结果集类型检测到更改;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsBatchUpdates()
throws SQLException
true如果此数据库支持批量更新;
false否则
SQLException - 如果发生数据库访问错误
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException
JAVA_OBJECT , STRUCT ,或DISTINCT 。
只返回匹配目录,模式,类型名称和类型条件的类型。 他们被下令DATA_TYPE , TYPE_CAT , TYPE_SCHEM和TYPE_NAME 。 type name参数可能是一个完全限定名称。 在这种情况下,目录和schemaPattern参数将被忽略。
每个类型的描述都有以下列:
=>该类型的目录(可能为null ) =>类型的模式(可能是null ) =>类型名称 => Java类名 =>在java.sql.Types中定义的类型值。 JAVA_OBJECT,STRUCT或DISTINCT之一 =>对类型的解释性评论 => DISTINCT类型的源类型的类型代码或实现java.sql.Types中定义的结构化类型的SELF_REFERENCING_COLUMN的用户生成的引用类型的类型( null如果DATA_TYPE不是DISTINCT或不是STRUCT与REFERENCE_GENERATION = USER_DEFINED) 注意:如果驱动程序不支持UDT,则返回空结果集。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式模式名称;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
typeNamePattern - 类型名称模式;
必须匹配存储在数据库中的类型名称;
可能是一个完全合格的名称
types - 要包括的用户定义类型(JAVA_OBJECT,STRUCT或DISTINCT)的列表;
null返回所有类型
ResultSet对象,其中每行描述一个UDT
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
Connection getConnection() throws SQLException
SQLException - 如果发生数据库访问错误
boolean supportsSavepoints()
throws SQLException
true如果保存点被支持;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsNamedParameters()
throws SQLException
true如果命名参数被支持;
false否则
SQLException - 如果发生数据库访问错误
boolean supportsMultipleOpenResults()
throws SQLException
ResultSet对象从一个返回
CallableStatement对象同时进行。
true如果一个CallableStatement对象可以同时返回多个ResultSet对象;
false否则
SQLException - 如果发生datanase访问错误
boolean supportsGetGeneratedKeys()
throws SQLException
true如果在执行语句后可以检索自动生成的键;
false否则
如果返回true ,则JDBC驱动程序必须支持至少返回SQL INSERT语句的自动生成的密钥
SQLException - 如果发生数据库访问错误
ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException
仅返回与目录,模式和类型名称匹配的UDT的超类型信息。 type name参数可能是一个完全限定名称。 当提供的UDT名称是完全限定名称时,将忽略catalog和schemaPattern参数。
如果UDT没有直接超类型,那么它不在这里列出。 该方法返回的ResultSet对象的行描述了指定的UDT和直接超类型。 一行有以下列:
=> UDT的目录(可能为null ) => UDT的模式(可能是null ) => UDT的类型名称 =>直接超类型的目录(可能是null ) =>直接超类型的模式(可能是null ) =>直接超类型的名称 注意:如果驱动程序不支持类型层次结构,则返回空结果集。
catalog - 目录名称;
“”检索没有目录的那些;
null表示从选择条件中删除目录名称
schemaPattern - 模式名称模式;
“”检索没有模式的那些
typeNamePattern - 一个UDT名称模式;
可能是一个完全合格的名称
ResultSet对象,其中一行提供有关指定UDT的信息
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
仅返回与目录,模式和表名称匹配的表的超级信息。 表名称参数可能是完全限定名称,在这种情况下,将忽略catalog和schemaPattern参数。 如果表没有超级表,则不在此处列出。 必须在与子表相同的目录和模式中定义超级。 因此,该类型描述不需要包含该信息为supertable。
每个类型的描述都有以下列:
=>该类型的目录(可能为null ) =>类型的模式(可能是null ) =>类型名称 =>直接超类型的名称 注意:如果驱动程序不支持类型层次结构,则返回空结果集。
catalog - 目录名称;
“”检索没有目录的那些;
null表示从选择条件中删除目录名称
schemaPattern - 模式名称模式;
“”检索没有模式的那些
tableNamePattern - 表名模式;
可能是一个完全合格的名称
ResultSet对象,其中每行是类型描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException
仅针对与目录,模式,类型和属性名称标准匹配的UDT的属性返回说明。 他们被下令TYPE_CAT , TYPE_SCHEM , TYPE_NAME和ORDINAL_POSITION 。 此描述不包含继承的属性。
返回的ResultSet对象具有以下列:
=>类型目录(可能为null ) =>型式(可能为null ) =>类型名称 =>属性名称 =>属性类型来自java.sql.Types的SQL类型 =>数据源相关类型名称。 对于UDT,类型名称是完全限定的。 对于REF,类型名称是完全限定的,并且表示引用类型的目标类型。 =>列大小。 对于char或date类型,这是最大字符数; 对于数字或十进制类型,这是精度。 =>小数位数。 对于DECIMAL_DIGITS不适用的数据类型,返回空值。 =>基数(通常为10或2) =>是否允许NULL
=>注释描述列(可能为null ) =>默认值(可能为null ) =>未使用 =>未使用 =>用于char类型列中最大字节数 => UDT =>索引(从1开始) => ISO规则用于确定属性的可空性。
=>目录表的,它是引用属性的范围( null如果DATA_TYPE不是REF) =>作为参考属性范围的表格( null如果DATA_TYPE不是REF) =>表名称,它是引用属性的范围( null如果DATA_TYPE不是REF) =>源类型来自java.sql.Types的独特的类型或用户生成Ref类型,SQL型的( null如果DATA_TYPE不是DISTINCT或用户生成的REF) catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名来缩小搜索范围
typeNamePattern - 类型名称模式;
必须匹配存储在数据库中的类型名称
attributeNamePattern - 属性名称模式;
必须匹配在数据库中声明的属性名称
ResultSet对象,其中每行是属性描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
boolean supportsResultSetHoldability(int holdability)
throws SQLException
holdability - 以下常数之一:
ResultSet.HOLD_CURSORS_OVER_COMMIT或
ResultSet.CLOSE_CURSORS_AT_COMMIT
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
Connection
int getResultSetHoldability()
throws SQLException
ResultSet对象的默认保持性。
ResultSet.HOLD_CURSORS_OVER_COMMIT或ResultSet.CLOSE_CURSORS_AT_COMMIT
SQLException - 如果发生数据库访问错误
int getDatabaseMajorVersion()
throws SQLException
SQLException - 如果发生数据库访问错误
int getDatabaseMinorVersion()
throws SQLException
SQLException - 如果发生数据库访问错误
int getJDBCMajorVersion()
throws SQLException
SQLException - 如果发生数据库访问错误
int getJDBCMinorVersion()
throws SQLException
SQLException - 如果发生数据库访问错误
int getSQLStateType()
throws SQLException
SQLException.getSQLState是在X / Open(现在称为Open集团)SQL CLI还是SQL:2003。
SQLException - 如果发生数据库访问错误
boolean locatorsUpdateCopy()
throws SQLException
true如果更新了LOB的副本;
false如果更新是直接对LOB进行的
SQLException - 如果发生数据库访问错误
boolean supportsStatementPooling()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
RowIdLifetime getRowIdLifetime() throws SQLException
ROWID类型,如果是,则RowId对象保持有效的生命周期。
返回的int值具有以下关系:
ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION < ROWID_VALID_SESSION < ROWID_VALID_FOREVER
所以有条件逻辑如
if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)
可以使用。
“有效期永远”表示所有会话中有效,对于会话有效,表示其所有所有交易均有效。
RowId
SQLException - 如果发生数据库访问错误
ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException
TABLE_CATALOG和TABLE_SCHEM 。
模式列为:
=>模式名称 =>目录名(可能为null ) catalog - 目录名称;
必须匹配存储在数据库中的目录名称;“”检索没有目录的目录;
null表示目录名称不应用于缩小搜索范围。
schemaPattern - 模式名称;
必须匹配存储在数据库中的模式名称;
null表示模式名称不应用于缩小搜索范围。
ResultSet对象,其中每一行都是模式描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
boolean supportsStoredFunctionsUsingCallSyntax()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
boolean autoCommitFailureClosesAllResultSets()
throws SQLException
SQLException当autoCommit为true指示所有打开的ResultSets已关闭,即使那些可保持。
当SQLException时发生自动提交是true ,这是供应商特定的,或者做既不提交也不回滚JDBC驱动程序是否符合提交操作,回滚操作响应。
这种差异的潜在结果是可否保存的ResultSet是否关闭。
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
ResultSet getClientInfoProperties() throws SQLException
=>客户端信息属性的名称 =>属性值的最大长度 =>的默认值 =>属性的描述。 这通常包含有关数据库中存储该属性的信息。 ResultSet按NAME列排序
ResultSet对象;
每一行都是支持的客户端信息属性
SQLException - 如果发生数据库访问错误
ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException
只返回与模式和函数名称标准相匹配的系统和用户函数说明。 他们被下令FUNCTION_CAT , FUNCTION_SCHEM , FUNCTION_NAME和SPECIFIC_ NAME 。
每个功能描述都具有以下列:
=>功能目录(可能为null ) =>函数模式(可能是null ) =>函数名。 这是用于调用该函数的名称 =>对功能的解释性注释 =>种功能:
=>在其模式中唯一标识此函数的名称。 这是一个用户指定的,或DBMS生成的名称,可能与FUNCTION_NAME ,例如具有过载功能 用户可能没有权限执行getFunctions返回的getFunctions
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
functionNamePattern - 函数名称模式;
必须匹配存储在数据库中的函数名称
ResultSet - 每行是一个函数描述
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException
仅返回与模式,函数和参数名称标准相匹配的描述。 他们被下令FUNCTION_CAT , FUNCTION_SCHEM , FUNCTION_NAME和SPECIFIC_ NAME 。 在这里,返回值(如果有的话)是第一个。 接下来是呼叫顺序中的参数说明。 列描述按照列号顺序。
ResultSet中的每一行是一个参数描述,列描述或返回类型描述,具有以下字段:
=>功能目录(可能为null ) =>函数模式(可能是null ) =>函数名。 这是用于调用该函数的名称 =>列/参数名称 =>列/参数:
ResultSet => SQL类型 => SQL类型名称,对于UDT类型,类型名称是完全限定的 =>精度 =>以字节为单位的数据长度 => scale - 对于SCALE不适用的数据类型返回null。 =>基数 =>可以包含NULL。
=>说明列/参数的注释 =>基于二进制和字符的参数或列的最大长度。 对于任何其他数据类型,返回的值为NULL =>的序数位置,从1开始,用于输入和输出参数。 如果此行描述函数的返回值,则返回值为0。 对于结果集列,它是从1开始的结果集中的列的顺序位置。 => ISO规则用于确定参数或列的可空性。
=>在其模式中唯一标识此函数的名称。 这是一个用户指定的,或DBMS生成的名称,可能与FUNCTION_NAME ,例如具有过载功能 PRECISION列表示给定参数或列的指定列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null意味着目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
functionNamePattern - 过程名称模式;
必须匹配存储在数据库中的函数名称
columnNamePattern - 参数名称模式;
必须匹配存储在数据库中的参数或列名称
ResultSet - 每行描述用户函数参数,列或返回类型
SQLException - 如果发生数据库访问错误
getSearchStringEscape()
ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
仅返回与目录,模式,表和列名称标准相匹配的列描述。 他们被下令TABLE_CAT , TABLE_SCHEM , TABLE_NAME和COLUMN_NAME 。
每列描述具有以下列:
=>表目录(可能为null ) =>表格式(可能为null ) =>表名 =>列名 =>来自java.sql.Types的SQL类型 =>列大小。 =>小数位数。 对于DECIMAL_DIGITS不适用的数据类型,返回空值。 =>基数(通常为10或2) =>列的允许使用。 返回的值将对应于返回的枚举名PseudoColumnUsage.name() =>注释描述列(可能为null ) =>用于char类型列中最大字节数 => ISO规则用于确定列的可空性。
COLUMN_SIZE列指定给定列的列大小。 对于数值数据,这是最大精度。 对于字符数据,这是字符长度。 对于datetime数据类型,这是String表示形式的长度(假定分数秒分量的最大允许精度)。 对于二进制数据,这是以字节为单位的长度。 对于ROWID数据类型,这是以字节为单位的长度。 对于列大小不适用的数据类型,返回空值。
catalog - 目录名称;
必须匹配存储在数据库中的目录名称;
“”检索没有目录的那些;
null表示目录名称不应用于缩小搜索范围
schemaPattern - 模式名称模式;
必须匹配存储在数据库中的模式名称;
“”检索没有模式的那些;
null意味着不应该使用模式名称来缩小搜索范围
tableNamePattern - 表名模式;
必须匹配存储在数据库中的表名称
columnNamePattern - 列名称模式;
必须匹配存储在数据库中的列名称
ResultSet - 每行都是列描述
SQLException - 如果发生数据库访问错误
PseudoColumnUsage
boolean generatedKeyAlwaysReturned()
throws SQLException
true如果是的话;
false否则
SQLException - 如果发生数据库访问错误
default long getMaxLogicalLobSize()
throws SQLException
LOB的逻辑大小的最大字节数。
默认实现将返回0
SQLException - 如果发生数据库访问错误
default boolean supportsRefCursors()
throws SQLException
默认实现将返回false
true如果这个数据库支持REF CURSOR;
false否则
SQLException - 如果发生数据库访问错误
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.