1. /*
  2. * @(#)DatabaseMetaData.java 1.52 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.sql;
  8. /**
  9. * Comprehensive information about the database as a whole.
  10. * <P>
  11. * This interface is implemented by driver vendors to let users know the capabilities
  12. * of a Database Management System (DBMS) in combination with
  13. * the driver based on JDBC<sup><font size=-2>TM</font></sup> technology
  14. * ("JDBC driver") that is used with it. Different relational DBMSs often support
  15. * different features, implement features in different ways, and use different
  16. * data types. In addition, a driver may implement a feature on top of what the
  17. * DBMS offers. Information returned by methods in this interface applies
  18. * to the capabilities of a particular driver and a particular DBMS working
  19. * together. Note that as used in this documentation, the term "database" is
  20. * used generically to refer to both the driver and DBMS.
  21. * <P>
  22. * A user for this interface is commonly a tool that needs to discover how to
  23. * deal with the underlying DBMS. This is especially true for applications
  24. * that are intended to be used with more than one DBMS. For example, a tool might use the method
  25. * <code>getTypeInfo</code> to find out what data types can be used in a
  26. * <code>CREATE TABLE</code> statement. Or a user might call the method
  27. * <code>supportsCorrelatedSubqueries</code> to see if it is possible to use
  28. * a correlated subquery or <code>supportsBatchUpdates</code> to see if it is
  29. * possible to use batch updates.
  30. * <P>
  31. * Some <code>DatabaseMetaData</code> methods return lists of information
  32. * in the form of <code>ResultSet</code> objects.
  33. * Regular <code>ResultSet</code> methods, such as
  34. * <code>getString</code> and <code>getInt</code>, can be used
  35. * to retrieve the data from these <code>ResultSet</code> objects. If
  36. * a given form of metadata is not available, the <code>ResultSet</code>
  37. * getter methods throw an <code>SQLException</code>.
  38. * <P>
  39. * Some <code>DatabaseMetaData</code> methods take arguments that are
  40. * String patterns. These arguments all have names such as fooPattern.
  41. * Within a pattern String, "%" means match any substring of 0 or more
  42. * characters, and "_" means match any one character. Only metadata
  43. * entries matching the search pattern are returned. If a search pattern
  44. * argument is set to <code>null</code>, that argument's criterion will
  45. * be dropped from the search.
  46. * <P>
  47. * A method that gets information about a feature that the driver does not
  48. * support will throw an <code>SQLException</code>.
  49. * In the case of methods that return a <code>ResultSet</code>
  50. * object, either a <code>ResultSet</code> object (which may be empty) is
  51. * returned or an <code>SQLException</code> is thrown.
  52. */
  53. public interface DatabaseMetaData {
  54. //----------------------------------------------------------------------
  55. // First, a variety of minor information about the target database.
  56. /**
  57. * Retrieves whether the current user can call all the procedures
  58. * returned by the method <code>getProcedures</code>.
  59. *
  60. * @return <code>true</code> if so; <code>false</code> otherwise
  61. * @exception SQLException if a database access error occurs
  62. */
  63. boolean allProceduresAreCallable() throws SQLException;
  64. /**
  65. * Retrieves whether the current user can use all the tables returned
  66. * by the method <code>getTables</code> in a <code>SELECT</code>
  67. * statement.
  68. *
  69. * @return <code>true</code> if so; <code>false</code> otherwise
  70. * @exception SQLException if a database access error occurs
  71. */
  72. boolean allTablesAreSelectable() throws SQLException;
  73. /**
  74. * Retrieves the URL for this DBMS.
  75. *
  76. * @return the URL for this DBMS or <code>null</code> if it cannot be
  77. * generated
  78. * @exception SQLException if a database access error occurs
  79. */
  80. String getURL() throws SQLException;
  81. /**
  82. * Retrieves the user name as known to this database.
  83. *
  84. * @return the database user name
  85. * @exception SQLException if a database access error occurs
  86. */
  87. String getUserName() throws SQLException;
  88. /**
  89. * Retrieves whether this database is in read-only mode.
  90. *
  91. * @return <code>true</code> if so; <code>false</code> otherwise
  92. * @exception SQLException if a database access error occurs
  93. */
  94. boolean isReadOnly() throws SQLException;
  95. /**
  96. * Retrieves whether <code>NULL</code> values are sorted high.
  97. * Sorted high means that <code>NULL</code> values
  98. * sort higher than any other value in a domain. In an ascending order,
  99. * if this method returns <code>true</code>, <code>NULL</code> values
  100. * will appear at the end. By contrast, the method
  101. * <code>nullsAreSortedAtEnd</code> indicates whether <code>NULL</code> values
  102. * are sorted at the end regardless of sort order.
  103. *
  104. * @return <code>true</code> if so; <code>false</code> otherwise
  105. * @exception SQLException if a database access error occurs
  106. */
  107. boolean nullsAreSortedHigh() throws SQLException;
  108. /**
  109. * Retrieves whether <code>NULL</code> values are sorted low.
  110. * Sorted low means that <code>NULL</code> values
  111. * sort lower than any other value in a domain. In an ascending order,
  112. * if this method returns <code>true</code>, <code>NULL</code> values
  113. * will appear at the beginning. By contrast, the method
  114. * <code>nullsAreSortedAtStart</code> indicates whether <code>NULL</code> values
  115. * are sorted at the beginning regardless of sort order.
  116. *
  117. * @return <code>true</code> if so; <code>false</code> otherwise
  118. * @exception SQLException if a database access error occurs
  119. */
  120. boolean nullsAreSortedLow() throws SQLException;
  121. /**
  122. * Retrieves whether <code>NULL</code> values are sorted at the start regardless
  123. * of sort order.
  124. *
  125. * @return <code>true</code> if so; <code>false</code> otherwise
  126. * @exception SQLException if a database access error occurs
  127. */
  128. boolean nullsAreSortedAtStart() throws SQLException;
  129. /**
  130. * Retrieves whether <code>NULL</code> values are sorted at the end regardless of
  131. * sort order.
  132. *
  133. * @return <code>true</code> if so; <code>false</code> otherwise
  134. * @exception SQLException if a database access error occurs
  135. */
  136. boolean nullsAreSortedAtEnd() throws SQLException;
  137. /**
  138. * Retrieves the name of this database product.
  139. *
  140. * @return database product name
  141. * @exception SQLException if a database access error occurs
  142. */
  143. String getDatabaseProductName() throws SQLException;
  144. /**
  145. * Retrieves the version number of this database product.
  146. *
  147. * @return database version number
  148. * @exception SQLException if a database access error occurs
  149. */
  150. String getDatabaseProductVersion() throws SQLException;
  151. /**
  152. * Retrieves the name of this JDBC driver.
  153. *
  154. * @return JDBC driver name
  155. * @exception SQLException if a database access error occurs
  156. */
  157. String getDriverName() throws SQLException;
  158. /**
  159. * Retrieves the version number of this JDBC driver as a <code>String</code>.
  160. *
  161. * @return JDBC driver version
  162. * @exception SQLException if a database access error occurs
  163. */
  164. String getDriverVersion() throws SQLException;
  165. /**
  166. * Retrieves this JDBC driver's major version number.
  167. *
  168. * @return JDBC driver major version
  169. */
  170. int getDriverMajorVersion();
  171. /**
  172. * Retrieves this JDBC driver's minor version number.
  173. *
  174. * @return JDBC driver minor version number
  175. */
  176. int getDriverMinorVersion();
  177. /**
  178. * Retrieves whether this database stores tables in a local file.
  179. *
  180. * @return <code>true</code> if so; <code>false</code> otherwise
  181. * @exception SQLException if a database access error occurs
  182. */
  183. boolean usesLocalFiles() throws SQLException;
  184. /**
  185. * Retrieves whether this database uses a file for each table.
  186. *
  187. * @return <code>true</code> if this database uses a local file for each table;
  188. * <code>false</code> otherwise
  189. * @exception SQLException if a database access error occurs
  190. */
  191. boolean usesLocalFilePerTable() throws SQLException;
  192. /**
  193. * Retrieves whether this database treats mixed case unquoted SQL identifiers as
  194. * case sensitive and as a result stores them in mixed case.
  195. *
  196. * @return <code>true</code> if so; <code>false</code> otherwise
  197. * @exception SQLException if a database access error occurs
  198. */
  199. boolean supportsMixedCaseIdentifiers() throws SQLException;
  200. /**
  201. * Retrieves whether this database treats mixed case unquoted SQL identifiers as
  202. * case insensitive and stores them in upper case.
  203. *
  204. * @return <code>true</code> if so; <code>false</code> otherwise
  205. * @exception SQLException if a database access error occurs
  206. */
  207. boolean storesUpperCaseIdentifiers() throws SQLException;
  208. /**
  209. * Retrieves whether this database treats mixed case unquoted SQL identifiers as
  210. * case insensitive and stores them in lower case.
  211. *
  212. * @return <code>true</code> if so; <code>false</code> otherwise
  213. * @exception SQLException if a database access error occurs
  214. */
  215. boolean storesLowerCaseIdentifiers() throws SQLException;
  216. /**
  217. * Retrieves whether this database treats mixed case unquoted SQL identifiers as
  218. * case insensitive and stores them in mixed case.
  219. *
  220. * @return <code>true</code> if so; <code>false</code> otherwise
  221. * @exception SQLException if a database access error occurs
  222. */
  223. boolean storesMixedCaseIdentifiers() throws SQLException;
  224. /**
  225. * Retrieves whether this database treats mixed case quoted SQL identifiers as
  226. * case sensitive and as a result stores them in mixed case.
  227. *
  228. * @return <code>true</code> if so; <code>false</code> otherwise
  229. * @exception SQLException if a database access error occurs
  230. */
  231. boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
  232. /**
  233. * Retrieves whether this database treats mixed case quoted SQL identifiers as
  234. * case insensitive and stores them in upper case.
  235. *
  236. * @return <code>true</code> if so; <code>false</code> otherwise
  237. * @exception SQLException if a database access error occurs
  238. */
  239. boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
  240. /**
  241. * Retrieves whether this database treats mixed case quoted SQL identifiers as
  242. * case insensitive and stores them in lower case.
  243. *
  244. * @return <code>true</code> if so; <code>false</code> otherwise
  245. * @exception SQLException if a database access error occurs
  246. */
  247. boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
  248. /**
  249. * Retrieves whether this database treats mixed case quoted SQL identifiers as
  250. * case insensitive and stores them in mixed case.
  251. *
  252. * @return <code>true</code> if so; <code>false</code> otherwise
  253. * @exception SQLException if a database access error occurs
  254. */
  255. boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
  256. /**
  257. * Retrieves the string used to quote SQL identifiers.
  258. * This method returns a space " " if identifier quoting is not supported.
  259. *
  260. * @return the quoting string or a space if quoting is not supported
  261. * @exception SQLException if a database access error occurs
  262. */
  263. String getIdentifierQuoteString() throws SQLException;
  264. /**
  265. * Retrieves a comma-separated list of all of this database's SQL keywords
  266. * that are NOT also SQL92 keywords.
  267. *
  268. * @return the list of this database's keywords that are not also
  269. * SQL92 keywords
  270. * @exception SQLException if a database access error occurs
  271. */
  272. String getSQLKeywords() throws SQLException;
  273. /**
  274. * Retrieves a comma-separated list of math functions available with
  275. * this database. These are the Open /Open CLI math function names used in
  276. * the JDBC function escape clause.
  277. *
  278. * @return the list of math functions supported by this database
  279. * @exception SQLException if a database access error occurs
  280. */
  281. String getNumericFunctions() throws SQLException;
  282. /**
  283. * Retrieves a comma-separated list of string functions available with
  284. * this database. These are the Open Group CLI string function names used
  285. * in the JDBC function escape clause.
  286. *
  287. * @return the list of string functions supported by this database
  288. * @exception SQLException if a database access error occurs
  289. */
  290. String getStringFunctions() throws SQLException;
  291. /**
  292. * Retrieves a comma-separated list of system functions available with
  293. * this database. These are the Open Group CLI system function names used
  294. * in the JDBC function escape clause.
  295. *
  296. * @return a list of system functions supported by this database
  297. * @exception SQLException if a database access error occurs
  298. */
  299. String getSystemFunctions() throws SQLException;
  300. /**
  301. * Retrieves a comma-separated list of the time and date functions available
  302. * with this database.
  303. *
  304. * @return the list of time and date functions supported by this database
  305. * @exception SQLException if a database access error occurs
  306. */
  307. String getTimeDateFunctions() throws SQLException;
  308. /**
  309. * Retrieves the string that can be used to escape wildcard characters.
  310. * This is the string that can be used to escape '_' or '%' in
  311. * the catalog search parameters that are a pattern (and therefore use one
  312. * of the wildcard characters).
  313. *
  314. * <P>The '_' character represents any single character;
  315. * the '%' character represents any sequence of zero or
  316. * more characters.
  317. *
  318. * @return the string used to escape wildcard characters
  319. * @exception SQLException if a database access error occurs
  320. */
  321. String getSearchStringEscape() throws SQLException;
  322. /**
  323. * Retrieves all the "extra" characters that can be used in unquoted
  324. * identifier names (those beyond a-z, A-Z, 0-9 and _).
  325. *
  326. * @return the string containing the extra characters
  327. * @exception SQLException if a database access error occurs
  328. */
  329. String getExtraNameCharacters() throws SQLException;
  330. //--------------------------------------------------------------------
  331. // Functions describing which features are supported.
  332. /**
  333. * Retrieves whether this database supports <code>ALTER TABLE</code>
  334. * with add column.
  335. *
  336. * @return <code>true</code> if so; <code>false</code> otherwise
  337. * @exception SQLException if a database access error occurs
  338. */
  339. boolean supportsAlterTableWithAddColumn() throws SQLException;
  340. /**
  341. * Retrieves whether this database supports <code>ALTER TABLE</code>
  342. * with drop column.
  343. *
  344. * @return <code>true</code> if so; <code>false</code> otherwise
  345. * @exception SQLException if a database access error occurs
  346. */
  347. boolean supportsAlterTableWithDropColumn() throws SQLException;
  348. /**
  349. * Retrieves whether this database supports column aliasing.
  350. *
  351. * <P>If so, the SQL AS clause can be used to provide names for
  352. * computed columns or to provide alias names for columns as
  353. * required.
  354. *
  355. * @return <code>true</code> if so; <code>false</code> otherwise
  356. * @exception SQLException if a database access error occurs
  357. */
  358. boolean supportsColumnAliasing() throws SQLException;
  359. /**
  360. * Retrieves whether this database supports concatenations between
  361. * <code>NULL</code> and non-<code>NULL</code> values being
  362. * <code>NULL</code>.
  363. *
  364. * @return <code>true</code> if so; <code>false</code> otherwise
  365. * @exception SQLException if a database access error occurs
  366. */
  367. boolean nullPlusNonNullIsNull() throws SQLException;
  368. /**
  369. * Retrieves whether this database supports the <code>CONVERT</code>
  370. * function between SQL types.
  371. *
  372. * @return <code>true</code> if so; <code>false</code> otherwise
  373. * @exception SQLException if a database access error occurs
  374. */
  375. boolean supportsConvert() throws SQLException;
  376. /**
  377. * Retrieves whether this database supports the <code>CONVERT</code>
  378. * for two given SQL types.
  379. *
  380. * @param fromType the type to convert from; one of the type codes from
  381. * the class <code>java.sql.Types</code>
  382. * @param toType the type to convert to; one of the type codes from
  383. * the class <code>java.sql.Types</code>
  384. * @return <code>true</code> if so; <code>false</code> otherwise
  385. * @exception SQLException if a database access error occurs
  386. * @see Types
  387. */
  388. boolean supportsConvert(int fromType, int toType) throws SQLException;
  389. /**
  390. * Retrieves whether this database supports table correlation names.
  391. *
  392. * @return <code>true</code> if so; <code>false</code> otherwise
  393. * @exception SQLException if a database access error occurs
  394. */
  395. boolean supportsTableCorrelationNames() throws SQLException;
  396. /**
  397. * Retrieves whether, when table correlation names are supported, they
  398. * are restricted to being different from the names of the tables.
  399. *
  400. * @return <code>true</code> if so; <code>false</code> otherwise
  401. * @exception SQLException if a database access error occurs
  402. */
  403. boolean supportsDifferentTableCorrelationNames() throws SQLException;
  404. /**
  405. * Retrieves whether this database supports expressions in
  406. * <code>ORDER BY</code> lists.
  407. *
  408. * @return <code>true</code> if so; <code>false</code> otherwise
  409. * @exception SQLException if a database access error occurs
  410. */
  411. boolean supportsExpressionsInOrderBy() throws SQLException;
  412. /**
  413. * Retrieves whether this database supports using a column that is
  414. * not in the <code>SELECT</code> statement in an
  415. * <code>ORDER BY</code> clause.
  416. *
  417. * @return <code>true</code> if so; <code>false</code> otherwise
  418. * @exception SQLException if a database access error occurs
  419. */
  420. boolean supportsOrderByUnrelated() throws SQLException;
  421. /**
  422. * Retrieves whether this database supports some form of
  423. * <code>GROUP BY</code> clause.
  424. *
  425. * @return <code>true</code> if so; <code>false</code> otherwise
  426. * @exception SQLException if a database access error occurs
  427. */
  428. boolean supportsGroupBy() throws SQLException;
  429. /**
  430. * Retrieves whether this database supports using a column that is
  431. * not in the <code>SELECT</code> statement in a
  432. * <code>GROUP BY</code> clause.
  433. *
  434. * @return <code>true</code> if so; <code>false</code> otherwise
  435. * @exception SQLException if a database access error occurs
  436. */
  437. boolean supportsGroupByUnrelated() throws SQLException;
  438. /**
  439. * Retrieves whether this database supports using columns not included in
  440. * the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
  441. * provided that all of the columns in the <code>SELECT</code> statement
  442. * are included in the <code>GROUP BY</code> clause.
  443. *
  444. * @return <code>true</code> if so; <code>false</code> otherwise
  445. * @exception SQLException if a database access error occurs
  446. */
  447. boolean supportsGroupByBeyondSelect() throws SQLException;
  448. /**
  449. * Retrieves whether this database supports specifying a
  450. * <code>LIKE</code> escape clause.
  451. *
  452. * @return <code>true</code> if so; <code>false</code> otherwise
  453. * @exception SQLException if a database access error occurs
  454. */
  455. boolean supportsLikeEscapeClause() throws SQLException;
  456. /**
  457. * Retrieves whether this database supports getting multiple
  458. * <code>ResultSet</code> objects from a single call to the
  459. * method <code>execute</code>.
  460. *
  461. * @return <code>true</code> if so; <code>false</code> otherwise
  462. * @exception SQLException if a database access error occurs
  463. */
  464. boolean supportsMultipleResultSets() throws SQLException;
  465. /**
  466. * Retrieves whether this database allows having multiple
  467. * transactions open at once (on different connections).
  468. *
  469. * @return <code>true</code> if so; <code>false</code> otherwise
  470. * @exception SQLException if a database access error occurs
  471. */
  472. boolean supportsMultipleTransactions() throws SQLException;
  473. /**
  474. * Retrieves whether columns in this database may be defined as non-nullable.
  475. *
  476. * @return <code>true</code> if so; <code>false</code> otherwise
  477. * @exception SQLException if a database access error occurs
  478. */
  479. boolean supportsNonNullableColumns() throws SQLException;
  480. /**
  481. * Retrieves whether this database supports the ODBC Minimum SQL grammar.
  482. *
  483. * @return <code>true</code> if so; <code>false</code> otherwise
  484. * @exception SQLException if a database access error occurs
  485. */
  486. boolean supportsMinimumSQLGrammar() throws SQLException;
  487. /**
  488. * Retrieves whether this database supports the ODBC Core SQL grammar.
  489. *
  490. * @return <code>true</code> if so; <code>false</code> otherwise
  491. * @exception SQLException if a database access error occurs
  492. */
  493. boolean supportsCoreSQLGrammar() throws SQLException;
  494. /**
  495. * Retrieves whether this database supports the ODBC Extended SQL grammar.
  496. *
  497. * @return <code>true</code> if so; <code>false</code> otherwise
  498. * @exception SQLException if a database access error occurs
  499. */
  500. boolean supportsExtendedSQLGrammar() throws SQLException;
  501. /**
  502. * Retrieves whether this database supports the ANSI92 entry level SQL
  503. * grammar.
  504. *
  505. * @return <code>true</code> if so; <code>false</code> otherwise
  506. * @exception SQLException if a database access error occurs
  507. */
  508. boolean supportsANSI92EntryLevelSQL() throws SQLException;
  509. /**
  510. * Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
  511. *
  512. * @return <code>true</code> if so; <code>false</code> otherwise
  513. * @exception SQLException if a database access error occurs
  514. */
  515. boolean supportsANSI92IntermediateSQL() throws SQLException;
  516. /**
  517. * Retrieves whether this database supports the ANSI92 full SQL grammar supported.
  518. *
  519. * @return <code>true</code> if so; <code>false</code> otherwise
  520. * @exception SQLException if a database access error occurs
  521. */
  522. boolean supportsANSI92FullSQL() throws SQLException;
  523. /**
  524. * Retrieves whether this database supports the SQL Integrity
  525. * Enhancement Facility.
  526. *
  527. * @return <code>true</code> if so; <code>false</code> otherwise
  528. * @exception SQLException if a database access error occurs
  529. */
  530. boolean supportsIntegrityEnhancementFacility() throws SQLException;
  531. /**
  532. * Retrieves whether this database supports some form of outer join.
  533. *
  534. * @return <code>true</code> if so; <code>false</code> otherwise
  535. * @exception SQLException if a database access error occurs
  536. */
  537. boolean supportsOuterJoins() throws SQLException;
  538. /**
  539. * Retrieves whether this database supports full nested outer joins.
  540. *
  541. * @return <code>true</code> if so; <code>false</code> otherwise
  542. * @exception SQLException if a database access error occurs
  543. */
  544. boolean supportsFullOuterJoins() throws SQLException;
  545. /**
  546. * Retrieves whether this database provides limited support for outer
  547. * joins. (This will be <code>true</code> if the method
  548. * <code>supportsFullOuterJoins</code> returns <code>true</code>).
  549. *
  550. * @return <code>true</code> if so; <code>false</code> otherwise
  551. * @exception SQLException if a database access error occurs
  552. */
  553. boolean supportsLimitedOuterJoins() throws SQLException;
  554. /**
  555. * Retrieves the database vendor's preferred term for "schema".
  556. *
  557. * @return the vendor term for "schema"
  558. * @exception SQLException if a database access error occurs
  559. */
  560. String getSchemaTerm() throws SQLException;
  561. /**
  562. * Retrieves the database vendor's preferred term for "procedure".
  563. *
  564. * @return the vendor term for "procedure"
  565. * @exception SQLException if a database access error occurs
  566. */
  567. String getProcedureTerm() throws SQLException;
  568. /**
  569. * Retrieves the database vendor's preferred term for "catalog".
  570. *
  571. * @return the vendor term for "catalog"
  572. * @exception SQLException if a database access error occurs
  573. */
  574. String getCatalogTerm() throws SQLException;
  575. /**
  576. * Retrieves whether a catalog appears at the start of a fully qualified
  577. * table name. If not, the catalog appears at the end.
  578. *
  579. * @return <code>true</code> if the catalog name appears at the beginning
  580. * of a fully qualified table name; <code>false</code> otherwise
  581. * @exception SQLException if a database access error occurs
  582. */
  583. boolean isCatalogAtStart() throws SQLException;
  584. /**
  585. * Retrieves the <code>String</code> that this database uses as the
  586. * separator between a catalog and table name.
  587. *
  588. * @return the separator string
  589. * @exception SQLException if a database access error occurs
  590. */
  591. String getCatalogSeparator() throws SQLException;
  592. /**
  593. * Retrieves whether a schema name can be used in a data manipulation statement.
  594. *
  595. * @return <code>true</code> if so; <code>false</code> otherwise
  596. * @exception SQLException if a database access error occurs
  597. */
  598. boolean supportsSchemasInDataManipulation() throws SQLException;
  599. /**
  600. * Retrieves whether a schema name can be used in a procedure call statement.
  601. *
  602. * @return <code>true</code> if so; <code>false</code> otherwise
  603. * @exception SQLException if a database access error occurs
  604. */
  605. boolean supportsSchemasInProcedureCalls() throws SQLException;
  606. /**
  607. * Retrieves whether a schema name can be used in a table definition statement.
  608. *
  609. * @return <code>true</code> if so; <code>false</code> otherwise
  610. * @exception SQLException if a database access error occurs
  611. */
  612. boolean supportsSchemasInTableDefinitions() throws SQLException;
  613. /**
  614. * Retrieves whether a schema name can be used in an index definition statement.
  615. *
  616. * @return <code>true</code> if so; <code>false</code> otherwise
  617. * @exception SQLException if a database access error occurs
  618. */
  619. boolean supportsSchemasInIndexDefinitions() throws SQLException;
  620. /**
  621. * Retrieves whether a schema name can be used in a privilege definition statement.
  622. *
  623. * @return <code>true</code> if so; <code>false</code> otherwise
  624. * @exception SQLException if a database access error occurs
  625. */
  626. boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
  627. /**
  628. * Retrieves whether a catalog name can be used in a data manipulation statement.
  629. *
  630. * @return <code>true</code> if so; <code>false</code> otherwise
  631. * @exception SQLException if a database access error occurs
  632. */
  633. boolean supportsCatalogsInDataManipulation() throws SQLException;
  634. /**
  635. * Retrieves whether a catalog name can be used in a procedure call statement.
  636. *
  637. * @return <code>true</code> if so; <code>false</code> otherwise
  638. * @exception SQLException if a database access error occurs
  639. */
  640. boolean supportsCatalogsInProcedureCalls() throws SQLException;
  641. /**
  642. * Retrieves whether a catalog name can be used in a table definition statement.
  643. *
  644. * @return <code>true</code> if so; <code>false</code> otherwise
  645. * @exception SQLException if a database access error occurs
  646. */
  647. boolean supportsCatalogsInTableDefinitions() throws SQLException;
  648. /**
  649. * Retrieves whether a catalog name can be used in an index definition statement.
  650. *
  651. * @return <code>true</code> if so; <code>false</code> otherwise
  652. * @exception SQLException if a database access error occurs
  653. */
  654. boolean supportsCatalogsInIndexDefinitions() throws SQLException;
  655. /**
  656. * Retrieves whether a catalog name can be used in a privilege definition statement.
  657. *
  658. * @return <code>true</code> if so; <code>false</code> otherwise
  659. * @exception SQLException if a database access error occurs
  660. */
  661. boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
  662. /**
  663. * Retrieves whether this database supports positioned <code>DELETE</code>
  664. * statements.
  665. *
  666. * @return <code>true</code> if so; <code>false</code> otherwise
  667. * @exception SQLException if a database access error occurs
  668. */
  669. boolean supportsPositionedDelete() throws SQLException;
  670. /**
  671. * Retrieves whether this database supports positioned <code>UPDATE</code>
  672. * statements.
  673. *
  674. * @return <code>true</code> if so; <code>false</code> otherwise
  675. * @exception SQLException if a database access error occurs
  676. */
  677. boolean supportsPositionedUpdate() throws SQLException;
  678. /**
  679. * Retrieves whether this database supports <code>SELECT FOR UPDATE</code>
  680. * statements.
  681. *
  682. * @return <code>true</code> if so; <code>false</code> otherwise
  683. * @exception SQLException if a database access error occurs
  684. */
  685. boolean supportsSelectForUpdate() throws SQLException;
  686. /**
  687. * Retrieves whether this database supports stored procedure calls
  688. * that use the stored procedure escape syntax.
  689. *
  690. * @return <code>true</code> if so; <code>false</code> otherwise
  691. * @exception SQLException if a database access error occurs
  692. */
  693. boolean supportsStoredProcedures() throws SQLException;
  694. /**
  695. * Retrieves whether this database supports subqueries in comparison
  696. * expressions.
  697. *
  698. * @return <code>true</code> if so; <code>false</code> otherwise
  699. * @exception SQLException if a database access error occurs
  700. */
  701. boolean supportsSubqueriesInComparisons() throws SQLException;
  702. /**
  703. * Retrieves whether this database supports subqueries in
  704. * <code>EXISTS</code> expressions.
  705. *
  706. * @return <code>true</code> if so; <code>false</code> otherwise
  707. * @exception SQLException if a database access error occurs
  708. */
  709. boolean supportsSubqueriesInExists() throws SQLException;
  710. /**
  711. * Retrieves whether this database supports subqueries in
  712. * <code>IN</code> statements.
  713. *
  714. * @return <code>true</code> if so; <code>false</code> otherwise
  715. * @exception SQLException if a database access error occurs
  716. */
  717. boolean supportsSubqueriesInIns() throws SQLException;
  718. /**
  719. * Retrieves whether this database supports subqueries in quantified
  720. * expressions.
  721. *
  722. * @return <code>true</code> if so; <code>false</code> otherwise
  723. * @exception SQLException if a database access error occurs
  724. */
  725. boolean supportsSubqueriesInQuantifieds() throws SQLException;
  726. /**
  727. * Retrieves whether this database supports correlated subqueries.
  728. *
  729. * @return <code>true</code> if so; <code>false</code> otherwise
  730. * @exception SQLException if a database access error occurs
  731. */
  732. boolean supportsCorrelatedSubqueries() throws SQLException;
  733. /**
  734. * Retrieves whether this database supports SQL <code>UNION</code>.
  735. *
  736. * @return <code>true</code> if so; <code>false</code> otherwise
  737. * @exception SQLException if a database access error occurs
  738. */
  739. boolean supportsUnion() throws SQLException;
  740. /**
  741. * Retrieves whether this database supports SQL <code>UNION ALL</code>.
  742. *
  743. * @return <code>true</code> if so; <code>false</code> otherwise
  744. * @exception SQLException if a database access error occurs
  745. */
  746. boolean supportsUnionAll() throws SQLException;
  747. /**
  748. * Retrieves whether this database supports keeping cursors open
  749. * across commits.
  750. *
  751. * @return <code>true</code> if cursors always remain open;
  752. * <code>false</code> if they might not remain open
  753. * @exception SQLException if a database access error occurs
  754. */
  755. boolean supportsOpenCursorsAcrossCommit() throws SQLException;
  756. /**
  757. * Retrieves whether this database supports keeping cursors open
  758. * across rollbacks.
  759. *
  760. * @return <code>true</code> if cursors always remain open;
  761. * <code>false</code> if they might not remain open
  762. * @exception SQLException if a database access error occurs
  763. */
  764. boolean supportsOpenCursorsAcrossRollback() throws SQLException;
  765. /**
  766. * Retrieves whether this database supports keeping statements open
  767. * across commits.
  768. *
  769. * @return <code>true</code> if statements always remain open;
  770. * <code>false</code> if they might not remain open
  771. * @exception SQLException if a database access error occurs
  772. */
  773. boolean supportsOpenStatementsAcrossCommit() throws SQLException;
  774. /**
  775. * Retrieves whether this database supports keeping statements open
  776. * across rollbacks.
  777. *
  778. * @return <code>true</code> if statements always remain open;
  779. * <code>false</code> if they might not remain open
  780. * @exception SQLException if a database access error occurs
  781. */
  782. boolean supportsOpenStatementsAcrossRollback() throws SQLException;
  783. //----------------------------------------------------------------------
  784. // The following group of methods exposes various limitations
  785. // based on the target database with the current driver.
  786. // Unless otherwise specified, a result of zero means there is no
  787. // limit, or the limit is not known.
  788. /**
  789. * Retrieves the maximum number of hex characters this database allows in an
  790. * inline binary literal.
  791. *
  792. * @return max the maximum length (in hex characters) for a binary literal;
  793. * a result of zero means that there is no limit or the limit
  794. * is not known
  795. * @exception SQLException if a database access error occurs
  796. */
  797. int getMaxBinaryLiteralLength() throws SQLException;
  798. /**
  799. * Retrieves the maximum number of characters this database allows
  800. * for a character literal.
  801. *
  802. * @return the maximum number of characters allowed for a character literal;
  803. * a result of zero means that there is no limit or the limit is
  804. * not known
  805. * @exception SQLException if a database access error occurs
  806. */
  807. int getMaxCharLiteralLength() throws SQLException;
  808. /**
  809. * Retrieves the maximum number of characters this database allows
  810. * for a column name.
  811. *
  812. * @return the maximum number of characters allowed for a column name;
  813. * a result of zero means that there is no limit or the limit
  814. * is not known
  815. * @exception SQLException if a database access error occurs
  816. */
  817. int getMaxColumnNameLength() throws SQLException;
  818. /**
  819. * Retrieves the maximum number of columns this database allows in a
  820. * <code>GROUP BY</code> clause.
  821. *
  822. * @return the maximum number of columns allowed;
  823. * a result of zero means that there is no limit or the limit
  824. * is not known
  825. * @exception SQLException if a database access error occurs
  826. */
  827. int getMaxColumnsInGroupBy() throws SQLException;
  828. /**
  829. * Retrieves the maximum number of columns this database allows in an index.
  830. *
  831. * @return the maximum number of columns allowed;
  832. * a result of zero means that there is no limit or the limit
  833. * is not known
  834. * @exception SQLException if a database access error occurs
  835. */
  836. int getMaxColumnsInIndex() throws SQLException;
  837. /**
  838. * Retrieves the maximum number of columns this database allows in an
  839. * <code>ORDER BY</code> clause.
  840. *
  841. * @return the maximum number of columns allowed;
  842. * a result of zero means that there is no limit or the limit
  843. * is not known
  844. * @exception SQLException if a database access error occurs
  845. */
  846. int getMaxColumnsInOrderBy() throws SQLException;
  847. /**
  848. * Retrieves the maximum number of columns this database allows in a
  849. * <code>SELECT</code> list.
  850. *
  851. * @return the maximum number of columns allowed;
  852. * a result of zero means that there is no limit or the limit
  853. * is not known
  854. * @exception SQLException if a database access error occurs
  855. */
  856. int getMaxColumnsInSelect() throws SQLException;
  857. /**
  858. * Retrieves the maximum number of columns this database allows in a table.
  859. *
  860. * @return the maximum number of columns allowed;
  861. * a result of zero means that there is no limit or the limit
  862. * is not known
  863. * @exception SQLException if a database access error occurs
  864. */
  865. int getMaxColumnsInTable() throws SQLException;
  866. /**
  867. * Retrieves the maximum number of concurrent connections to this
  868. * database that are possible.
  869. *
  870. * @return the maximum number of active connections possible at one time;
  871. * a result of zero means that there is no limit or the limit
  872. * is not known
  873. * @exception SQLException if a database access error occurs
  874. */
  875. int getMaxConnections() throws SQLException;
  876. /**
  877. * Retrieves the maximum number of characters that this database allows in a
  878. * cursor name.
  879. *
  880. * @return the maximum number of characters allowed in a cursor name;
  881. * a result of zero means that there is no limit or the limit
  882. * is not known
  883. * @exception SQLException if a database access error occurs
  884. */
  885. int getMaxCursorNameLength() throws SQLException;
  886. /**
  887. * Retrieves the maximum number of bytes this database allows for an
  888. * index, including all of the parts of the index.
  889. *
  890. * @return the maximum number of bytes allowed; this limit includes the
  891. * composite of all the constituent parts of the index;
  892. * a result of zero means that there is no limit or the limit
  893. * is not known
  894. * @exception SQLException if a database access error occurs
  895. */
  896. int getMaxIndexLength() throws SQLException;
  897. /**
  898. * Retrieves the maximum number of characters that this database allows in a
  899. * schema name.
  900. *
  901. * @return the maximum number of characters allowed in a schema name;
  902. * a result of zero means that there is no limit or the limit
  903. * is not known
  904. * @exception SQLException if a database access error occurs
  905. */
  906. int getMaxSchemaNameLength() throws SQLException;
  907. /**
  908. * Retrieves the maximum number of characters that this database allows in a
  909. * procedure name.
  910. *
  911. * @return the maximum number of characters allowed in a procedure name;
  912. * a result of zero means that there is no limit or the limit
  913. * is not known
  914. * @exception SQLException if a database access error occurs
  915. */
  916. int getMaxProcedureNameLength() throws SQLException;
  917. /**
  918. * Retrieves the maximum number of characters that this database allows in a
  919. * catalog name.
  920. *
  921. * @return the maximum number of characters allowed in a catalog name;
  922. * a result of zero means that there is no limit or the limit
  923. * is not known
  924. * @exception SQLException if a database access error occurs
  925. */
  926. int getMaxCatalogNameLength() throws SQLException;
  927. /**
  928. * Retrieves the maximum number of bytes this database allows in
  929. * a single row.
  930. *
  931. * @return the maximum number of bytes allowed for a row; a result of
  932. * zero means that there is no limit or the limit is not known
  933. * @exception SQLException if a database access error occurs
  934. */
  935. int getMaxRowSize() throws SQLException;
  936. /**
  937. * Retrieves whether the return value for the method
  938. * <code>getMaxRowSize</code> includes the SQL data types
  939. * <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
  940. *
  941. * @return <code>true</code> if so; <code>false</code> otherwise
  942. * @exception SQLException if a database access error occurs
  943. */
  944. boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
  945. /**
  946. * Retrieves the maximum number of characters this database allows in
  947. * an SQL statement.
  948. *
  949. * @return the maximum number of characters allowed for an SQL statement;
  950. * a result of zero means that there is no limit or the limit
  951. * is not known
  952. * @exception SQLException if a database access error occurs
  953. */
  954. int getMaxStatementLength() throws SQLException;
  955. /**
  956. * Retrieves the maximum number of active statements to this database
  957. * that can be open at the same time.
  958. *
  959. * @return the maximum number of statements that can be open at one time;
  960. * a result of zero means that there is no limit or the limit
  961. * is not known
  962. * @exception SQLException if a database access error occurs
  963. */
  964. int getMaxStatements() throws SQLException;
  965. /**
  966. * Retrieves the maximum number of characters this database allows in
  967. * a table name.
  968. *
  969. * @return the maximum number of characters allowed for a table name;
  970. * a result of zero means that there is no limit or the limit
  971. * is not known
  972. * @exception SQLException if a database access error occurs
  973. */
  974. int getMaxTableNameLength() throws SQLException;
  975. /**
  976. * Retrieves the maximum number of tables this database allows in a
  977. * <code>SELECT</code> statement.
  978. *
  979. * @return the maximum number of tables allowed in a <code>SELECT</code>
  980. * statement; a result of zero means that there is no limit or
  981. * the limit is not known
  982. * @exception SQLException if a database access error occurs
  983. */
  984. int getMaxTablesInSelect() throws SQLException;
  985. /**
  986. * Retrieves the maximum number of characters this database allows in
  987. * a user name.
  988. *
  989. * @return the maximum number of characters allowed for a user name;
  990. * a result of zero means that there is no limit or the limit
  991. * is not known
  992. * @exception SQLException if a database access error occurs
  993. */
  994. int getMaxUserNameLength() throws SQLException;
  995. //----------------------------------------------------------------------
  996. /**
  997. * Retrieves this database's default transaction isolation level. The
  998. * possible values are defined in <code>java.sql.Connection</code>.
  999. *
  1000. * @return the default isolation level
  1001. * @exception SQLException if a database access error occurs
  1002. * @see Connection
  1003. */
  1004. int getDefaultTransactionIsolation() throws SQLException;
  1005. /**
  1006. * Retrieves whether this database supports transactions. If not, invoking the
  1007. * method <code>commit</code> is a noop, and the isolation level is
  1008. * <code>TRANSACTION_NONE</code>.
  1009. *
  1010. * @return <code>true</code> if transactions are supported;
  1011. * <code>false</code> otherwise
  1012. * @exception SQLException if a database access error occurs
  1013. */
  1014. boolean supportsTransactions() throws SQLException;
  1015. /**
  1016. * Retrieves whether this database supports the given transaction isolation level.
  1017. *
  1018. * @param level one of the transaction isolation levels defined in
  1019. * <code>java.sql.Connection</code>
  1020. * @return <code>true</code> if so; <code>false</code> otherwise
  1021. * @exception SQLException if a database access error occurs
  1022. * @see Connection
  1023. */
  1024. boolean supportsTransactionIsolationLevel(int level)
  1025. throws SQLException;
  1026. /**
  1027. * Retrieves whether this database supports both data definition and
  1028. * data manipulation statements within a transaction.
  1029. *
  1030. * @return <code>true</code> if so; <code>false</code> otherwise
  1031. * @exception SQLException if a database access error occurs
  1032. */
  1033. boolean supportsDataDefinitionAndDataManipulationTransactions()
  1034. throws SQLException;
  1035. /**
  1036. * Retrieves whether this database supports only data manipulation
  1037. * statements within a transaction.
  1038. *
  1039. * @return <code>true</code> if so; <code>false</code> otherwise
  1040. * @exception SQLException if a database access error occurs
  1041. */
  1042. boolean supportsDataManipulationTransactionsOnly()
  1043. throws SQLException;
  1044. /**
  1045. * Retrieves whether a data definition statement within a transaction forces
  1046. * the transaction to commit.
  1047. *
  1048. * @return <code>true</code> if so; <code>false</code> otherwise
  1049. * @exception SQLException if a database access error occurs
  1050. */
  1051. boolean dataDefinitionCausesTransactionCommit()
  1052. throws SQLException;
  1053. /**
  1054. * Retrieves whether this database ignores a data definition statement
  1055. * within a transaction.
  1056. *
  1057. * @return <code>true</code> if so; <code>false</code> otherwise
  1058. * @exception SQLException if a database access error occurs
  1059. */
  1060. boolean dataDefinitionIgnoredInTransactions()
  1061. throws SQLException;
  1062. /**
  1063. * Retrieves a description of the stored procedures available in the given
  1064. * catalog.
  1065. * <P>
  1066. * Only procedure descriptions matching the schema and
  1067. * procedure name criteria are returned. They are ordered by
  1068. * <code>PROCEDURE_SCHEM</code> and <code>PROCEDURE_NAME</code>.
  1069. *
  1070. * <P>Each procedure description has the the following columns:
  1071. * <OL>
  1072. * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
  1073. * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
  1074. * <LI><B>PROCEDURE_NAME</B> String => procedure name
  1075. * <LI> reserved for future use
  1076. * <LI> reserved for future use
  1077. * <LI> reserved for future use
  1078. * <LI><B>REMARKS</B> String => explanatory comment on the procedure
  1079. * <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
  1080. * <UL>
  1081. * <LI> procedureResultUnknown - May return a result
  1082. * <LI> procedureNoResult - Does not return a result
  1083. * <LI> procedureReturnsResult - Returns a result
  1084. * </UL>
  1085. * </OL>
  1086. *
  1087. * @param catalog a catalog name; must match the catalog name as it
  1088. * is stored in the database; "" retrieves those without a catalog;
  1089. * <code>null</code> means that the catalog name should not be used to narrow
  1090. * the search
  1091. * @param schemaPattern a schema name pattern; must match the schema name
  1092. * as it is stored in the database; "" retrieves those without a schema;
  1093. * <code>null</code> means that the schema name should not be used to narrow
  1094. * the search
  1095. * @param procedureNamePattern a procedure name pattern; must match the
  1096. * procedure name as it is stored in the database
  1097. * @return <code>ResultSet</code> - each row is a procedure description
  1098. * @exception SQLException if a database access error occurs
  1099. * @see #getSearchStringEscape
  1100. */
  1101. ResultSet getProcedures(String catalog, String schemaPattern,
  1102. String procedureNamePattern) throws SQLException;
  1103. /**
  1104. * Indicates that it is not known whether the procedure returns
  1105. * a result.
  1106. * <P>
  1107. * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1108. * <code>ResultSet</code> object returned by the method
  1109. * <code>getProcedures</code>.
  1110. */
  1111. int procedureResultUnknown = 0;
  1112. /**
  1113. * Indicates that the procedure does not return a result.
  1114. * <P>
  1115. * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1116. * <code>ResultSet</code> object returned by the method
  1117. * <code>getProcedures</code>.
  1118. */
  1119. int procedureNoResult = 1;
  1120. /**
  1121. * Indicates that the procedure returns a result.
  1122. * <P>
  1123. * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1124. * <code>ResultSet</code> object returned by the method
  1125. * <code>getProcedures</code>.
  1126. */
  1127. int procedureReturnsResult = 2;
  1128. /**
  1129. * Retrieves a description of the given catalog's stored procedure parameter
  1130. * and result columns.
  1131. *
  1132. * <P>Only descriptions matching the schema, procedure and
  1133. * parameter name criteria are returned. They are ordered by
  1134. * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
  1135. * if any, is first. Next are the parameter descriptions in call
  1136. * order. The column descriptions follow in column number order.
  1137. *
  1138. * <P>Each row in the <code>ResultSet</code> is a parameter description or
  1139. * column description with the following fields:
  1140. * <OL>
  1141. * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
  1142. * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
  1143. * <LI><B>PROCEDURE_NAME</B> String => procedure name
  1144. * <LI><B>COLUMN_NAME</B> String => column/parameter name
  1145. * <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
  1146. * <UL>
  1147. * <LI> procedureColumnUnknown - nobody knows
  1148. * <LI> procedureColumnIn - IN parameter
  1149. * <LI> procedureColumnInOut - INOUT parameter
  1150. * <LI> procedureColumnOut - OUT parameter
  1151. * <LI> procedureColumnReturn - procedure return value
  1152. * <LI> procedureColumnResult - result column in <code>ResultSet</code>
  1153. * </UL>
  1154. * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
  1155. * <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
  1156. * type name is fully qualified
  1157. * <LI><B>PRECISION</B> int => precision
  1158. * <LI><B>LENGTH</B> int => length in bytes of data
  1159. * <LI><B>SCALE</B> short => scale
  1160. * <LI><B>RADIX</B> short => radix
  1161. * <LI><B>NULLABLE</B> short => can it contain NULL.
  1162. * <UL>
  1163. * <LI> procedureNoNulls - does not allow NULL values
  1164. * <LI> procedureNullable - allows NULL values
  1165. * <LI> procedureNullableUnknown - nullability unknown
  1166. * </UL>
  1167. * <LI><B>REMARKS</B> String => comment describing parameter/column
  1168. * </OL>
  1169. *
  1170. * <P><B>Note:</B> Some databases may not return the column
  1171. * descriptions for a procedure. Additional columns beyond
  1172. * REMARKS can be defined by the database.
  1173. *
  1174. * @param catalog a catalog name; must match the catalog name as it
  1175. * is stored in the database; "" retrieves those without a catalog;
  1176. * <code>null</code> means that the catalog name should not be used to narrow
  1177. * the search
  1178. * @param schemaPattern a schema name pattern; must match the schema name
  1179. * as it is stored in the database; "" retrieves those without a schema;
  1180. * <code>null</code> means that the schema name should not be used to narrow
  1181. * the search
  1182. * @param procedureNamePattern a procedure name pattern; must match the
  1183. * procedure name as it is stored in the database
  1184. * @param columnNamePattern a column name pattern; must match the column name
  1185. * as it is stored in the database
  1186. * @return <code>ResultSet</code> - each row describes a stored procedure parameter or
  1187. * column
  1188. * @exception SQLException if a database access error occurs
  1189. * @see #getSearchStringEscape
  1190. */
  1191. ResultSet getProcedureColumns(String catalog,
  1192. String schemaPattern,
  1193. String procedureNamePattern,
  1194. String columnNamePattern) throws SQLException;
  1195. /**
  1196. * Indicates that type of the column is unknown.
  1197. * <P>
  1198. * A possible value for the column
  1199. * <code>COLUMN_TYPE</code>
  1200. * in the <code>ResultSet</code>
  1201. * returned by the method <code>getProcedureColumns</code>.
  1202. */
  1203. int procedureColumnUnknown = 0;
  1204. /**
  1205. * Indicates that the column stores IN parameters.
  1206. * <P>
  1207. * A possible value for the column
  1208. * <code>COLUMN_TYPE</code>
  1209. * in the <code>ResultSet</code>
  1210. * returned by the method <code>getProcedureColumns</code>.
  1211. */
  1212. int procedureColumnIn = 1;
  1213. /**
  1214. * Indicates that the column stores INOUT parameters.
  1215. * <P>
  1216. * A possible value for the column
  1217. * <code>COLUMN_TYPE</code>
  1218. * in the <code>ResultSet</code>
  1219. * returned by the method <code>getProcedureColumns</code>.
  1220. */
  1221. int procedureColumnInOut = 2;
  1222. /**
  1223. * Indicates that the column stores OUT parameters.
  1224. * <P>
  1225. * A possible value for the column
  1226. * <code>COLUMN_TYPE</code>
  1227. * in the <code>ResultSet</code>
  1228. * returned by the method <code>getProcedureColumns</code>.
  1229. */
  1230. int procedureColumnOut = 4;
  1231. /**
  1232. * Indicates that the column stores return values.
  1233. * <P>
  1234. * A possible value for the column
  1235. * <code>COLUMN_TYPE</code>
  1236. * in the <code>ResultSet</code>
  1237. * returned by the method <code>getProcedureColumns</code>.
  1238. */
  1239. int procedureColumnReturn = 5;
  1240. /**
  1241. * Indicates that the column stores results.
  1242. * <P>
  1243. * A possible value for the column
  1244. * <code>COLUMN_TYPE</code>
  1245. * in the <code>ResultSet</code>
  1246. * returned by the method <code>getProcedureColumns</code>.
  1247. */
  1248. int procedureColumnResult = 3;
  1249. /**
  1250. * Indicates that <code>NULL</code> values are not allowed.
  1251. * <P>
  1252. * A possible value for the column
  1253. * <code>NULLABLE</code>
  1254. * in the <code>ResultSet</code> object
  1255. * returned by the method <code>getProcedureColumns</code>.
  1256. */
  1257. int procedureNoNulls = 0;
  1258. /**
  1259. * Indicates that <code>NULL</code> values are allowed.
  1260. * <P>
  1261. * A possible value for the column
  1262. * <code>NULLABLE</code>
  1263. * in the <code>ResultSet</code> object
  1264. * returned by the method <code>getProcedureColumns</code>.
  1265. */
  1266. int procedureNullable = 1;
  1267. /**
  1268. * Indicates that whether <code>NULL</code> values are allowed
  1269. * is unknown.
  1270. * <P>
  1271. * A possible value for the column
  1272. * <code>NULLABLE</code>
  1273. * in the <code>ResultSet</code> object
  1274. * returned by the method <code>getProcedureColumns</code>.
  1275. */
  1276. int procedureNullableUnknown = 2;
  1277. /**
  1278. * Retrieves a description of the tables available in the given catalog.
  1279. * Only table descriptions matching the catalog, schema, table
  1280. * name and type criteria are returned. They are ordered by
  1281. * TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
  1282. * <P>
  1283. * Each table description has the following columns:
  1284. * <OL>
  1285. * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
  1286. * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
  1287. * <LI><B>TABLE_NAME</B> String => table name
  1288. * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
  1289. * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
  1290. * "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  1291. * <LI><B>REMARKS</B> String => explanatory comment on the table
  1292. * <LI><B>TYPE_CAT</B> String => the types catalog (may be <code>null</code>)
  1293. * <LI><B>TYPE_SCHEM</B> String => the types schema (may be <code>null</code>)
  1294. * <LI><B>TYPE_NAME</B> String => type name (may be <code>null</code>)
  1295. * <LI><B>SELF_REFERENCING_COL_NAME</B> String => name of the designated
  1296. * "identifier" column of a typed table (may be <code>null</code>)
  1297. * <LI><B>REF_GENERATION</B> String => specifies how values in
  1298. * SELF_REFERENCING_COL_NAME are created. Values are
  1299. * "SYSTEM", "USER", "DERIVED". (may be <code>null</code>)
  1300. * </OL>
  1301. *
  1302. * <P><B>Note:</B> Some databases may not return information for
  1303. * all tables.
  1304. *