1201 * Retrieves whether this database ignores a data definition statement 1202 * within a transaction. 1203 * 1204 * @return <code>true</code> if so; <code>false</code> otherwise 1205 * @exception SQLException if a database access error occurs 1206 */ 1207 boolean dataDefinitionIgnoredInTransactions() 1208 throws SQLException; 1209 1210 /** 1211 * Retrieves a description of the stored procedures available in the given 1212 * catalog. 1213 * <P> 1214 * Only procedure descriptions matching the schema and 1215 * procedure name criteria are returned. They are ordered by 1216 * <code>PROCEDURE_CAT</code>, <code>PROCEDURE_SCHEM</code>, 1217 * <code>PROCEDURE_NAME</code> and <code>SPECIFIC_ NAME</code>. 1218 * 1219 * <P>Each procedure description has the the following columns: 1220 * <OL> 1221 * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>) 1222 * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>) 1223 * <LI><B>PROCEDURE_NAME</B> String => procedure name 1224 * <LI> reserved for future use 1225 * <LI> reserved for future use 1226 * <LI> reserved for future use 1227 * <LI><B>REMARKS</B> String => explanatory comment on the procedure 1228 * <LI><B>PROCEDURE_TYPE</B> short => kind of procedure: 1229 * <UL> 1230 * <LI> procedureResultUnknown - Cannot determine if a return value 1231 * will be returned 1232 * <LI> procedureNoResult - Does not return a return value 1233 * <LI> procedureReturnsResult - Returns a return value 1234 * </UL> 1235 * <LI><B>SPECIFIC_NAME</B> String => The name which uniquely identifies this 1236 * procedure within its schema. 1237 * </OL> 1238 * <p> 1239 * A user may not have permissions to execute any of the procedures that are 1240 * returned by <code>getProcedures</code> 1241 * 1242 * @param catalog a catalog name; must match the catalog name as it 1243 * is stored in the database; "" retrieves those without a catalog; 1244 * <code>null</code> means that the catalog name should not be used to narrow 1245 * the search 1246 * @param schemaPattern a schema name pattern; must match the schema name 1247 * as it is stored in the database; "" retrieves those without a schema; 1248 * <code>null</code> means that the schema name should not be used to narrow 1249 * the search 1250 * @param procedureNamePattern a procedure name pattern; must match the 1251 * procedure name as it is stored in the database 1252 * @return <code>ResultSet</code> - each row is a procedure description 1253 * @exception SQLException if a database access error occurs 1254 * @see #getSearchStringEscape 1255 */ 1280 * <P> 1281 * A possible value for column <code>PROCEDURE_TYPE</code> in the 1282 * <code>ResultSet</code> object returned by the method 1283 * <code>getProcedures</code>. 1284 */ 1285 int procedureReturnsResult = 2; 1286 1287 /** 1288 * Retrieves a description of the given catalog's stored procedure parameter 1289 * and result columns. 1290 * 1291 * <P>Only descriptions matching the schema, procedure and 1292 * parameter name criteria are returned. They are ordered by 1293 * PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_NAME. Within this, the return value, 1294 * if any, is first. Next are the parameter descriptions in call 1295 * order. The column descriptions follow in column number order. 1296 * 1297 * <P>Each row in the <code>ResultSet</code> is a parameter description or 1298 * column description with the following fields: 1299 * <OL> 1300 * <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>) 1301 * <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>) 1302 * <LI><B>PROCEDURE_NAME</B> String => procedure name 1303 * <LI><B>COLUMN_NAME</B> String => column/parameter name 1304 * <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter: 1305 * <UL> 1306 * <LI> procedureColumnUnknown - nobody knows 1307 * <LI> procedureColumnIn - IN parameter 1308 * <LI> procedureColumnInOut - INOUT parameter 1309 * <LI> procedureColumnOut - OUT parameter 1310 * <LI> procedureColumnReturn - procedure return value 1311 * <LI> procedureColumnResult - result column in <code>ResultSet</code> 1312 * </UL> 1313 * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types 1314 * <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the 1315 * type name is fully qualified 1316 * <LI><B>PRECISION</B> int => precision 1317 * <LI><B>LENGTH</B> int => length in bytes of data 1318 * <LI><B>SCALE</B> short => scale - null is returned for data types where 1319 * SCALE is not applicable. 1320 * <LI><B>RADIX</B> short => radix 1321 * <LI><B>NULLABLE</B> short => can it contain NULL. 1322 * <UL> 1323 * <LI> procedureNoNulls - does not allow NULL values 1324 * <LI> procedureNullable - allows NULL values 1325 * <LI> procedureNullableUnknown - nullability unknown 1326 * </UL> 1327 * <LI><B>REMARKS</B> String => comment describing parameter/column 1328 * <LI><B>COLUMN_DEF</B> String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>) 1329 * <UL> 1330 * <LI> The string NULL (not enclosed in quotes) - if NULL was specified as the default value 1331 * <LI> TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation 1332 * <LI> NULL - if a default value was not specified 1333 * </UL> 1334 * <LI><B>SQL_DATA_TYPE</B> int => reserved for future use 1335 * <LI><B>SQL_DATETIME_SUB</B> int => reserved for future use 1336 * <LI><B>CHAR_OCTET_LENGTH</B> int => the maximum length of binary and character based columns. For any other datatype the returned value is a 1337 * NULL 1338 * <LI><B>ORDINAL_POSITION</B> int => the ordinal position, starting from 1, for the input and output parameters for a procedure. A value of 0 1339 *is returned if this row describes the procedure's return value. For result set columns, it is the 1340 *ordinal position of the column in the result set starting from 1. If there are 1341 *multiple result sets, the column ordinal positions are implementation 1342 * defined. 1343 * <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine the nullability for a column. 1344 * <UL> 1345 * <LI> YES --- if the column can include NULLs 1346 * <LI> NO --- if the column cannot include NULLs 1347 * <LI> empty string --- if the nullability for the 1348 * column is unknown 1349 * </UL> 1350 * <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies this procedure within its schema. 1351 * </OL> 1352 * 1353 * <P><B>Note:</B> Some databases may not return the column 1354 * descriptions for a procedure. 1355 * 1356 * <p>The PRECISION column represents the specified column size for the given column. 1357 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1358 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1359 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1360 * this is the length in bytes. Null is returned for data types where the 1361 * column size is not applicable. 1362 * @param catalog a catalog name; must match the catalog name as it 1363 * is stored in the database; "" retrieves those without a catalog; 1364 * <code>null</code> means that the catalog name should not be used to narrow 1365 * the search 1366 * @param schemaPattern a schema name pattern; must match the schema name 1367 * as it is stored in the database; "" retrieves those without a schema; 1368 * <code>null</code> means that the schema name should not be used to narrow 1369 * the search 1370 * @param procedureNamePattern a procedure name pattern; must match the 1464 * Indicates that whether <code>NULL</code> values are allowed 1465 * is unknown. 1466 * <P> 1467 * A possible value for the column 1468 * <code>NULLABLE</code> 1469 * in the <code>ResultSet</code> object 1470 * returned by the method <code>getProcedureColumns</code>. 1471 */ 1472 int procedureNullableUnknown = 2; 1473 1474 1475 /** 1476 * Retrieves a description of the tables available in the given catalog. 1477 * Only table descriptions matching the catalog, schema, table 1478 * name and type criteria are returned. They are ordered by 1479 * <code>TABLE_TYPE</code>, <code>TABLE_CAT</code>, 1480 * <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>. 1481 * <P> 1482 * Each table description has the following columns: 1483 * <OL> 1484 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 1485 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 1486 * <LI><B>TABLE_NAME</B> String => table name 1487 * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE", 1488 * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", 1489 * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". 1490 * <LI><B>REMARKS</B> String => explanatory comment on the table 1491 * <LI><B>TYPE_CAT</B> String => the types catalog (may be <code>null</code>) 1492 * <LI><B>TYPE_SCHEM</B> String => the types schema (may be <code>null</code>) 1493 * <LI><B>TYPE_NAME</B> String => type name (may be <code>null</code>) 1494 * <LI><B>SELF_REFERENCING_COL_NAME</B> String => name of the designated 1495 * "identifier" column of a typed table (may be <code>null</code>) 1496 * <LI><B>REF_GENERATION</B> String => specifies how values in 1497 * SELF_REFERENCING_COL_NAME are created. Values are 1498 * "SYSTEM", "USER", "DERIVED". (may be <code>null</code>) 1499 * </OL> 1500 * 1501 * <P><B>Note:</B> Some databases may not return information for 1502 * all tables. 1503 * 1504 * @param catalog a catalog name; must match the catalog name as it 1505 * is stored in the database; "" retrieves those without a catalog; 1506 * <code>null</code> means that the catalog name should not be used to narrow 1507 * the search 1508 * @param schemaPattern a schema name pattern; must match the schema name 1509 * as it is stored in the database; "" retrieves those without a schema; 1510 * <code>null</code> means that the schema name should not be used to narrow 1511 * the search 1512 * @param tableNamePattern a table name pattern; must match the 1513 * table name as it is stored in the database 1514 * @param types a list of table types, which must be from the list of table types 1515 * returned from {@link #getTableTypes},to include; <code>null</code> returns 1516 * all types 1517 * @return <code>ResultSet</code> - each row is a table description 1518 * @exception SQLException if a database access error occurs 1519 * @see #getSearchStringEscape 1520 */ 1521 ResultSet getTables(String catalog, String schemaPattern, 1522 String tableNamePattern, String types[]) throws SQLException; 1523 1524 /** 1525 * Retrieves the schema names available in this database. The results 1526 * are ordered by <code>TABLE_CATALOG</code> and 1527 * <code>TABLE_SCHEM</code>. 1528 * 1529 * <P>The schema columns are: 1530 * <OL> 1531 * <LI><B>TABLE_SCHEM</B> String => schema name 1532 * <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>) 1533 * </OL> 1534 * 1535 * @return a <code>ResultSet</code> object in which each row is a 1536 * schema description 1537 * @exception SQLException if a database access error occurs 1538 * 1539 */ 1540 ResultSet getSchemas() throws SQLException; 1541 1542 /** 1543 * Retrieves the catalog names available in this database. The results 1544 * are ordered by catalog name. 1545 * 1546 * <P>The catalog column is: 1547 * <OL> 1548 * <LI><B>TABLE_CAT</B> String => catalog name 1549 * </OL> 1550 * 1551 * @return a <code>ResultSet</code> object in which each row has a 1552 * single <code>String</code> column that is a catalog name 1553 * @exception SQLException if a database access error occurs 1554 */ 1555 ResultSet getCatalogs() throws SQLException; 1556 1557 /** 1558 * Retrieves the table types available in this database. The results 1559 * are ordered by table type. 1560 * 1561 * <P>The table type is: 1562 * <OL> 1563 * <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE", 1564 * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", 1565 * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". 1566 * </OL> 1567 * 1568 * @return a <code>ResultSet</code> object in which each row has a 1569 * single <code>String</code> column that is a table type 1570 * @exception SQLException if a database access error occurs 1571 */ 1572 ResultSet getTableTypes() throws SQLException; 1573 1574 /** 1575 * Retrieves a description of table columns available in 1576 * the specified catalog. 1577 * 1578 * <P>Only column descriptions matching the catalog, schema, table 1579 * and column name criteria are returned. They are ordered by 1580 * <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>, 1581 * <code>TABLE_NAME</code>, and <code>ORDINAL_POSITION</code>. 1582 * 1583 * <P>Each column description has the following columns: 1584 * <OL> 1585 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 1586 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 1587 * <LI><B>TABLE_NAME</B> String => table name 1588 * <LI><B>COLUMN_NAME</B> String => column name 1589 * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types 1590 * <LI><B>TYPE_NAME</B> String => Data source dependent type name, 1591 * for a UDT the type name is fully qualified 1592 * <LI><B>COLUMN_SIZE</B> int => column size. 1593 * <LI><B>BUFFER_LENGTH</B> is not used. 1594 * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits. Null is returned for data types where 1595 * DECIMAL_DIGITS is not applicable. 1596 * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2) 1597 * <LI><B>NULLABLE</B> int => is NULL allowed. 1598 * <UL> 1599 * <LI> columnNoNulls - might not allow <code>NULL</code> values 1600 * <LI> columnNullable - definitely allows <code>NULL</code> values 1601 * <LI> columnNullableUnknown - nullability unknown 1602 * </UL> 1603 * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>) 1604 * <LI><B>COLUMN_DEF</B> String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>) 1605 * <LI><B>SQL_DATA_TYPE</B> int => unused 1606 * <LI><B>SQL_DATETIME_SUB</B> int => unused 1607 * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the 1608 * maximum number of bytes in the column 1609 * <LI><B>ORDINAL_POSITION</B> int => index of column in table 1610 * (starting at 1) 1611 * <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine the nullability for a column. 1612 * <UL> 1613 * <LI> YES --- if the column can include NULLs 1614 * <LI> NO --- if the column cannot include NULLs 1615 * <LI> empty string --- if the nullability for the 1616 * column is unknown 1617 * </UL> 1618 * <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the scope 1619 * of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 1620 * <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the scope 1621 * of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 1622 * <LI><B>SCOPE_TABLE</B> String => table name that this the scope 1623 * of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 1624 * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated 1625 * Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE 1626 * isn't DISTINCT or user-generated REF) 1627 * <LI><B>IS_AUTOINCREMENT</B> String => Indicates whether this column is auto incremented 1628 * <UL> 1629 * <LI> YES --- if the column is auto incremented 1630 * <LI> NO --- if the column is not auto incremented 1631 * <LI> empty string --- if it cannot be determined whether the column is auto incremented 1632 * </UL> 1633 * <LI><B>IS_GENERATEDCOLUMN</B> String => Indicates whether this is a generated column 1634 * <UL> 1635 * <LI> YES --- if this a generated column 1636 * <LI> NO --- if this not a generated column 1637 * <LI> empty string --- if it cannot be determined whether this is a generated column 1638 * </UL> 1639 * </OL> 1640 * 1641 * <p>The COLUMN_SIZE column specifies the column size for the given column. 1642 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1643 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1644 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1645 * this is the length in bytes. Null is returned for data types where the 1646 * column size is not applicable. 1647 * 1648 * @param catalog a catalog name; must match the catalog name as it 1649 * is stored in the database; "" retrieves those without a catalog; 1650 * <code>null</code> means that the catalog name should not be used to narrow 1651 * the search 1652 * @param schemaPattern a schema name pattern; must match the schema name 1653 * as it is stored in the database; "" retrieves those without a schema; 1686 int columnNullable = 1; 1687 1688 /** 1689 * Indicates that the nullability of columns is unknown. 1690 * <P> 1691 * A possible value for the column 1692 * <code>NULLABLE</code> 1693 * in the <code>ResultSet</code> returned by the method 1694 * <code>getColumns</code>. 1695 */ 1696 int columnNullableUnknown = 2; 1697 1698 /** 1699 * Retrieves a description of the access rights for a table's columns. 1700 * 1701 * <P>Only privileges matching the column name criteria are 1702 * returned. They are ordered by COLUMN_NAME and PRIVILEGE. 1703 * 1704 * <P>Each privilige description has the following columns: 1705 * <OL> 1706 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 1707 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 1708 * <LI><B>TABLE_NAME</B> String => table name 1709 * <LI><B>COLUMN_NAME</B> String => column name 1710 * <LI><B>GRANTOR</B> String => grantor of access (may be <code>null</code>) 1711 * <LI><B>GRANTEE</B> String => grantee of access 1712 * <LI><B>PRIVILEGE</B> String => name of access (SELECT, 1713 * INSERT, UPDATE, REFRENCES, ...) 1714 * <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted 1715 * to grant to others; "NO" if not; <code>null</code> if unknown 1716 * </OL> 1717 * 1718 * @param catalog a catalog name; must match the catalog name as it 1719 * is stored in the database; "" retrieves those without a catalog; 1720 * <code>null</code> means that the catalog name should not be used to narrow 1721 * the search 1722 * @param schema a schema name; must match the schema name as it is 1723 * stored in the database; "" retrieves those without a schema; 1724 * <code>null</code> means that the schema name should not be used to narrow 1725 * the search 1726 * @param table a table name; must match the table name as it is 1727 * stored in the database 1728 * @param columnNamePattern a column name pattern; must match the column 1729 * name as it is stored in the database 1730 * @return <code>ResultSet</code> - each row is a column privilege description 1731 * @exception SQLException if a database access error occurs 1732 * @see #getSearchStringEscape 1733 */ 1734 ResultSet getColumnPrivileges(String catalog, String schema, 1735 String table, String columnNamePattern) throws SQLException; 1736 1737 /** 1738 * Retrieves a description of the access rights for each table available 1739 * in a catalog. Note that a table privilege applies to one or 1740 * more columns in the table. It would be wrong to assume that 1741 * this privilege applies to all columns (this may be true for 1742 * some systems but is not true for all.) 1743 * 1744 * <P>Only privileges matching the schema and table name 1745 * criteria are returned. They are ordered by 1746 * <code>TABLE_CAT</code>, 1747 * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>, 1748 * and <code>PRIVILEGE</code>. 1749 * 1750 * <P>Each privilige description has the following columns: 1751 * <OL> 1752 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 1753 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 1754 * <LI><B>TABLE_NAME</B> String => table name 1755 * <LI><B>GRANTOR</B> String => grantor of access (may be <code>null</code>) 1756 * <LI><B>GRANTEE</B> String => grantee of access 1757 * <LI><B>PRIVILEGE</B> String => name of access (SELECT, 1758 * INSERT, UPDATE, REFRENCES, ...) 1759 * <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted 1760 * to grant to others; "NO" if not; <code>null</code> if unknown 1761 * </OL> 1762 * 1763 * @param catalog a catalog name; must match the catalog name as it 1764 * is stored in the database; "" retrieves those without a catalog; 1765 * <code>null</code> means that the catalog name should not be used to narrow 1766 * the search 1767 * @param schemaPattern a schema name pattern; must match the schema name 1768 * as it is stored in the database; "" retrieves those without a schema; 1769 * <code>null</code> means that the schema name should not be used to narrow 1770 * the search 1771 * @param tableNamePattern a table name pattern; must match the 1772 * table name as it is stored in the database 1773 * @return <code>ResultSet</code> - each row is a table privilege description 1774 * @exception SQLException if a database access error occurs 1775 * @see #getSearchStringEscape 1776 */ 1777 ResultSet getTablePrivileges(String catalog, String schemaPattern, 1778 String tableNamePattern) throws SQLException; 1779 1780 /** 1781 * Retrieves a description of a table's optimal set of columns that 1782 * uniquely identifies a row. They are ordered by SCOPE. 1783 * 1784 * <P>Each column description has the following columns: 1785 * <OL> 1786 * <LI><B>SCOPE</B> short => actual scope of result 1787 * <UL> 1788 * <LI> bestRowTemporary - very temporary, while using row 1789 * <LI> bestRowTransaction - valid for remainder of current transaction 1790 * <LI> bestRowSession - valid for remainder of current session 1791 * </UL> 1792 * <LI><B>COLUMN_NAME</B> String => column name 1793 * <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types 1794 * <LI><B>TYPE_NAME</B> String => Data source dependent type name, 1795 * for a UDT the type name is fully qualified 1796 * <LI><B>COLUMN_SIZE</B> int => precision 1797 * <LI><B>BUFFER_LENGTH</B> int => not used 1798 * <LI><B>DECIMAL_DIGITS</B> short => scale - Null is returned for data types where 1799 * DECIMAL_DIGITS is not applicable. 1800 * <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column 1801 * like an Oracle ROWID 1802 * <UL> 1803 * <LI> bestRowUnknown - may or may not be pseudo column 1804 * <LI> bestRowNotPseudo - is NOT a pseudo column 1805 * <LI> bestRowPseudo - is a pseudo column 1806 * </UL> 1807 * </OL> 1808 * 1809 * <p>The COLUMN_SIZE column represents the specified column size for the given column. 1810 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1811 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1812 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1813 * this is the length in bytes. Null is returned for data types where the 1814 * column size is not applicable. 1815 * 1816 * @param catalog a catalog name; must match the catalog name as it 1817 * is stored in the database; "" retrieves those without a catalog; 1818 * <code>null</code> means that the catalog name should not be used to narrow 1819 * the search 1820 * @param schema a schema name; must match the schema name 1885 */ 1886 int bestRowNotPseudo = 1; 1887 1888 /** 1889 * Indicates that the best row identifier is a pseudo column. 1890 * <P> 1891 * A possible value for the column 1892 * <code>PSEUDO_COLUMN</code> 1893 * in the <code>ResultSet</code> object 1894 * returned by the method <code>getBestRowIdentifier</code>. 1895 */ 1896 int bestRowPseudo = 2; 1897 1898 /** 1899 * Retrieves a description of a table's columns that are automatically 1900 * updated when any value in a row is updated. They are 1901 * unordered. 1902 * 1903 * <P>Each column description has the following columns: 1904 * <OL> 1905 * <LI><B>SCOPE</B> short => is not used 1906 * <LI><B>COLUMN_NAME</B> String => column name 1907 * <LI><B>DATA_TYPE</B> int => SQL data type from <code>java.sql.Types</code> 1908 * <LI><B>TYPE_NAME</B> String => Data source-dependent type name 1909 * <LI><B>COLUMN_SIZE</B> int => precision 1910 * <LI><B>BUFFER_LENGTH</B> int => length of column value in bytes 1911 * <LI><B>DECIMAL_DIGITS</B> short => scale - Null is returned for data types where 1912 * DECIMAL_DIGITS is not applicable. 1913 * <LI><B>PSEUDO_COLUMN</B> short => whether this is pseudo column 1914 * like an Oracle ROWID 1915 * <UL> 1916 * <LI> versionColumnUnknown - may or may not be pseudo column 1917 * <LI> versionColumnNotPseudo - is NOT a pseudo column 1918 * <LI> versionColumnPseudo - is a pseudo column 1919 * </UL> 1920 * </OL> 1921 * 1922 * <p>The COLUMN_SIZE column represents the specified column size for the given column. 1923 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1924 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1925 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1926 * this is the length in bytes. Null is returned for data types where the 1927 * column size is not applicable. 1928 * @param catalog a catalog name; must match the catalog name as it 1929 * is stored in the database; "" retrieves those without a catalog; 1930 * <code>null</code> means that the catalog name should not be used to narrow 1931 * the search 1932 * @param schema a schema name; must match the schema name 1933 * as it is stored in the database; "" retrieves those without a schema; 1961 * returned by the method <code>getVersionColumns</code>. 1962 */ 1963 int versionColumnNotPseudo = 1; 1964 1965 /** 1966 * Indicates that this version column is a pseudo column. 1967 * <P> 1968 * A possible value for the column 1969 * <code>PSEUDO_COLUMN</code> 1970 * in the <code>ResultSet</code> object 1971 * returned by the method <code>getVersionColumns</code>. 1972 */ 1973 int versionColumnPseudo = 2; 1974 1975 /** 1976 * Retrieves a description of the given table's primary key columns. They 1977 * are ordered by COLUMN_NAME. 1978 * 1979 * <P>Each primary key column description has the following columns: 1980 * <OL> 1981 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 1982 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 1983 * <LI><B>TABLE_NAME</B> String => table name 1984 * <LI><B>COLUMN_NAME</B> String => column name 1985 * <LI><B>KEY_SEQ</B> short => sequence number within primary key( a value 1986 * of 1 represents the first column of the primary key, a value of 2 would 1987 * represent the second column within the primary key). 1988 * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>) 1989 * </OL> 1990 * 1991 * @param catalog a catalog name; must match the catalog name as it 1992 * is stored in the database; "" retrieves those without a catalog; 1993 * <code>null</code> means that the catalog name should not be used to narrow 1994 * the search 1995 * @param schema a schema name; must match the schema name 1996 * as it is stored in the database; "" retrieves those without a schema; 1997 * <code>null</code> means that the schema name should not be used to narrow 1998 * the search 1999 * @param table a table name; must match the table name as it is stored 2000 * in the database 2001 * @return <code>ResultSet</code> - each row is a primary key column description 2002 * @exception SQLException if a database access error occurs 2003 */ 2004 ResultSet getPrimaryKeys(String catalog, String schema, 2005 String table) throws SQLException; 2006 2007 /** 2008 * Retrieves a description of the primary key columns that are 2009 * referenced by the given table's foreign key columns (the primary keys 2010 * imported by a table). They are ordered by PKTABLE_CAT, 2011 * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ. 2012 * 2013 * <P>Each primary key column description has the following columns: 2014 * <OL> 2015 * <LI><B>PKTABLE_CAT</B> String => primary key table catalog 2016 * being imported (may be <code>null</code>) 2017 * <LI><B>PKTABLE_SCHEM</B> String => primary key table schema 2018 * being imported (may be <code>null</code>) 2019 * <LI><B>PKTABLE_NAME</B> String => primary key table name 2020 * being imported 2021 * <LI><B>PKCOLUMN_NAME</B> String => primary key column name 2022 * being imported 2023 * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>) 2024 * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>) 2025 * <LI><B>FKTABLE_NAME</B> String => foreign key table name 2026 * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name 2027 * <LI><B>KEY_SEQ</B> short => sequence number within a foreign key( a value 2028 * of 1 represents the first column of the foreign key, a value of 2 would 2029 * represent the second column within the foreign key). 2030 * <LI><B>UPDATE_RULE</B> short => What happens to a 2031 * foreign key when the primary key is updated: 2032 * <UL> 2033 * <LI> importedNoAction - do not allow update of primary 2034 * key if it has been imported 2035 * <LI> importedKeyCascade - change imported key to agree 2036 * with primary key update 2037 * <LI> importedKeySetNull - change imported key to <code>NULL</code> 2038 * if its primary key has been updated 2039 * <LI> importedKeySetDefault - change imported key to default values 2040 * if its primary key has been updated 2041 * <LI> importedKeyRestrict - same as importedKeyNoAction 2042 * (for ODBC 2.x compatibility) 2043 * </UL> 2044 * <LI><B>DELETE_RULE</B> short => What happens to 2045 * the foreign key when primary is deleted. 2046 * <UL> 2047 * <LI> importedKeyNoAction - do not allow delete of primary 2048 * key if it has been imported 2049 * <LI> importedKeyCascade - delete rows that import a deleted key 2050 * <LI> importedKeySetNull - change imported key to NULL if 2051 * its primary key has been deleted 2052 * <LI> importedKeyRestrict - same as importedKeyNoAction 2053 * (for ODBC 2.x compatibility) 2054 * <LI> importedKeySetDefault - change imported key to default if 2055 * its primary key has been deleted 2056 * </UL> 2057 * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>) 2058 * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>) 2059 * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 2060 * constraints be deferred until commit 2061 * <UL> 2062 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2063 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2064 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2065 * </UL> 2066 * </OL> 2067 * 2068 * @param catalog a catalog name; must match the catalog name as it 2069 * is stored in the database; "" retrieves those without a catalog; 2070 * <code>null</code> means that the catalog name should not be used to narrow 2071 * the search 2072 * @param schema a schema name; must match the schema name 2073 * as it is stored in the database; "" retrieves those without a schema; 2074 * <code>null</code> means that the schema name should not be used to narrow 2075 * the search 2076 * @param table a table name; must match the table name as it is stored 2077 * in the database 2078 * @return <code>ResultSet</code> - each row is a primary key column description 2079 * @exception SQLException if a database access error occurs 2178 int importedKeyInitiallyImmediate = 6; 2179 2180 /** 2181 * Indicates deferrability. See SQL-92 for a definition. 2182 * <P> 2183 * A possible value for the column <code>DEFERRABILITY</code> 2184 * in the <code>ResultSet</code> objects returned by the methods 2185 * <code>getImportedKeys</code>, <code>getExportedKeys</code>, 2186 * and <code>getCrossReference</code>. 2187 */ 2188 int importedKeyNotDeferrable = 7; 2189 2190 /** 2191 * Retrieves a description of the foreign key columns that reference the 2192 * given table's primary key columns (the foreign keys exported by a 2193 * table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, 2194 * FKTABLE_NAME, and KEY_SEQ. 2195 * 2196 * <P>Each foreign key column description has the following columns: 2197 * <OL> 2198 * <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>) 2199 * <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>) 2200 * <LI><B>PKTABLE_NAME</B> String => primary key table name 2201 * <LI><B>PKCOLUMN_NAME</B> String => primary key column name 2202 * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>) 2203 * being exported (may be <code>null</code>) 2204 * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>) 2205 * being exported (may be <code>null</code>) 2206 * <LI><B>FKTABLE_NAME</B> String => foreign key table name 2207 * being exported 2208 * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name 2209 * being exported 2210 * <LI><B>KEY_SEQ</B> short => sequence number within foreign key( a value 2211 * of 1 represents the first column of the foreign key, a value of 2 would 2212 * represent the second column within the foreign key). 2213 * <LI><B>UPDATE_RULE</B> short => What happens to 2214 * foreign key when primary is updated: 2215 * <UL> 2216 * <LI> importedNoAction - do not allow update of primary 2217 * key if it has been imported 2218 * <LI> importedKeyCascade - change imported key to agree 2219 * with primary key update 2220 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2221 * its primary key has been updated 2222 * <LI> importedKeySetDefault - change imported key to default values 2223 * if its primary key has been updated 2224 * <LI> importedKeyRestrict - same as importedKeyNoAction 2225 * (for ODBC 2.x compatibility) 2226 * </UL> 2227 * <LI><B>DELETE_RULE</B> short => What happens to 2228 * the foreign key when primary is deleted. 2229 * <UL> 2230 * <LI> importedKeyNoAction - do not allow delete of primary 2231 * key if it has been imported 2232 * <LI> importedKeyCascade - delete rows that import a deleted key 2233 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2234 * its primary key has been deleted 2235 * <LI> importedKeyRestrict - same as importedKeyNoAction 2236 * (for ODBC 2.x compatibility) 2237 * <LI> importedKeySetDefault - change imported key to default if 2238 * its primary key has been deleted 2239 * </UL> 2240 * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>) 2241 * <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>) 2242 * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 2243 * constraints be deferred until commit 2244 * <UL> 2245 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2246 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2247 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2248 * </UL> 2249 * </OL> 2250 * 2251 * @param catalog a catalog name; must match the catalog name as it 2252 * is stored in this database; "" retrieves those without a catalog; 2253 * <code>null</code> means that the catalog name should not be used to narrow 2254 * the search 2255 * @param schema a schema name; must match the schema name 2256 * as it is stored in the database; "" retrieves those without a schema; 2257 * <code>null</code> means that the schema name should not be used to narrow 2258 * the search 2259 * @param table a table name; must match the table name as it is stored 2260 * in this database 2261 * @return a <code>ResultSet</code> object in which each row is a 2262 * foreign key column description 2263 * @exception SQLException if a database access error occurs 2264 * @see #getImportedKeys 2265 */ 2266 ResultSet getExportedKeys(String catalog, String schema, 2267 String table) throws SQLException; 2268 2269 /** 2270 * Retrieves a description of the foreign key columns in the given foreign key 2271 * table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). 2272 * The number of columns returned from the parent table must match the number of 2273 * columns that make up the foreign key. They 2274 * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and 2275 * KEY_SEQ. 2276 * 2277 * <P>Each foreign key column description has the following columns: 2278 * <OL> 2279 * <LI><B>PKTABLE_CAT</B> String => parent key table catalog (may be <code>null</code>) 2280 * <LI><B>PKTABLE_SCHEM</B> String => parent key table schema (may be <code>null</code>) 2281 * <LI><B>PKTABLE_NAME</B> String => parent key table name 2282 * <LI><B>PKCOLUMN_NAME</B> String => parent key column name 2283 * <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>) 2284 * being exported (may be <code>null</code>) 2285 * <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>) 2286 * being exported (may be <code>null</code>) 2287 * <LI><B>FKTABLE_NAME</B> String => foreign key table name 2288 * being exported 2289 * <LI><B>FKCOLUMN_NAME</B> String => foreign key column name 2290 * being exported 2291 * <LI><B>KEY_SEQ</B> short => sequence number within foreign key( a value 2292 * of 1 represents the first column of the foreign key, a value of 2 would 2293 * represent the second column within the foreign key). 2294 * <LI><B>UPDATE_RULE</B> short => What happens to 2295 * foreign key when parent key is updated: 2296 * <UL> 2297 * <LI> importedNoAction - do not allow update of parent 2298 * key if it has been imported 2299 * <LI> importedKeyCascade - change imported key to agree 2300 * with parent key update 2301 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2302 * its parent key has been updated 2303 * <LI> importedKeySetDefault - change imported key to default values 2304 * if its parent key has been updated 2305 * <LI> importedKeyRestrict - same as importedKeyNoAction 2306 * (for ODBC 2.x compatibility) 2307 * </UL> 2308 * <LI><B>DELETE_RULE</B> short => What happens to 2309 * the foreign key when parent key is deleted. 2310 * <UL> 2311 * <LI> importedKeyNoAction - do not allow delete of parent 2312 * key if it has been imported 2313 * <LI> importedKeyCascade - delete rows that import a deleted key 2314 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2315 * its primary key has been deleted 2316 * <LI> importedKeyRestrict - same as importedKeyNoAction 2317 * (for ODBC 2.x compatibility) 2318 * <LI> importedKeySetDefault - change imported key to default if 2319 * its parent key has been deleted 2320 * </UL> 2321 * <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>) 2322 * <LI><B>PK_NAME</B> String => parent key name (may be <code>null</code>) 2323 * <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 2324 * constraints be deferred until commit 2325 * <UL> 2326 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2327 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2328 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2329 * </UL> 2330 * </OL> 2331 * 2332 * @param parentCatalog a catalog name; must match the catalog name 2333 * as it is stored in the database; "" retrieves those without a 2334 * catalog; <code>null</code> means drop catalog name from the selection criteria 2335 * @param parentSchema a schema name; must match the schema name as 2336 * it is stored in the database; "" retrieves those without a schema; 2337 * <code>null</code> means drop schema name from the selection criteria 2338 * @param parentTable the name of the table that exports the key; must match 2339 * the table name as it is stored in the database 2340 * @param foreignCatalog a catalog name; must match the catalog name as 2341 * it is stored in the database; "" retrieves those without a 2342 * catalog; <code>null</code> means drop catalog name from the selection criteria 2343 * @param foreignSchema a schema name; must match the schema name as it 2354 String foreignCatalog, String foreignSchema, String foreignTable 2355 ) throws SQLException; 2356 2357 /** 2358 * Retrieves a description of all the data types supported by 2359 * this database. They are ordered by DATA_TYPE and then by how 2360 * closely the data type maps to the corresponding JDBC SQL type. 2361 * 2362 * <P>If the database supports SQL distinct types, then getTypeInfo() will return 2363 * a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT. 2364 * If the database supports SQL structured types, then getTypeInfo() will return 2365 * a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT. 2366 * 2367 * <P>If SQL distinct or structured types are supported, then information on the 2368 * individual types may be obtained from the getUDTs() method. 2369 * 2370 2371 * 2372 * <P>Each type description has the following columns: 2373 * <OL> 2374 * <LI><B>TYPE_NAME</B> String => Type name 2375 * <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types 2376 * <LI><B>PRECISION</B> int => maximum precision 2377 * <LI><B>LITERAL_PREFIX</B> String => prefix used to quote a literal 2378 * (may be <code>null</code>) 2379 * <LI><B>LITERAL_SUFFIX</B> String => suffix used to quote a literal 2380 (may be <code>null</code>) 2381 * <LI><B>CREATE_PARAMS</B> String => parameters used in creating 2382 * the type (may be <code>null</code>) 2383 * <LI><B>NULLABLE</B> short => can you use NULL for this type. 2384 * <UL> 2385 * <LI> typeNoNulls - does not allow NULL values 2386 * <LI> typeNullable - allows NULL values 2387 * <LI> typeNullableUnknown - nullability unknown 2388 * </UL> 2389 * <LI><B>CASE_SENSITIVE</B> boolean=> is it case sensitive. 2390 * <LI><B>SEARCHABLE</B> short => can you use "WHERE" based on this type: 2391 * <UL> 2392 * <LI> typePredNone - No support 2393 * <LI> typePredChar - Only supported with WHERE .. LIKE 2394 * <LI> typePredBasic - Supported except for WHERE .. LIKE 2395 * <LI> typeSearchable - Supported for all WHERE .. 2396 * </UL> 2397 * <LI><B>UNSIGNED_ATTRIBUTE</B> boolean => is it unsigned. 2398 * <LI><B>FIXED_PREC_SCALE</B> boolean => can it be a money value. 2399 * <LI><B>AUTO_INCREMENT</B> boolean => can it be used for an 2400 * auto-increment value. 2401 * <LI><B>LOCAL_TYPE_NAME</B> String => localized version of type name 2402 * (may be <code>null</code>) 2403 * <LI><B>MINIMUM_SCALE</B> short => minimum scale supported 2404 * <LI><B>MAXIMUM_SCALE</B> short => maximum scale supported 2405 * <LI><B>SQL_DATA_TYPE</B> int => unused 2406 * <LI><B>SQL_DATETIME_SUB</B> int => unused 2407 * <LI><B>NUM_PREC_RADIX</B> int => usually 2 or 10 2408 * </OL> 2409 * 2410 * <p>The PRECISION column represents the maximum column size that the server supports for the given datatype. 2411 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 2412 * For datetime datatypes, this is the length in characters of the String representation (assuming the 2413 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 2414 * this is the length in bytes. Null is returned for data types where the 2415 * column size is not applicable. 2416 * 2417 * @return a <code>ResultSet</code> object in which each row is an SQL 2418 * type description 2419 * @exception SQLException if a database access error occurs 2420 */ 2421 ResultSet getTypeInfo() throws SQLException; 2422 2423 /** 2424 * Indicates that a <code>NULL</code> value is NOT allowed for this 2425 * data type. 2426 * <P> 2427 * A possible value for column <code>NULLABLE</code> in the 2481 * <code>getTypeInfo</code>. 2482 */ 2483 int typePredBasic = 2; 2484 2485 /** 2486 * Indicates that all <code>WHERE</code> search clauses can be 2487 * based on this type. 2488 * <P> 2489 * A possible value for column <code>SEARCHABLE</code> in the 2490 * <code>ResultSet</code> object returned by the method 2491 * <code>getTypeInfo</code>. 2492 */ 2493 int typeSearchable = 3; 2494 2495 /** 2496 * Retrieves a description of the given table's indices and statistics. They are 2497 * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. 2498 * 2499 * <P>Each index column description has the following columns: 2500 * <OL> 2501 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 2502 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 2503 * <LI><B>TABLE_NAME</B> String => table name 2504 * <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique. 2505 * false when TYPE is tableIndexStatistic 2506 * <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be <code>null</code>); 2507 * <code>null</code> when TYPE is tableIndexStatistic 2508 * <LI><B>INDEX_NAME</B> String => index name; <code>null</code> when TYPE is 2509 * tableIndexStatistic 2510 * <LI><B>TYPE</B> short => index type: 2511 * <UL> 2512 * <LI> tableIndexStatistic - this identifies table statistics that are 2513 * returned in conjuction with a table's index descriptions 2514 * <LI> tableIndexClustered - this is a clustered index 2515 * <LI> tableIndexHashed - this is a hashed index 2516 * <LI> tableIndexOther - this is some other style of index 2517 * </UL> 2518 * <LI><B>ORDINAL_POSITION</B> short => column sequence number 2519 * within index; zero when TYPE is tableIndexStatistic 2520 * <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is 2521 * tableIndexStatistic 2522 * <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending, 2523 * "D" => descending, may be <code>null</code> if sort sequence is not supported; 2524 * <code>null</code> when TYPE is tableIndexStatistic 2525 * <LI><B>CARDINALITY</B> long => When TYPE is tableIndexStatistic, then 2526 * this is the number of rows in the table; otherwise, it is the 2527 * number of unique values in the index. 2528 * <LI><B>PAGES</B> long => When TYPE is tableIndexStatisic then 2529 * this is the number of pages used for the table, otherwise it 2530 * is the number of pages used for the current index. 2531 * <LI><B>FILTER_CONDITION</B> String => Filter condition, if any. 2532 * (may be <code>null</code>) 2533 * </OL> 2534 * 2535 * @param catalog a catalog name; must match the catalog name as it 2536 * is stored in this database; "" retrieves those without a catalog; 2537 * <code>null</code> means that the catalog name should not be used to narrow 2538 * the search 2539 * @param schema a schema name; must match the schema name 2540 * as it is stored in this database; "" retrieves those without a schema; 2541 * <code>null</code> means that the schema name should not be used to narrow 2542 * the search 2543 * @param table a table name; must match the table name as it is stored 2544 * in this database 2545 * @param unique when true, return only indices for unique values; 2546 * when false, return indices regardless of whether unique or not 2547 * @param approximate when true, result is allowed to reflect approximate 2548 * or out of data values; when false, results are requested to be 2549 * accurate 2550 * @return <code>ResultSet</code> - each row is an index column description 2551 * @exception SQLException if a database access error occurs 2764 * @exception SQLException if a database access error occurs 2765 * @since 1.2 2766 */ 2767 boolean supportsBatchUpdates() throws SQLException; 2768 2769 /** 2770 * Retrieves a description of the user-defined types (UDTs) defined 2771 * in a particular schema. Schema-specific UDTs may have type 2772 * <code>JAVA_OBJECT</code>, <code>STRUCT</code>, 2773 * or <code>DISTINCT</code>. 2774 * 2775 * <P>Only types matching the catalog, schema, type name and type 2776 * criteria are returned. They are ordered by <code>DATA_TYPE</code>, 2777 * <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code> and 2778 * <code>TYPE_NAME</code>. The type name parameter may be a fully-qualified 2779 * name. In this case, the catalog and schemaPattern parameters are 2780 * ignored. 2781 * 2782 * <P>Each type description has the following columns: 2783 * <OL> 2784 * <LI><B>TYPE_CAT</B> String => the type's catalog (may be <code>null</code>) 2785 * <LI><B>TYPE_SCHEM</B> String => type's schema (may be <code>null</code>) 2786 * <LI><B>TYPE_NAME</B> String => type name 2787 * <LI><B>CLASS_NAME</B> String => Java class name 2788 * <LI><B>DATA_TYPE</B> int => type value defined in java.sql.Types. 2789 * One of JAVA_OBJECT, STRUCT, or DISTINCT 2790 * <LI><B>REMARKS</B> String => explanatory comment on the type 2791 * <LI><B>BASE_TYPE</B> short => type code of the source type of a 2792 * DISTINCT type or the type that implements the user-generated 2793 * reference type of the SELF_REFERENCING_COLUMN of a structured 2794 * type as defined in java.sql.Types (<code>null</code> if DATA_TYPE is not 2795 * DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED) 2796 * </OL> 2797 * 2798 * <P><B>Note:</B> If the driver does not support UDTs, an empty 2799 * result set is returned. 2800 * 2801 * @param catalog a catalog name; must match the catalog name as it 2802 * is stored in the database; "" retrieves those without a catalog; 2803 * <code>null</code> means that the catalog name should not be used to narrow 2804 * the search 2805 * @param schemaPattern a schema pattern name; must match the schema name 2806 * as it is stored in the database; "" retrieves those without a schema; 2807 * <code>null</code> means that the schema name should not be used to narrow 2808 * the search 2809 * @param typeNamePattern a type name pattern; must match the type name 2810 * as it is stored in the database; may be a fully qualified name 2811 * @param types a list of user-defined types (JAVA_OBJECT, 2877 * @since 1.4 2878 */ 2879 boolean supportsGetGeneratedKeys() throws SQLException; 2880 2881 /** 2882 * Retrieves a description of the user-defined type (UDT) hierarchies defined in a 2883 * particular schema in this database. Only the immediate super type/ 2884 * sub type relationship is modeled. 2885 * <P> 2886 * Only supertype information for UDTs matching the catalog, 2887 * schema, and type name is returned. The type name parameter 2888 * may be a fully-qualified name. When the UDT name supplied is a 2889 * fully-qualified name, the catalog and schemaPattern parameters are 2890 * ignored. 2891 * <P> 2892 * If a UDT does not have a direct super type, it is not listed here. 2893 * A row of the <code>ResultSet</code> object returned by this method 2894 * describes the designated UDT and a direct supertype. A row has the following 2895 * columns: 2896 * <OL> 2897 * <LI><B>TYPE_CAT</B> String => the UDT's catalog (may be <code>null</code>) 2898 * <LI><B>TYPE_SCHEM</B> String => UDT's schema (may be <code>null</code>) 2899 * <LI><B>TYPE_NAME</B> String => type name of the UDT 2900 * <LI><B>SUPERTYPE_CAT</B> String => the direct super type's catalog 2901 * (may be <code>null</code>) 2902 * <LI><B>SUPERTYPE_SCHEM</B> String => the direct super type's schema 2903 * (may be <code>null</code>) 2904 * <LI><B>SUPERTYPE_NAME</B> String => the direct super type's name 2905 * </OL> 2906 * 2907 * <P><B>Note:</B> If the driver does not support type hierarchies, an 2908 * empty result set is returned. 2909 * 2910 * @param catalog a catalog name; "" retrieves those without a catalog; 2911 * <code>null</code> means drop catalog name from the selection criteria 2912 * @param schemaPattern a schema name pattern; "" retrieves those 2913 * without a schema 2914 * @param typeNamePattern a UDT name pattern; may be a fully-qualified 2915 * name 2916 * @return a <code>ResultSet</code> object in which a row gives information 2917 * about the designated UDT 2918 * @throws SQLException if a database access error occurs 2919 * @see #getSearchStringEscape 2920 * @since 1.4 2921 */ 2922 ResultSet getSuperTypes(String catalog, String schemaPattern, 2923 String typeNamePattern) throws SQLException; 2924 2925 /** 2926 * Retrieves a description of the table hierarchies defined in a particular 2927 * schema in this database. 2928 * 2929 * <P>Only supertable information for tables matching the catalog, schema 2930 * and table name are returned. The table name parameter may be a fully- 2931 * qualified name, in which case, the catalog and schemaPattern parameters 2932 * are ignored. If a table does not have a super table, it is not listed here. 2933 * Supertables have to be defined in the same catalog and schema as the 2934 * sub tables. Therefore, the type description does not need to include 2935 * this information for the supertable. 2936 * 2937 * <P>Each type description has the following columns: 2938 * <OL> 2939 * <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>) 2940 * <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>) 2941 * <LI><B>TABLE_NAME</B> String => type name 2942 * <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name 2943 * </OL> 2944 * 2945 * <P><B>Note:</B> If the driver does not support type hierarchies, an 2946 * empty result set is returned. 2947 * 2948 * @param catalog a catalog name; "" retrieves those without a catalog; 2949 * <code>null</code> means drop catalog name from the selection criteria 2950 * @param schemaPattern a schema name pattern; "" retrieves those 2951 * without a schema 2952 * @param tableNamePattern a table name pattern; may be a fully-qualified 2953 * name 2954 * @return a <code>ResultSet</code> object in which each row is a type description 2955 * @throws SQLException if a database access error occurs 2956 * @see #getSearchStringEscape 2957 * @since 1.4 2958 */ 2959 ResultSet getSuperTables(String catalog, String schemaPattern, 2960 String tableNamePattern) throws SQLException; 2961 2962 /** 2984 * A possible value for the column <code>NULLABLE</code> 2985 * in the <code>ResultSet</code> object 2986 * returned by the method <code>getAttributes</code>. 2987 */ 2988 short attributeNullableUnknown = 2; 2989 2990 /** 2991 * Retrieves a description of the given attribute of the given type 2992 * for a user-defined type (UDT) that is available in the given schema 2993 * and catalog. 2994 * <P> 2995 * Descriptions are returned only for attributes of UDTs matching the 2996 * catalog, schema, type, and attribute name criteria. They are ordered by 2997 * <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code>, 2998 * <code>TYPE_NAME</code> and <code>ORDINAL_POSITION</code>. This description 2999 * does not contain inherited attributes. 3000 * <P> 3001 * The <code>ResultSet</code> object that is returned has the following 3002 * columns: 3003 * <OL> 3004 * <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>) 3005 * <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>) 3006 * <LI><B>TYPE_NAME</B> String => type name 3007 * <LI><B>ATTR_NAME</B> String => attribute name 3008 * <LI><B>DATA_TYPE</B> int => attribute type SQL type from java.sql.Types 3009 * <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name. 3010 * For a UDT, the type name is fully qualified. For a REF, the type name is 3011 * fully qualified and represents the target type of the reference type. 3012 * <LI><B>ATTR_SIZE</B> int => column size. For char or date 3013 * types this is the maximum number of characters; for numeric or 3014 * decimal types this is precision. 3015 * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits. Null is returned for data types where 3016 * DECIMAL_DIGITS is not applicable. 3017 * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2) 3018 * <LI><B>NULLABLE</B> int => whether NULL is allowed 3019 * <UL> 3020 * <LI> attributeNoNulls - might not allow NULL values 3021 * <LI> attributeNullable - definitely allows NULL values 3022 * <LI> attributeNullableUnknown - nullability unknown 3023 * </UL> 3024 * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>) 3025 * <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>) 3026 * <LI><B>SQL_DATA_TYPE</B> int => unused 3027 * <LI><B>SQL_DATETIME_SUB</B> int => unused 3028 * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the 3029 * maximum number of bytes in the column 3030 * <LI><B>ORDINAL_POSITION</B> int => index of the attribute in the UDT 3031 * (starting at 1) 3032 * <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine 3033 * the nullability for a attribute. 3034 * <UL> 3035 * <LI> YES --- if the attribute can include NULLs 3036 * <LI> NO --- if the attribute cannot include NULLs 3037 * <LI> empty string --- if the nullability for the 3038 * attribute is unknown 3039 * </UL> 3040 * <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the 3041 * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 3042 * <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the 3043 * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 3044 * <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a 3045 * reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 3046 * <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated 3047 * Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE 3048 * isn't DISTINCT or user-generated REF) 3049 * </OL> 3050 * @param catalog a catalog name; must match the catalog name as it 3051 * is stored in the database; "" retrieves those without a catalog; 3052 * <code>null</code> means that the catalog name should not be used to narrow 3053 * the search 3054 * @param schemaPattern a schema name pattern; must match the schema name 3055 * as it is stored in the database; "" retrieves those without a schema; 3056 * <code>null</code> means that the schema name should not be used to narrow 3057 * the search 3058 * @param typeNamePattern a type name pattern; must match the 3059 * type name as it is stored in the database 3060 * @param attributeNamePattern an attribute name pattern; must match the attribute 3061 * name as it is declared in the database 3062 * @return a <code>ResultSet</code> object in which each row is an 3063 * attribute description 3064 * @exception SQLException if a database access error occurs 3065 * @see #getSearchStringEscape 3066 * @since 1.4 3186 * @since 1.4 3187 */ 3188 boolean locatorsUpdateCopy() throws SQLException; 3189 3190 /** 3191 * Retrieves whether this database supports statement pooling. 3192 * 3193 * @return <code>true</code> if so; <code>false</code> otherwise 3194 * @throws SQLException if a database access error occurs 3195 * @since 1.4 3196 */ 3197 boolean supportsStatementPooling() throws SQLException; 3198 3199 //------------------------- JDBC 4.0 ----------------------------------- 3200 3201 /** 3202 * Indicates whether or not this data source supports the SQL <code>ROWID</code> type, 3203 * and if so the lifetime for which a <code>RowId</code> object remains valid. 3204 * <p> 3205 * The returned int values have the following relationship: 3206 * <pre> 3207 * ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION 3208 * < ROWID_VALID_SESSION < ROWID_VALID_FOREVER 3209 * </pre> 3210 * so conditional logic such as 3211 * <pre> 3212 * if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION) 3213 * </pre> 3214 * can be used. Valid Forever means valid across all Sessions, and valid for 3215 * a Session means valid across all its contained Transactions. 3216 * 3217 * @return the status indicating the lifetime of a <code>RowId</code> 3218 * @throws SQLException if a database access error occurs 3219 * @since 1.6 3220 */ 3221 RowIdLifetime getRowIdLifetime() throws SQLException; 3222 3223 /** 3224 * Retrieves the schema names available in this database. The results 3225 * are ordered by <code>TABLE_CATALOG</code> and 3226 * <code>TABLE_SCHEM</code>. 3227 * 3228 * <P>The schema columns are: 3229 * <OL> 3230 * <LI><B>TABLE_SCHEM</B> String => schema name 3231 * <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>) 3232 * </OL> 3233 * 3234 * 3235 * @param catalog a catalog name; must match the catalog name as it is stored 3236 * in the database;"" retrieves those without a catalog; null means catalog 3237 * name should not be used to narrow down the search. 3238 * @param schemaPattern a schema name; must match the schema name as it is 3239 * stored in the database; null means 3240 * schema name should not be used to narrow down the search. 3241 * @return a <code>ResultSet</code> object in which each row is a 3242 * schema description 3243 * @exception SQLException if a database access error occurs 3244 * @see #getSearchStringEscape 3245 * @since 1.6 3246 */ 3247 ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException; 3248 3249 /** 3250 * Retrieves whether this database supports invoking user-defined or vendor functions 3251 * using the stored procedure escape syntax. 3256 */ 3257 boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException; 3258 3259 /** 3260 * Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> inidcates 3261 * that all open ResultSets are closed, even ones that are holdable. When a <code>SQLException</code> occurs while 3262 * autocommit is <code>true</code>, it is vendor specific whether the JDBC driver responds with a commit operation, a 3263 * rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference 3264 * is in whether or not holdable ResultSets are closed. 3265 * 3266 * @return <code>true</code> if so; <code>false</code> otherwise 3267 * @exception SQLException if a database access error occurs 3268 * @since 1.6 3269 */ 3270 boolean autoCommitFailureClosesAllResultSets() throws SQLException; 3271 /** 3272 * Retrieves a list of the client info properties 3273 * that the driver supports. The result set contains the following columns 3274 * <p> 3275 * <ol> 3276 * <li><b>NAME</b> String=> The name of the client info property<br> 3277 * <li><b>MAX_LEN</b> int=> The maximum length of the value for the property<br> 3278 * <li><b>DEFAULT_VALUE</b> String=> The default value of the property<br> 3279 * <li><b>DESCRIPTION</b> String=> A description of the property. This will typically 3280 * contain information as to where this property is 3281 * stored in the database. 3282 * </ol> 3283 * <p> 3284 * The <code>ResultSet</code> is sorted by the NAME column 3285 * <p> 3286 * @return A <code>ResultSet</code> object; each row is a supported client info 3287 * property 3288 * <p> 3289 * @exception SQLException if a database access error occurs 3290 * <p> 3291 * @since 1.6 3292 */ 3293 ResultSet getClientInfoProperties() 3294 throws SQLException; 3295 3296 /** 3297 * Retrieves a description of the system and user functions available 3298 * in the given catalog. 3299 * <P> 3300 * Only system and user function descriptions matching the schema and 3301 * function name criteria are returned. They are ordered by 3302 * <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>, 3303 * <code>FUNCTION_NAME</code> and 3304 * <code>SPECIFIC_ NAME</code>. 3305 * 3306 * <P>Each function description has the the following columns: 3307 * <OL> 3308 * <LI><B>FUNCTION_CAT</B> String => function catalog (may be <code>null</code>) 3309 * <LI><B>FUNCTION_SCHEM</B> String => function schema (may be <code>null</code>) 3310 * <LI><B>FUNCTION_NAME</B> String => function name. This is the name 3311 * used to invoke the function 3312 * <LI><B>REMARKS</B> String => explanatory comment on the function 3313 * <LI><B>FUNCTION_TYPE</B> short => kind of function: 3314 * <UL> 3315 * <LI>functionResultUnknown - Cannot determine if a return value 3316 * or table will be returned 3317 * <LI> functionNoTable- Does not return a table 3318 * <LI> functionReturnsTable - Returns a table 3319 * </UL> 3320 * <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies 3321 * this function within its schema. This is a user specified, or DBMS 3322 * generated, name that may be different then the <code>FUNCTION_NAME</code> 3323 * for example with overload functions 3324 * </OL> 3325 * <p> 3326 * A user may not have permission to execute any of the functions that are 3327 * returned by <code>getFunctions</code> 3328 * 3329 * @param catalog a catalog name; must match the catalog name as it 3330 * is stored in the database; "" retrieves those without a catalog; 3331 * <code>null</code> means that the catalog name should not be used to narrow 3332 * the search 3333 * @param schemaPattern a schema name pattern; must match the schema name 3334 * as it is stored in the database; "" retrieves those without a schema; 3335 * <code>null</code> means that the schema name should not be used to narrow 3336 * the search 3337 * @param functionNamePattern a function name pattern; must match the 3338 * function name as it is stored in the database 3339 * @return <code>ResultSet</code> - each row is a function description 3340 * @exception SQLException if a database access error occurs 3342 * @since 1.6 3343 */ 3344 ResultSet getFunctions(String catalog, String schemaPattern, 3345 String functionNamePattern) throws SQLException; 3346 /** 3347 * Retrieves a description of the given catalog's system or user 3348 * function parameters and return type. 3349 * 3350 * <P>Only descriptions matching the schema, function and 3351 * parameter name criteria are returned. They are ordered by 3352 * <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>, 3353 * <code>FUNCTION_NAME</code> and 3354 * <code>SPECIFIC_ NAME</code>. Within this, the return value, 3355 * if any, is first. Next are the parameter descriptions in call 3356 * order. The column descriptions follow in column number order. 3357 * 3358 * <P>Each row in the <code>ResultSet</code> 3359 * is a parameter description, column description or 3360 * return type description with the following fields: 3361 * <OL> 3362 * <LI><B>FUNCTION_CAT</B> String => function catalog (may be <code>null</code>) 3363 * <LI><B>FUNCTION_SCHEM</B> String => function schema (may be <code>null</code>) 3364 * <LI><B>FUNCTION_NAME</B> String => function name. This is the name 3365 * used to invoke the function 3366 * <LI><B>COLUMN_NAME</B> String => column/parameter name 3367 * <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter: 3368 * <UL> 3369 * <LI> functionColumnUnknown - nobody knows 3370 * <LI> functionColumnIn - IN parameter 3371 * <LI> functionColumnInOut - INOUT parameter 3372 * <LI> functionColumnOut - OUT parameter 3373 * <LI> functionColumnReturn - function return value 3374 * <LI> functionColumnResult - Indicates that the parameter or column 3375 * is a column in the <code>ResultSet</code> 3376 * </UL> 3377 * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types 3378 * <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the 3379 * type name is fully qualified 3380 * <LI><B>PRECISION</B> int => precision 3381 * <LI><B>LENGTH</B> int => length in bytes of data 3382 * <LI><B>SCALE</B> short => scale - null is returned for data types where 3383 * SCALE is not applicable. 3384 * <LI><B>RADIX</B> short => radix 3385 * <LI><B>NULLABLE</B> short => can it contain NULL. 3386 * <UL> 3387 * <LI> functionNoNulls - does not allow NULL values 3388 * <LI> functionNullable - allows NULL values 3389 * <LI> functionNullableUnknown - nullability unknown 3390 * </UL> 3391 * <LI><B>REMARKS</B> String => comment describing column/parameter 3392 * <LI><B>CHAR_OCTET_LENGTH</B> int => the maximum length of binary 3393 * and character based parameters or columns. For any other datatype the returned value 3394 * is a NULL 3395 * <LI><B>ORDINAL_POSITION</B> int => the ordinal position, starting 3396 * from 1, for the input and output parameters. A value of 0 3397 * is returned if this row describes the function's return value. 3398 * For result set columns, it is the 3399 * ordinal position of the column in the result set starting from 1. 3400 * <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine 3401 * the nullability for a parameter or column. 3402 * <UL> 3403 * <LI> YES --- if the parameter or column can include NULLs 3404 * <LI> NO --- if the parameter or column cannot include NULLs 3405 * <LI> empty string --- if the nullability for the 3406 * parameter or column is unknown 3407 * </UL> 3408 * <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies 3409 * this function within its schema. This is a user specified, or DBMS 3410 * generated, name that may be different then the <code>FUNCTION_NAME</code> 3411 * for example with overload functions 3412 * </OL> 3413 * 3414 * <p>The PRECISION column represents the specified column size for the given 3415 * parameter or column. 3416 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 3417 * For datetime datatypes, this is the length in characters of the String representation (assuming the 3418 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 3419 * this is the length in bytes. Null is returned for data types where the 3420 * column size is not applicable. 3421 * @param catalog a catalog name; must match the catalog name as it 3422 * is stored in the database; "" retrieves those without a catalog; 3423 * <code>null</code> means that the catalog name should not be used to narrow 3424 * the search 3425 * @param schemaPattern a schema name pattern; must match the schema name 3426 * as it is stored in the database; "" retrieves those without a schema; 3427 * <code>null</code> means that the schema name should not be used to narrow 3428 * the search 3574 int functionReturnsTable = 2; 3575 3576 //--------------------------JDBC 4.1 ----------------------------- 3577 3578 /** 3579 * Retrieves a description of the pseudo or hidden columns available 3580 * in a given table within the specified catalog and schema. 3581 * Pseudo or hidden columns may not always be stored within 3582 * a table and are not visible in a ResultSet unless they are 3583 * specified in the query's outermost SELECT list. Pseudo or hidden 3584 * columns may not necessarily be able to be modified. If there are 3585 * no pseudo or hidden columns, an empty ResultSet is returned. 3586 * 3587 * <P>Only column descriptions matching the catalog, schema, table 3588 * and column name criteria are returned. They are ordered by 3589 * <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>, <code>TABLE_NAME</code> 3590 * and <code>COLUMN_NAME</code>. 3591 * 3592 * <P>Each column description has the following columns: 3593 * <OL> 3594 * <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>) 3595 * <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>) 3596 * <LI><B>TABLE_NAME</B> String => table name 3597 * <LI><B>COLUMN_NAME</B> String => column name 3598 * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types 3599 * <LI><B>COLUMN_SIZE</B> int => column size. 3600 * <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits. Null is returned for data types where 3601 * DECIMAL_DIGITS is not applicable. 3602 * <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2) 3603 * <LI><B>COLUMN_USAGE</B> String => The allowed usage for the column. The 3604 * value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name PseudoColumnUsage.name()} 3605 * <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>) 3606 * <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the 3607 * maximum number of bytes in the column 3608 * <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine the nullability for a column. 3609 * <UL> 3610 * <LI> YES --- if the column can include NULLs 3611 * <LI> NO --- if the column cannot include NULLs 3612 * <LI> empty string --- if the nullability for the column is unknown 3613 * </UL> 3614 * </OL> 3615 * 3616 * <p>The COLUMN_SIZE column specifies the column size for the given column. 3617 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 3618 * For datetime datatypes, this is the length in characters of the String representation (assuming the 3619 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 3620 * this is the length in bytes. Null is returned for data types where the 3621 * column size is not applicable. 3622 * 3623 * @param catalog a catalog name; must match the catalog name as it 3624 * is stored in the database; "" retrieves those without a catalog; 3625 * <code>null</code> means that the catalog name should not be used to narrow 3626 * the search 3627 * @param schemaPattern a schema name pattern; must match the schema name 3628 * as it is stored in the database; "" retrieves those without a schema; | 1201 * Retrieves whether this database ignores a data definition statement 1202 * within a transaction. 1203 * 1204 * @return <code>true</code> if so; <code>false</code> otherwise 1205 * @exception SQLException if a database access error occurs 1206 */ 1207 boolean dataDefinitionIgnoredInTransactions() 1208 throws SQLException; 1209 1210 /** 1211 * Retrieves a description of the stored procedures available in the given 1212 * catalog. 1213 * <P> 1214 * Only procedure descriptions matching the schema and 1215 * procedure name criteria are returned. They are ordered by 1216 * <code>PROCEDURE_CAT</code>, <code>PROCEDURE_SCHEM</code>, 1217 * <code>PROCEDURE_NAME</code> and <code>SPECIFIC_ NAME</code>. 1218 * 1219 * <P>Each procedure description has the the following columns: 1220 * <OL> 1221 * <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be <code>null</code>) 1222 * <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be <code>null</code>) 1223 * <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name 1224 * <LI> reserved for future use 1225 * <LI> reserved for future use 1226 * <LI> reserved for future use 1227 * <LI><B>REMARKS</B> String {@code =>} explanatory comment on the procedure 1228 * <LI><B>PROCEDURE_TYPE</B> short {@code =>} kind of procedure: 1229 * <UL> 1230 * <LI> procedureResultUnknown - Cannot determine if a return value 1231 * will be returned 1232 * <LI> procedureNoResult - Does not return a return value 1233 * <LI> procedureReturnsResult - Returns a return value 1234 * </UL> 1235 * <LI><B>SPECIFIC_NAME</B> String {@code =>} The name which uniquely identifies this 1236 * procedure within its schema. 1237 * </OL> 1238 * <p> 1239 * A user may not have permissions to execute any of the procedures that are 1240 * returned by <code>getProcedures</code> 1241 * 1242 * @param catalog a catalog name; must match the catalog name as it 1243 * is stored in the database; "" retrieves those without a catalog; 1244 * <code>null</code> means that the catalog name should not be used to narrow 1245 * the search 1246 * @param schemaPattern a schema name pattern; must match the schema name 1247 * as it is stored in the database; "" retrieves those without a schema; 1248 * <code>null</code> means that the schema name should not be used to narrow 1249 * the search 1250 * @param procedureNamePattern a procedure name pattern; must match the 1251 * procedure name as it is stored in the database 1252 * @return <code>ResultSet</code> - each row is a procedure description 1253 * @exception SQLException if a database access error occurs 1254 * @see #getSearchStringEscape 1255 */ 1280 * <P> 1281 * A possible value for column <code>PROCEDURE_TYPE</code> in the 1282 * <code>ResultSet</code> object returned by the method 1283 * <code>getProcedures</code>. 1284 */ 1285 int procedureReturnsResult = 2; 1286 1287 /** 1288 * Retrieves a description of the given catalog's stored procedure parameter 1289 * and result columns. 1290 * 1291 * <P>Only descriptions matching the schema, procedure and 1292 * parameter name criteria are returned. They are ordered by 1293 * PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_NAME. Within this, the return value, 1294 * if any, is first. Next are the parameter descriptions in call 1295 * order. The column descriptions follow in column number order. 1296 * 1297 * <P>Each row in the <code>ResultSet</code> is a parameter description or 1298 * column description with the following fields: 1299 * <OL> 1300 * <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be <code>null</code>) 1301 * <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be <code>null</code>) 1302 * <LI><B>PROCEDURE_NAME</B> String {@code =>} procedure name 1303 * <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name 1304 * <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter: 1305 * <UL> 1306 * <LI> procedureColumnUnknown - nobody knows 1307 * <LI> procedureColumnIn - IN parameter 1308 * <LI> procedureColumnInOut - INOUT parameter 1309 * <LI> procedureColumnOut - OUT parameter 1310 * <LI> procedureColumnReturn - procedure return value 1311 * <LI> procedureColumnResult - result column in <code>ResultSet</code> 1312 * </UL> 1313 * <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types 1314 * <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the 1315 * type name is fully qualified 1316 * <LI><B>PRECISION</B> int {@code =>} precision 1317 * <LI><B>LENGTH</B> int {@code =>} length in bytes of data 1318 * <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where 1319 * SCALE is not applicable. 1320 * <LI><B>RADIX</B> short {@code =>} radix 1321 * <LI><B>NULLABLE</B> short {@code =>} can it contain NULL. 1322 * <UL> 1323 * <LI> procedureNoNulls - does not allow NULL values 1324 * <LI> procedureNullable - allows NULL values 1325 * <LI> procedureNullableUnknown - nullability unknown 1326 * </UL> 1327 * <LI><B>REMARKS</B> String {@code =>} comment describing parameter/column 1328 * <LI><B>COLUMN_DEF</B> String {@code =>} default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>) 1329 * <UL> 1330 * <LI> The string NULL (not enclosed in quotes) - if NULL was specified as the default value 1331 * <LI> TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation 1332 * <LI> NULL - if a default value was not specified 1333 * </UL> 1334 * <LI><B>SQL_DATA_TYPE</B> int {@code =>} reserved for future use 1335 * <LI><B>SQL_DATETIME_SUB</B> int {@code =>} reserved for future use 1336 * <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} the maximum length of binary and character based columns. For any other datatype the returned value is a 1337 * NULL 1338 * <LI><B>ORDINAL_POSITION</B> int {@code =>} the ordinal position, starting from 1, for the input and output parameters for a procedure. A value of 0 1339 *is returned if this row describes the procedure's return value. For result set columns, it is the 1340 *ordinal position of the column in the result set starting from 1. If there are 1341 *multiple result sets, the column ordinal positions are implementation 1342 * defined. 1343 * <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column. 1344 * <UL> 1345 * <LI> YES --- if the column can include NULLs 1346 * <LI> NO --- if the column cannot include NULLs 1347 * <LI> empty string --- if the nullability for the 1348 * column is unknown 1349 * </UL> 1350 * <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies this procedure within its schema. 1351 * </OL> 1352 * 1353 * <P><B>Note:</B> Some databases may not return the column 1354 * descriptions for a procedure. 1355 * 1356 * <p>The PRECISION column represents the specified column size for the given column. 1357 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1358 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1359 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1360 * this is the length in bytes. Null is returned for data types where the 1361 * column size is not applicable. 1362 * @param catalog a catalog name; must match the catalog name as it 1363 * is stored in the database; "" retrieves those without a catalog; 1364 * <code>null</code> means that the catalog name should not be used to narrow 1365 * the search 1366 * @param schemaPattern a schema name pattern; must match the schema name 1367 * as it is stored in the database; "" retrieves those without a schema; 1368 * <code>null</code> means that the schema name should not be used to narrow 1369 * the search 1370 * @param procedureNamePattern a procedure name pattern; must match the 1464 * Indicates that whether <code>NULL</code> values are allowed 1465 * is unknown. 1466 * <P> 1467 * A possible value for the column 1468 * <code>NULLABLE</code> 1469 * in the <code>ResultSet</code> object 1470 * returned by the method <code>getProcedureColumns</code>. 1471 */ 1472 int procedureNullableUnknown = 2; 1473 1474 1475 /** 1476 * Retrieves a description of the tables available in the given catalog. 1477 * Only table descriptions matching the catalog, schema, table 1478 * name and type criteria are returned. They are ordered by 1479 * <code>TABLE_TYPE</code>, <code>TABLE_CAT</code>, 1480 * <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>. 1481 * <P> 1482 * Each table description has the following columns: 1483 * <OL> 1484 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 1485 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 1486 * <LI><B>TABLE_NAME</B> String {@code =>} table name 1487 * <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE", 1488 * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", 1489 * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". 1490 * <LI><B>REMARKS</B> String {@code =>} explanatory comment on the table 1491 * <LI><B>TYPE_CAT</B> String {@code =>} the types catalog (may be <code>null</code>) 1492 * <LI><B>TYPE_SCHEM</B> String {@code =>} the types schema (may be <code>null</code>) 1493 * <LI><B>TYPE_NAME</B> String {@code =>} type name (may be <code>null</code>) 1494 * <LI><B>SELF_REFERENCING_COL_NAME</B> String {@code =>} name of the designated 1495 * "identifier" column of a typed table (may be <code>null</code>) 1496 * <LI><B>REF_GENERATION</B> String {@code =>} specifies how values in 1497 * SELF_REFERENCING_COL_NAME are created. Values are 1498 * "SYSTEM", "USER", "DERIVED". (may be <code>null</code>) 1499 * </OL> 1500 * 1501 * <P><B>Note:</B> Some databases may not return information for 1502 * all tables. 1503 * 1504 * @param catalog a catalog name; must match the catalog name as it 1505 * is stored in the database; "" retrieves those without a catalog; 1506 * <code>null</code> means that the catalog name should not be used to narrow 1507 * the search 1508 * @param schemaPattern a schema name pattern; must match the schema name 1509 * as it is stored in the database; "" retrieves those without a schema; 1510 * <code>null</code> means that the schema name should not be used to narrow 1511 * the search 1512 * @param tableNamePattern a table name pattern; must match the 1513 * table name as it is stored in the database 1514 * @param types a list of table types, which must be from the list of table types 1515 * returned from {@link #getTableTypes},to include; <code>null</code> returns 1516 * all types 1517 * @return <code>ResultSet</code> - each row is a table description 1518 * @exception SQLException if a database access error occurs 1519 * @see #getSearchStringEscape 1520 */ 1521 ResultSet getTables(String catalog, String schemaPattern, 1522 String tableNamePattern, String types[]) throws SQLException; 1523 1524 /** 1525 * Retrieves the schema names available in this database. The results 1526 * are ordered by <code>TABLE_CATALOG</code> and 1527 * <code>TABLE_SCHEM</code>. 1528 * 1529 * <P>The schema columns are: 1530 * <OL> 1531 * <LI><B>TABLE_SCHEM</B> String {@code =>} schema name 1532 * <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be <code>null</code>) 1533 * </OL> 1534 * 1535 * @return a <code>ResultSet</code> object in which each row is a 1536 * schema description 1537 * @exception SQLException if a database access error occurs 1538 * 1539 */ 1540 ResultSet getSchemas() throws SQLException; 1541 1542 /** 1543 * Retrieves the catalog names available in this database. The results 1544 * are ordered by catalog name. 1545 * 1546 * <P>The catalog column is: 1547 * <OL> 1548 * <LI><B>TABLE_CAT</B> String {@code =>} catalog name 1549 * </OL> 1550 * 1551 * @return a <code>ResultSet</code> object in which each row has a 1552 * single <code>String</code> column that is a catalog name 1553 * @exception SQLException if a database access error occurs 1554 */ 1555 ResultSet getCatalogs() throws SQLException; 1556 1557 /** 1558 * Retrieves the table types available in this database. The results 1559 * are ordered by table type. 1560 * 1561 * <P>The table type is: 1562 * <OL> 1563 * <LI><B>TABLE_TYPE</B> String {@code =>} table type. Typical types are "TABLE", 1564 * "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", 1565 * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". 1566 * </OL> 1567 * 1568 * @return a <code>ResultSet</code> object in which each row has a 1569 * single <code>String</code> column that is a table type 1570 * @exception SQLException if a database access error occurs 1571 */ 1572 ResultSet getTableTypes() throws SQLException; 1573 1574 /** 1575 * Retrieves a description of table columns available in 1576 * the specified catalog. 1577 * 1578 * <P>Only column descriptions matching the catalog, schema, table 1579 * and column name criteria are returned. They are ordered by 1580 * <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>, 1581 * <code>TABLE_NAME</code>, and <code>ORDINAL_POSITION</code>. 1582 * 1583 * <P>Each column description has the following columns: 1584 * <OL> 1585 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 1586 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 1587 * <LI><B>TABLE_NAME</B> String {@code =>} table name 1588 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 1589 * <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types 1590 * <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name, 1591 * for a UDT the type name is fully qualified 1592 * <LI><B>COLUMN_SIZE</B> int {@code =>} column size. 1593 * <LI><B>BUFFER_LENGTH</B> is not used. 1594 * <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where 1595 * DECIMAL_DIGITS is not applicable. 1596 * <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2) 1597 * <LI><B>NULLABLE</B> int {@code =>} is NULL allowed. 1598 * <UL> 1599 * <LI> columnNoNulls - might not allow <code>NULL</code> values 1600 * <LI> columnNullable - definitely allows <code>NULL</code> values 1601 * <LI> columnNullableUnknown - nullability unknown 1602 * </UL> 1603 * <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>) 1604 * <LI><B>COLUMN_DEF</B> String {@code =>} default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>) 1605 * <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused 1606 * <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused 1607 * <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the 1608 * maximum number of bytes in the column 1609 * <LI><B>ORDINAL_POSITION</B> int {@code =>} index of column in table 1610 * (starting at 1) 1611 * <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column. 1612 * <UL> 1613 * <LI> YES --- if the column can include NULLs 1614 * <LI> NO --- if the column cannot include NULLs 1615 * <LI> empty string --- if the nullability for the 1616 * column is unknown 1617 * </UL> 1618 * <LI><B>SCOPE_CATALOG</B> String {@code =>} catalog of table that is the scope 1619 * of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 1620 * <LI><B>SCOPE_SCHEMA</B> String {@code =>} schema of table that is the scope 1621 * of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 1622 * <LI><B>SCOPE_TABLE</B> String {@code =>} table name that this the scope 1623 * of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 1624 * <LI><B>SOURCE_DATA_TYPE</B> short {@code =>} source type of a distinct type or user-generated 1625 * Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE 1626 * isn't DISTINCT or user-generated REF) 1627 * <LI><B>IS_AUTOINCREMENT</B> String {@code =>} Indicates whether this column is auto incremented 1628 * <UL> 1629 * <LI> YES --- if the column is auto incremented 1630 * <LI> NO --- if the column is not auto incremented 1631 * <LI> empty string --- if it cannot be determined whether the column is auto incremented 1632 * </UL> 1633 * <LI><B>IS_GENERATEDCOLUMN</B> String {@code =>} Indicates whether this is a generated column 1634 * <UL> 1635 * <LI> YES --- if this a generated column 1636 * <LI> NO --- if this not a generated column 1637 * <LI> empty string --- if it cannot be determined whether this is a generated column 1638 * </UL> 1639 * </OL> 1640 * 1641 * <p>The COLUMN_SIZE column specifies the column size for the given column. 1642 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1643 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1644 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1645 * this is the length in bytes. Null is returned for data types where the 1646 * column size is not applicable. 1647 * 1648 * @param catalog a catalog name; must match the catalog name as it 1649 * is stored in the database; "" retrieves those without a catalog; 1650 * <code>null</code> means that the catalog name should not be used to narrow 1651 * the search 1652 * @param schemaPattern a schema name pattern; must match the schema name 1653 * as it is stored in the database; "" retrieves those without a schema; 1686 int columnNullable = 1; 1687 1688 /** 1689 * Indicates that the nullability of columns is unknown. 1690 * <P> 1691 * A possible value for the column 1692 * <code>NULLABLE</code> 1693 * in the <code>ResultSet</code> returned by the method 1694 * <code>getColumns</code>. 1695 */ 1696 int columnNullableUnknown = 2; 1697 1698 /** 1699 * Retrieves a description of the access rights for a table's columns. 1700 * 1701 * <P>Only privileges matching the column name criteria are 1702 * returned. They are ordered by COLUMN_NAME and PRIVILEGE. 1703 * 1704 * <P>Each privilige description has the following columns: 1705 * <OL> 1706 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 1707 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 1708 * <LI><B>TABLE_NAME</B> String {@code =>} table name 1709 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 1710 * <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>) 1711 * <LI><B>GRANTEE</B> String {@code =>} grantee of access 1712 * <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT, 1713 * INSERT, UPDATE, REFRENCES, ...) 1714 * <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted 1715 * to grant to others; "NO" if not; <code>null</code> if unknown 1716 * </OL> 1717 * 1718 * @param catalog a catalog name; must match the catalog name as it 1719 * is stored in the database; "" retrieves those without a catalog; 1720 * <code>null</code> means that the catalog name should not be used to narrow 1721 * the search 1722 * @param schema a schema name; must match the schema name as it is 1723 * stored in the database; "" retrieves those without a schema; 1724 * <code>null</code> means that the schema name should not be used to narrow 1725 * the search 1726 * @param table a table name; must match the table name as it is 1727 * stored in the database 1728 * @param columnNamePattern a column name pattern; must match the column 1729 * name as it is stored in the database 1730 * @return <code>ResultSet</code> - each row is a column privilege description 1731 * @exception SQLException if a database access error occurs 1732 * @see #getSearchStringEscape 1733 */ 1734 ResultSet getColumnPrivileges(String catalog, String schema, 1735 String table, String columnNamePattern) throws SQLException; 1736 1737 /** 1738 * Retrieves a description of the access rights for each table available 1739 * in a catalog. Note that a table privilege applies to one or 1740 * more columns in the table. It would be wrong to assume that 1741 * this privilege applies to all columns (this may be true for 1742 * some systems but is not true for all.) 1743 * 1744 * <P>Only privileges matching the schema and table name 1745 * criteria are returned. They are ordered by 1746 * <code>TABLE_CAT</code>, 1747 * <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>, 1748 * and <code>PRIVILEGE</code>. 1749 * 1750 * <P>Each privilige description has the following columns: 1751 * <OL> 1752 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 1753 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 1754 * <LI><B>TABLE_NAME</B> String {@code =>} table name 1755 * <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>) 1756 * <LI><B>GRANTEE</B> String {@code =>} grantee of access 1757 * <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT, 1758 * INSERT, UPDATE, REFRENCES, ...) 1759 * <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted 1760 * to grant to others; "NO" if not; <code>null</code> if unknown 1761 * </OL> 1762 * 1763 * @param catalog a catalog name; must match the catalog name as it 1764 * is stored in the database; "" retrieves those without a catalog; 1765 * <code>null</code> means that the catalog name should not be used to narrow 1766 * the search 1767 * @param schemaPattern a schema name pattern; must match the schema name 1768 * as it is stored in the database; "" retrieves those without a schema; 1769 * <code>null</code> means that the schema name should not be used to narrow 1770 * the search 1771 * @param tableNamePattern a table name pattern; must match the 1772 * table name as it is stored in the database 1773 * @return <code>ResultSet</code> - each row is a table privilege description 1774 * @exception SQLException if a database access error occurs 1775 * @see #getSearchStringEscape 1776 */ 1777 ResultSet getTablePrivileges(String catalog, String schemaPattern, 1778 String tableNamePattern) throws SQLException; 1779 1780 /** 1781 * Retrieves a description of a table's optimal set of columns that 1782 * uniquely identifies a row. They are ordered by SCOPE. 1783 * 1784 * <P>Each column description has the following columns: 1785 * <OL> 1786 * <LI><B>SCOPE</B> short {@code =>} actual scope of result 1787 * <UL> 1788 * <LI> bestRowTemporary - very temporary, while using row 1789 * <LI> bestRowTransaction - valid for remainder of current transaction 1790 * <LI> bestRowSession - valid for remainder of current session 1791 * </UL> 1792 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 1793 * <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from java.sql.Types 1794 * <LI><B>TYPE_NAME</B> String {@code =>} Data source dependent type name, 1795 * for a UDT the type name is fully qualified 1796 * <LI><B>COLUMN_SIZE</B> int {@code =>} precision 1797 * <LI><B>BUFFER_LENGTH</B> int {@code =>} not used 1798 * <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where 1799 * DECIMAL_DIGITS is not applicable. 1800 * <LI><B>PSEUDO_COLUMN</B> short {@code =>} is this a pseudo column 1801 * like an Oracle ROWID 1802 * <UL> 1803 * <LI> bestRowUnknown - may or may not be pseudo column 1804 * <LI> bestRowNotPseudo - is NOT a pseudo column 1805 * <LI> bestRowPseudo - is a pseudo column 1806 * </UL> 1807 * </OL> 1808 * 1809 * <p>The COLUMN_SIZE column represents the specified column size for the given column. 1810 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1811 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1812 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1813 * this is the length in bytes. Null is returned for data types where the 1814 * column size is not applicable. 1815 * 1816 * @param catalog a catalog name; must match the catalog name as it 1817 * is stored in the database; "" retrieves those without a catalog; 1818 * <code>null</code> means that the catalog name should not be used to narrow 1819 * the search 1820 * @param schema a schema name; must match the schema name 1885 */ 1886 int bestRowNotPseudo = 1; 1887 1888 /** 1889 * Indicates that the best row identifier is a pseudo column. 1890 * <P> 1891 * A possible value for the column 1892 * <code>PSEUDO_COLUMN</code> 1893 * in the <code>ResultSet</code> object 1894 * returned by the method <code>getBestRowIdentifier</code>. 1895 */ 1896 int bestRowPseudo = 2; 1897 1898 /** 1899 * Retrieves a description of a table's columns that are automatically 1900 * updated when any value in a row is updated. They are 1901 * unordered. 1902 * 1903 * <P>Each column description has the following columns: 1904 * <OL> 1905 * <LI><B>SCOPE</B> short {@code =>} is not used 1906 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 1907 * <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from <code>java.sql.Types</code> 1908 * <LI><B>TYPE_NAME</B> String {@code =>} Data source-dependent type name 1909 * <LI><B>COLUMN_SIZE</B> int {@code =>} precision 1910 * <LI><B>BUFFER_LENGTH</B> int {@code =>} length of column value in bytes 1911 * <LI><B>DECIMAL_DIGITS</B> short {@code =>} scale - Null is returned for data types where 1912 * DECIMAL_DIGITS is not applicable. 1913 * <LI><B>PSEUDO_COLUMN</B> short {@code =>} whether this is pseudo column 1914 * like an Oracle ROWID 1915 * <UL> 1916 * <LI> versionColumnUnknown - may or may not be pseudo column 1917 * <LI> versionColumnNotPseudo - is NOT a pseudo column 1918 * <LI> versionColumnPseudo - is a pseudo column 1919 * </UL> 1920 * </OL> 1921 * 1922 * <p>The COLUMN_SIZE column represents the specified column size for the given column. 1923 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 1924 * For datetime datatypes, this is the length in characters of the String representation (assuming the 1925 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 1926 * this is the length in bytes. Null is returned for data types where the 1927 * column size is not applicable. 1928 * @param catalog a catalog name; must match the catalog name as it 1929 * is stored in the database; "" retrieves those without a catalog; 1930 * <code>null</code> means that the catalog name should not be used to narrow 1931 * the search 1932 * @param schema a schema name; must match the schema name 1933 * as it is stored in the database; "" retrieves those without a schema; 1961 * returned by the method <code>getVersionColumns</code>. 1962 */ 1963 int versionColumnNotPseudo = 1; 1964 1965 /** 1966 * Indicates that this version column is a pseudo column. 1967 * <P> 1968 * A possible value for the column 1969 * <code>PSEUDO_COLUMN</code> 1970 * in the <code>ResultSet</code> object 1971 * returned by the method <code>getVersionColumns</code>. 1972 */ 1973 int versionColumnPseudo = 2; 1974 1975 /** 1976 * Retrieves a description of the given table's primary key columns. They 1977 * are ordered by COLUMN_NAME. 1978 * 1979 * <P>Each primary key column description has the following columns: 1980 * <OL> 1981 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 1982 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 1983 * <LI><B>TABLE_NAME</B> String {@code =>} table name 1984 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 1985 * <LI><B>KEY_SEQ</B> short {@code =>} sequence number within primary key( a value 1986 * of 1 represents the first column of the primary key, a value of 2 would 1987 * represent the second column within the primary key). 1988 * <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>) 1989 * </OL> 1990 * 1991 * @param catalog a catalog name; must match the catalog name as it 1992 * is stored in the database; "" retrieves those without a catalog; 1993 * <code>null</code> means that the catalog name should not be used to narrow 1994 * the search 1995 * @param schema a schema name; must match the schema name 1996 * as it is stored in the database; "" retrieves those without a schema; 1997 * <code>null</code> means that the schema name should not be used to narrow 1998 * the search 1999 * @param table a table name; must match the table name as it is stored 2000 * in the database 2001 * @return <code>ResultSet</code> - each row is a primary key column description 2002 * @exception SQLException if a database access error occurs 2003 */ 2004 ResultSet getPrimaryKeys(String catalog, String schema, 2005 String table) throws SQLException; 2006 2007 /** 2008 * Retrieves a description of the primary key columns that are 2009 * referenced by the given table's foreign key columns (the primary keys 2010 * imported by a table). They are ordered by PKTABLE_CAT, 2011 * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ. 2012 * 2013 * <P>Each primary key column description has the following columns: 2014 * <OL> 2015 * <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog 2016 * being imported (may be <code>null</code>) 2017 * <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema 2018 * being imported (may be <code>null</code>) 2019 * <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name 2020 * being imported 2021 * <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name 2022 * being imported 2023 * <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>) 2024 * <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>) 2025 * <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name 2026 * <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name 2027 * <LI><B>KEY_SEQ</B> short {@code =>} sequence number within a foreign key( a value 2028 * of 1 represents the first column of the foreign key, a value of 2 would 2029 * represent the second column within the foreign key). 2030 * <LI><B>UPDATE_RULE</B> short {@code =>} What happens to a 2031 * foreign key when the primary key is updated: 2032 * <UL> 2033 * <LI> importedNoAction - do not allow update of primary 2034 * key if it has been imported 2035 * <LI> importedKeyCascade - change imported key to agree 2036 * with primary key update 2037 * <LI> importedKeySetNull - change imported key to <code>NULL</code> 2038 * if its primary key has been updated 2039 * <LI> importedKeySetDefault - change imported key to default values 2040 * if its primary key has been updated 2041 * <LI> importedKeyRestrict - same as importedKeyNoAction 2042 * (for ODBC 2.x compatibility) 2043 * </UL> 2044 * <LI><B>DELETE_RULE</B> short {@code =>} What happens to 2045 * the foreign key when primary is deleted. 2046 * <UL> 2047 * <LI> importedKeyNoAction - do not allow delete of primary 2048 * key if it has been imported 2049 * <LI> importedKeyCascade - delete rows that import a deleted key 2050 * <LI> importedKeySetNull - change imported key to NULL if 2051 * its primary key has been deleted 2052 * <LI> importedKeyRestrict - same as importedKeyNoAction 2053 * (for ODBC 2.x compatibility) 2054 * <LI> importedKeySetDefault - change imported key to default if 2055 * its primary key has been deleted 2056 * </UL> 2057 * <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>) 2058 * <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>) 2059 * <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key 2060 * constraints be deferred until commit 2061 * <UL> 2062 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2063 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2064 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2065 * </UL> 2066 * </OL> 2067 * 2068 * @param catalog a catalog name; must match the catalog name as it 2069 * is stored in the database; "" retrieves those without a catalog; 2070 * <code>null</code> means that the catalog name should not be used to narrow 2071 * the search 2072 * @param schema a schema name; must match the schema name 2073 * as it is stored in the database; "" retrieves those without a schema; 2074 * <code>null</code> means that the schema name should not be used to narrow 2075 * the search 2076 * @param table a table name; must match the table name as it is stored 2077 * in the database 2078 * @return <code>ResultSet</code> - each row is a primary key column description 2079 * @exception SQLException if a database access error occurs 2178 int importedKeyInitiallyImmediate = 6; 2179 2180 /** 2181 * Indicates deferrability. See SQL-92 for a definition. 2182 * <P> 2183 * A possible value for the column <code>DEFERRABILITY</code> 2184 * in the <code>ResultSet</code> objects returned by the methods 2185 * <code>getImportedKeys</code>, <code>getExportedKeys</code>, 2186 * and <code>getCrossReference</code>. 2187 */ 2188 int importedKeyNotDeferrable = 7; 2189 2190 /** 2191 * Retrieves a description of the foreign key columns that reference the 2192 * given table's primary key columns (the foreign keys exported by a 2193 * table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, 2194 * FKTABLE_NAME, and KEY_SEQ. 2195 * 2196 * <P>Each foreign key column description has the following columns: 2197 * <OL> 2198 * <LI><B>PKTABLE_CAT</B> String {@code =>} primary key table catalog (may be <code>null</code>) 2199 * <LI><B>PKTABLE_SCHEM</B> String {@code =>} primary key table schema (may be <code>null</code>) 2200 * <LI><B>PKTABLE_NAME</B> String {@code =>} primary key table name 2201 * <LI><B>PKCOLUMN_NAME</B> String {@code =>} primary key column name 2202 * <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>) 2203 * being exported (may be <code>null</code>) 2204 * <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>) 2205 * being exported (may be <code>null</code>) 2206 * <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name 2207 * being exported 2208 * <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name 2209 * being exported 2210 * <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value 2211 * of 1 represents the first column of the foreign key, a value of 2 would 2212 * represent the second column within the foreign key). 2213 * <LI><B>UPDATE_RULE</B> short {@code =>} What happens to 2214 * foreign key when primary is updated: 2215 * <UL> 2216 * <LI> importedNoAction - do not allow update of primary 2217 * key if it has been imported 2218 * <LI> importedKeyCascade - change imported key to agree 2219 * with primary key update 2220 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2221 * its primary key has been updated 2222 * <LI> importedKeySetDefault - change imported key to default values 2223 * if its primary key has been updated 2224 * <LI> importedKeyRestrict - same as importedKeyNoAction 2225 * (for ODBC 2.x compatibility) 2226 * </UL> 2227 * <LI><B>DELETE_RULE</B> short {@code =>} What happens to 2228 * the foreign key when primary is deleted. 2229 * <UL> 2230 * <LI> importedKeyNoAction - do not allow delete of primary 2231 * key if it has been imported 2232 * <LI> importedKeyCascade - delete rows that import a deleted key 2233 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2234 * its primary key has been deleted 2235 * <LI> importedKeyRestrict - same as importedKeyNoAction 2236 * (for ODBC 2.x compatibility) 2237 * <LI> importedKeySetDefault - change imported key to default if 2238 * its primary key has been deleted 2239 * </UL> 2240 * <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>) 2241 * <LI><B>PK_NAME</B> String {@code =>} primary key name (may be <code>null</code>) 2242 * <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key 2243 * constraints be deferred until commit 2244 * <UL> 2245 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2246 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2247 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2248 * </UL> 2249 * </OL> 2250 * 2251 * @param catalog a catalog name; must match the catalog name as it 2252 * is stored in this database; "" retrieves those without a catalog; 2253 * <code>null</code> means that the catalog name should not be used to narrow 2254 * the search 2255 * @param schema a schema name; must match the schema name 2256 * as it is stored in the database; "" retrieves those without a schema; 2257 * <code>null</code> means that the schema name should not be used to narrow 2258 * the search 2259 * @param table a table name; must match the table name as it is stored 2260 * in this database 2261 * @return a <code>ResultSet</code> object in which each row is a 2262 * foreign key column description 2263 * @exception SQLException if a database access error occurs 2264 * @see #getImportedKeys 2265 */ 2266 ResultSet getExportedKeys(String catalog, String schema, 2267 String table) throws SQLException; 2268 2269 /** 2270 * Retrieves a description of the foreign key columns in the given foreign key 2271 * table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). 2272 * The number of columns returned from the parent table must match the number of 2273 * columns that make up the foreign key. They 2274 * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and 2275 * KEY_SEQ. 2276 * 2277 * <P>Each foreign key column description has the following columns: 2278 * <OL> 2279 * <LI><B>PKTABLE_CAT</B> String {@code =>} parent key table catalog (may be <code>null</code>) 2280 * <LI><B>PKTABLE_SCHEM</B> String {@code =>} parent key table schema (may be <code>null</code>) 2281 * <LI><B>PKTABLE_NAME</B> String {@code =>} parent key table name 2282 * <LI><B>PKCOLUMN_NAME</B> String {@code =>} parent key column name 2283 * <LI><B>FKTABLE_CAT</B> String {@code =>} foreign key table catalog (may be <code>null</code>) 2284 * being exported (may be <code>null</code>) 2285 * <LI><B>FKTABLE_SCHEM</B> String {@code =>} foreign key table schema (may be <code>null</code>) 2286 * being exported (may be <code>null</code>) 2287 * <LI><B>FKTABLE_NAME</B> String {@code =>} foreign key table name 2288 * being exported 2289 * <LI><B>FKCOLUMN_NAME</B> String {@code =>} foreign key column name 2290 * being exported 2291 * <LI><B>KEY_SEQ</B> short {@code =>} sequence number within foreign key( a value 2292 * of 1 represents the first column of the foreign key, a value of 2 would 2293 * represent the second column within the foreign key). 2294 * <LI><B>UPDATE_RULE</B> short {@code =>} What happens to 2295 * foreign key when parent key is updated: 2296 * <UL> 2297 * <LI> importedNoAction - do not allow update of parent 2298 * key if it has been imported 2299 * <LI> importedKeyCascade - change imported key to agree 2300 * with parent key update 2301 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2302 * its parent key has been updated 2303 * <LI> importedKeySetDefault - change imported key to default values 2304 * if its parent key has been updated 2305 * <LI> importedKeyRestrict - same as importedKeyNoAction 2306 * (for ODBC 2.x compatibility) 2307 * </UL> 2308 * <LI><B>DELETE_RULE</B> short {@code =>} What happens to 2309 * the foreign key when parent key is deleted. 2310 * <UL> 2311 * <LI> importedKeyNoAction - do not allow delete of parent 2312 * key if it has been imported 2313 * <LI> importedKeyCascade - delete rows that import a deleted key 2314 * <LI> importedKeySetNull - change imported key to <code>NULL</code> if 2315 * its primary key has been deleted 2316 * <LI> importedKeyRestrict - same as importedKeyNoAction 2317 * (for ODBC 2.x compatibility) 2318 * <LI> importedKeySetDefault - change imported key to default if 2319 * its parent key has been deleted 2320 * </UL> 2321 * <LI><B>FK_NAME</B> String {@code =>} foreign key name (may be <code>null</code>) 2322 * <LI><B>PK_NAME</B> String {@code =>} parent key name (may be <code>null</code>) 2323 * <LI><B>DEFERRABILITY</B> short {@code =>} can the evaluation of foreign key 2324 * constraints be deferred until commit 2325 * <UL> 2326 * <LI> importedKeyInitiallyDeferred - see SQL92 for definition 2327 * <LI> importedKeyInitiallyImmediate - see SQL92 for definition 2328 * <LI> importedKeyNotDeferrable - see SQL92 for definition 2329 * </UL> 2330 * </OL> 2331 * 2332 * @param parentCatalog a catalog name; must match the catalog name 2333 * as it is stored in the database; "" retrieves those without a 2334 * catalog; <code>null</code> means drop catalog name from the selection criteria 2335 * @param parentSchema a schema name; must match the schema name as 2336 * it is stored in the database; "" retrieves those without a schema; 2337 * <code>null</code> means drop schema name from the selection criteria 2338 * @param parentTable the name of the table that exports the key; must match 2339 * the table name as it is stored in the database 2340 * @param foreignCatalog a catalog name; must match the catalog name as 2341 * it is stored in the database; "" retrieves those without a 2342 * catalog; <code>null</code> means drop catalog name from the selection criteria 2343 * @param foreignSchema a schema name; must match the schema name as it 2354 String foreignCatalog, String foreignSchema, String foreignTable 2355 ) throws SQLException; 2356 2357 /** 2358 * Retrieves a description of all the data types supported by 2359 * this database. They are ordered by DATA_TYPE and then by how 2360 * closely the data type maps to the corresponding JDBC SQL type. 2361 * 2362 * <P>If the database supports SQL distinct types, then getTypeInfo() will return 2363 * a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT. 2364 * If the database supports SQL structured types, then getTypeInfo() will return 2365 * a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT. 2366 * 2367 * <P>If SQL distinct or structured types are supported, then information on the 2368 * individual types may be obtained from the getUDTs() method. 2369 * 2370 2371 * 2372 * <P>Each type description has the following columns: 2373 * <OL> 2374 * <LI><B>TYPE_NAME</B> String {@code =>} Type name 2375 * <LI><B>DATA_TYPE</B> int {@code =>} SQL data type from java.sql.Types 2376 * <LI><B>PRECISION</B> int {@code =>} maximum precision 2377 * <LI><B>LITERAL_PREFIX</B> String {@code =>} prefix used to quote a literal 2378 * (may be <code>null</code>) 2379 * <LI><B>LITERAL_SUFFIX</B> String {@code =>} suffix used to quote a literal 2380 (may be <code>null</code>) 2381 * <LI><B>CREATE_PARAMS</B> String {@code =>} parameters used in creating 2382 * the type (may be <code>null</code>) 2383 * <LI><B>NULLABLE</B> short {@code =>} can you use NULL for this type. 2384 * <UL> 2385 * <LI> typeNoNulls - does not allow NULL values 2386 * <LI> typeNullable - allows NULL values 2387 * <LI> typeNullableUnknown - nullability unknown 2388 * </UL> 2389 * <LI><B>CASE_SENSITIVE</B> boolean{@code =>} is it case sensitive. 2390 * <LI><B>SEARCHABLE</B> short {@code =>} can you use "WHERE" based on this type: 2391 * <UL> 2392 * <LI> typePredNone - No support 2393 * <LI> typePredChar - Only supported with WHERE .. LIKE 2394 * <LI> typePredBasic - Supported except for WHERE .. LIKE 2395 * <LI> typeSearchable - Supported for all WHERE .. 2396 * </UL> 2397 * <LI><B>UNSIGNED_ATTRIBUTE</B> boolean {@code =>} is it unsigned. 2398 * <LI><B>FIXED_PREC_SCALE</B> boolean {@code =>} can it be a money value. 2399 * <LI><B>AUTO_INCREMENT</B> boolean {@code =>} can it be used for an 2400 * auto-increment value. 2401 * <LI><B>LOCAL_TYPE_NAME</B> String {@code =>} localized version of type name 2402 * (may be <code>null</code>) 2403 * <LI><B>MINIMUM_SCALE</B> short {@code =>} minimum scale supported 2404 * <LI><B>MAXIMUM_SCALE</B> short {@code =>} maximum scale supported 2405 * <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused 2406 * <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused 2407 * <LI><B>NUM_PREC_RADIX</B> int {@code =>} usually 2 or 10 2408 * </OL> 2409 * 2410 * <p>The PRECISION column represents the maximum column size that the server supports for the given datatype. 2411 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 2412 * For datetime datatypes, this is the length in characters of the String representation (assuming the 2413 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 2414 * this is the length in bytes. Null is returned for data types where the 2415 * column size is not applicable. 2416 * 2417 * @return a <code>ResultSet</code> object in which each row is an SQL 2418 * type description 2419 * @exception SQLException if a database access error occurs 2420 */ 2421 ResultSet getTypeInfo() throws SQLException; 2422 2423 /** 2424 * Indicates that a <code>NULL</code> value is NOT allowed for this 2425 * data type. 2426 * <P> 2427 * A possible value for column <code>NULLABLE</code> in the 2481 * <code>getTypeInfo</code>. 2482 */ 2483 int typePredBasic = 2; 2484 2485 /** 2486 * Indicates that all <code>WHERE</code> search clauses can be 2487 * based on this type. 2488 * <P> 2489 * A possible value for column <code>SEARCHABLE</code> in the 2490 * <code>ResultSet</code> object returned by the method 2491 * <code>getTypeInfo</code>. 2492 */ 2493 int typeSearchable = 3; 2494 2495 /** 2496 * Retrieves a description of the given table's indices and statistics. They are 2497 * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. 2498 * 2499 * <P>Each index column description has the following columns: 2500 * <OL> 2501 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 2502 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 2503 * <LI><B>TABLE_NAME</B> String {@code =>} table name 2504 * <LI><B>NON_UNIQUE</B> boolean {@code =>} Can index values be non-unique. 2505 * false when TYPE is tableIndexStatistic 2506 * <LI><B>INDEX_QUALIFIER</B> String {@code =>} index catalog (may be <code>null</code>); 2507 * <code>null</code> when TYPE is tableIndexStatistic 2508 * <LI><B>INDEX_NAME</B> String {@code =>} index name; <code>null</code> when TYPE is 2509 * tableIndexStatistic 2510 * <LI><B>TYPE</B> short {@code =>} index type: 2511 * <UL> 2512 * <LI> tableIndexStatistic - this identifies table statistics that are 2513 * returned in conjuction with a table's index descriptions 2514 * <LI> tableIndexClustered - this is a clustered index 2515 * <LI> tableIndexHashed - this is a hashed index 2516 * <LI> tableIndexOther - this is some other style of index 2517 * </UL> 2518 * <LI><B>ORDINAL_POSITION</B> short {@code =>} column sequence number 2519 * within index; zero when TYPE is tableIndexStatistic 2520 * <LI><B>COLUMN_NAME</B> String {@code =>} column name; <code>null</code> when TYPE is 2521 * tableIndexStatistic 2522 * <LI><B>ASC_OR_DESC</B> String {@code =>} column sort sequence, "A" {@code =>} ascending, 2523 * "D" {@code =>} descending, may be <code>null</code> if sort sequence is not supported; 2524 * <code>null</code> when TYPE is tableIndexStatistic 2525 * <LI><B>CARDINALITY</B> long {@code =>} When TYPE is tableIndexStatistic, then 2526 * this is the number of rows in the table; otherwise, it is the 2527 * number of unique values in the index. 2528 * <LI><B>PAGES</B> long {@code =>} When TYPE is tableIndexStatisic then 2529 * this is the number of pages used for the table, otherwise it 2530 * is the number of pages used for the current index. 2531 * <LI><B>FILTER_CONDITION</B> String {@code =>} Filter condition, if any. 2532 * (may be <code>null</code>) 2533 * </OL> 2534 * 2535 * @param catalog a catalog name; must match the catalog name as it 2536 * is stored in this database; "" retrieves those without a catalog; 2537 * <code>null</code> means that the catalog name should not be used to narrow 2538 * the search 2539 * @param schema a schema name; must match the schema name 2540 * as it is stored in this database; "" retrieves those without a schema; 2541 * <code>null</code> means that the schema name should not be used to narrow 2542 * the search 2543 * @param table a table name; must match the table name as it is stored 2544 * in this database 2545 * @param unique when true, return only indices for unique values; 2546 * when false, return indices regardless of whether unique or not 2547 * @param approximate when true, result is allowed to reflect approximate 2548 * or out of data values; when false, results are requested to be 2549 * accurate 2550 * @return <code>ResultSet</code> - each row is an index column description 2551 * @exception SQLException if a database access error occurs 2764 * @exception SQLException if a database access error occurs 2765 * @since 1.2 2766 */ 2767 boolean supportsBatchUpdates() throws SQLException; 2768 2769 /** 2770 * Retrieves a description of the user-defined types (UDTs) defined 2771 * in a particular schema. Schema-specific UDTs may have type 2772 * <code>JAVA_OBJECT</code>, <code>STRUCT</code>, 2773 * or <code>DISTINCT</code>. 2774 * 2775 * <P>Only types matching the catalog, schema, type name and type 2776 * criteria are returned. They are ordered by <code>DATA_TYPE</code>, 2777 * <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code> and 2778 * <code>TYPE_NAME</code>. The type name parameter may be a fully-qualified 2779 * name. In this case, the catalog and schemaPattern parameters are 2780 * ignored. 2781 * 2782 * <P>Each type description has the following columns: 2783 * <OL> 2784 * <LI><B>TYPE_CAT</B> String {@code =>} the type's catalog (may be <code>null</code>) 2785 * <LI><B>TYPE_SCHEM</B> String {@code =>} type's schema (may be <code>null</code>) 2786 * <LI><B>TYPE_NAME</B> String {@code =>} type name 2787 * <LI><B>CLASS_NAME</B> String {@code =>} Java class name 2788 * <LI><B>DATA_TYPE</B> int {@code =>} type value defined in java.sql.Types. 2789 * One of JAVA_OBJECT, STRUCT, or DISTINCT 2790 * <LI><B>REMARKS</B> String {@code =>} explanatory comment on the type 2791 * <LI><B>BASE_TYPE</B> short {@code =>} type code of the source type of a 2792 * DISTINCT type or the type that implements the user-generated 2793 * reference type of the SELF_REFERENCING_COLUMN of a structured 2794 * type as defined in java.sql.Types (<code>null</code> if DATA_TYPE is not 2795 * DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED) 2796 * </OL> 2797 * 2798 * <P><B>Note:</B> If the driver does not support UDTs, an empty 2799 * result set is returned. 2800 * 2801 * @param catalog a catalog name; must match the catalog name as it 2802 * is stored in the database; "" retrieves those without a catalog; 2803 * <code>null</code> means that the catalog name should not be used to narrow 2804 * the search 2805 * @param schemaPattern a schema pattern name; must match the schema name 2806 * as it is stored in the database; "" retrieves those without a schema; 2807 * <code>null</code> means that the schema name should not be used to narrow 2808 * the search 2809 * @param typeNamePattern a type name pattern; must match the type name 2810 * as it is stored in the database; may be a fully qualified name 2811 * @param types a list of user-defined types (JAVA_OBJECT, 2877 * @since 1.4 2878 */ 2879 boolean supportsGetGeneratedKeys() throws SQLException; 2880 2881 /** 2882 * Retrieves a description of the user-defined type (UDT) hierarchies defined in a 2883 * particular schema in this database. Only the immediate super type/ 2884 * sub type relationship is modeled. 2885 * <P> 2886 * Only supertype information for UDTs matching the catalog, 2887 * schema, and type name is returned. The type name parameter 2888 * may be a fully-qualified name. When the UDT name supplied is a 2889 * fully-qualified name, the catalog and schemaPattern parameters are 2890 * ignored. 2891 * <P> 2892 * If a UDT does not have a direct super type, it is not listed here. 2893 * A row of the <code>ResultSet</code> object returned by this method 2894 * describes the designated UDT and a direct supertype. A row has the following 2895 * columns: 2896 * <OL> 2897 * <LI><B>TYPE_CAT</B> String {@code =>} the UDT's catalog (may be <code>null</code>) 2898 * <LI><B>TYPE_SCHEM</B> String {@code =>} UDT's schema (may be <code>null</code>) 2899 * <LI><B>TYPE_NAME</B> String {@code =>} type name of the UDT 2900 * <LI><B>SUPERTYPE_CAT</B> String {@code =>} the direct super type's catalog 2901 * (may be <code>null</code>) 2902 * <LI><B>SUPERTYPE_SCHEM</B> String {@code =>} the direct super type's schema 2903 * (may be <code>null</code>) 2904 * <LI><B>SUPERTYPE_NAME</B> String {@code =>} the direct super type's name 2905 * </OL> 2906 * 2907 * <P><B>Note:</B> If the driver does not support type hierarchies, an 2908 * empty result set is returned. 2909 * 2910 * @param catalog a catalog name; "" retrieves those without a catalog; 2911 * <code>null</code> means drop catalog name from the selection criteria 2912 * @param schemaPattern a schema name pattern; "" retrieves those 2913 * without a schema 2914 * @param typeNamePattern a UDT name pattern; may be a fully-qualified 2915 * name 2916 * @return a <code>ResultSet</code> object in which a row gives information 2917 * about the designated UDT 2918 * @throws SQLException if a database access error occurs 2919 * @see #getSearchStringEscape 2920 * @since 1.4 2921 */ 2922 ResultSet getSuperTypes(String catalog, String schemaPattern, 2923 String typeNamePattern) throws SQLException; 2924 2925 /** 2926 * Retrieves a description of the table hierarchies defined in a particular 2927 * schema in this database. 2928 * 2929 * <P>Only supertable information for tables matching the catalog, schema 2930 * and table name are returned. The table name parameter may be a fully- 2931 * qualified name, in which case, the catalog and schemaPattern parameters 2932 * are ignored. If a table does not have a super table, it is not listed here. 2933 * Supertables have to be defined in the same catalog and schema as the 2934 * sub tables. Therefore, the type description does not need to include 2935 * this information for the supertable. 2936 * 2937 * <P>Each type description has the following columns: 2938 * <OL> 2939 * <LI><B>TABLE_CAT</B> String {@code =>} the type's catalog (may be <code>null</code>) 2940 * <LI><B>TABLE_SCHEM</B> String {@code =>} type's schema (may be <code>null</code>) 2941 * <LI><B>TABLE_NAME</B> String {@code =>} type name 2942 * <LI><B>SUPERTABLE_NAME</B> String {@code =>} the direct super type's name 2943 * </OL> 2944 * 2945 * <P><B>Note:</B> If the driver does not support type hierarchies, an 2946 * empty result set is returned. 2947 * 2948 * @param catalog a catalog name; "" retrieves those without a catalog; 2949 * <code>null</code> means drop catalog name from the selection criteria 2950 * @param schemaPattern a schema name pattern; "" retrieves those 2951 * without a schema 2952 * @param tableNamePattern a table name pattern; may be a fully-qualified 2953 * name 2954 * @return a <code>ResultSet</code> object in which each row is a type description 2955 * @throws SQLException if a database access error occurs 2956 * @see #getSearchStringEscape 2957 * @since 1.4 2958 */ 2959 ResultSet getSuperTables(String catalog, String schemaPattern, 2960 String tableNamePattern) throws SQLException; 2961 2962 /** 2984 * A possible value for the column <code>NULLABLE</code> 2985 * in the <code>ResultSet</code> object 2986 * returned by the method <code>getAttributes</code>. 2987 */ 2988 short attributeNullableUnknown = 2; 2989 2990 /** 2991 * Retrieves a description of the given attribute of the given type 2992 * for a user-defined type (UDT) that is available in the given schema 2993 * and catalog. 2994 * <P> 2995 * Descriptions are returned only for attributes of UDTs matching the 2996 * catalog, schema, type, and attribute name criteria. They are ordered by 2997 * <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code>, 2998 * <code>TYPE_NAME</code> and <code>ORDINAL_POSITION</code>. This description 2999 * does not contain inherited attributes. 3000 * <P> 3001 * The <code>ResultSet</code> object that is returned has the following 3002 * columns: 3003 * <OL> 3004 * <LI><B>TYPE_CAT</B> String {@code =>} type catalog (may be <code>null</code>) 3005 * <LI><B>TYPE_SCHEM</B> String {@code =>} type schema (may be <code>null</code>) 3006 * <LI><B>TYPE_NAME</B> String {@code =>} type name 3007 * <LI><B>ATTR_NAME</B> String {@code =>} attribute name 3008 * <LI><B>DATA_TYPE</B> int {@code =>} attribute type SQL type from java.sql.Types 3009 * <LI><B>ATTR_TYPE_NAME</B> String {@code =>} Data source dependent type name. 3010 * For a UDT, the type name is fully qualified. For a REF, the type name is 3011 * fully qualified and represents the target type of the reference type. 3012 * <LI><B>ATTR_SIZE</B> int {@code =>} column size. For char or date 3013 * types this is the maximum number of characters; for numeric or 3014 * decimal types this is precision. 3015 * <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where 3016 * DECIMAL_DIGITS is not applicable. 3017 * <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2) 3018 * <LI><B>NULLABLE</B> int {@code =>} whether NULL is allowed 3019 * <UL> 3020 * <LI> attributeNoNulls - might not allow NULL values 3021 * <LI> attributeNullable - definitely allows NULL values 3022 * <LI> attributeNullableUnknown - nullability unknown 3023 * </UL> 3024 * <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>) 3025 * <LI><B>ATTR_DEF</B> String {@code =>} default value (may be <code>null</code>) 3026 * <LI><B>SQL_DATA_TYPE</B> int {@code =>} unused 3027 * <LI><B>SQL_DATETIME_SUB</B> int {@code =>} unused 3028 * <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the 3029 * maximum number of bytes in the column 3030 * <LI><B>ORDINAL_POSITION</B> int {@code =>} index of the attribute in the UDT 3031 * (starting at 1) 3032 * <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine 3033 * the nullability for a attribute. 3034 * <UL> 3035 * <LI> YES --- if the attribute can include NULLs 3036 * <LI> NO --- if the attribute cannot include NULLs 3037 * <LI> empty string --- if the nullability for the 3038 * attribute is unknown 3039 * </UL> 3040 * <LI><B>SCOPE_CATALOG</B> String {@code =>} catalog of table that is the 3041 * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 3042 * <LI><B>SCOPE_SCHEMA</B> String {@code =>} schema of table that is the 3043 * scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF) 3044 * <LI><B>SCOPE_TABLE</B> String {@code =>} table name that is the scope of a 3045 * reference attribute (<code>null</code> if the DATA_TYPE isn't REF) 3046 * <LI><B>SOURCE_DATA_TYPE</B> short {@code =>} source type of a distinct type or user-generated 3047 * Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE 3048 * isn't DISTINCT or user-generated REF) 3049 * </OL> 3050 * @param catalog a catalog name; must match the catalog name as it 3051 * is stored in the database; "" retrieves those without a catalog; 3052 * <code>null</code> means that the catalog name should not be used to narrow 3053 * the search 3054 * @param schemaPattern a schema name pattern; must match the schema name 3055 * as it is stored in the database; "" retrieves those without a schema; 3056 * <code>null</code> means that the schema name should not be used to narrow 3057 * the search 3058 * @param typeNamePattern a type name pattern; must match the 3059 * type name as it is stored in the database 3060 * @param attributeNamePattern an attribute name pattern; must match the attribute 3061 * name as it is declared in the database 3062 * @return a <code>ResultSet</code> object in which each row is an 3063 * attribute description 3064 * @exception SQLException if a database access error occurs 3065 * @see #getSearchStringEscape 3066 * @since 1.4 3186 * @since 1.4 3187 */ 3188 boolean locatorsUpdateCopy() throws SQLException; 3189 3190 /** 3191 * Retrieves whether this database supports statement pooling. 3192 * 3193 * @return <code>true</code> if so; <code>false</code> otherwise 3194 * @throws SQLException if a database access error occurs 3195 * @since 1.4 3196 */ 3197 boolean supportsStatementPooling() throws SQLException; 3198 3199 //------------------------- JDBC 4.0 ----------------------------------- 3200 3201 /** 3202 * Indicates whether or not this data source supports the SQL <code>ROWID</code> type, 3203 * and if so the lifetime for which a <code>RowId</code> object remains valid. 3204 * <p> 3205 * The returned int values have the following relationship: 3206 * <pre>{@code 3207 * ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION 3208 * < ROWID_VALID_SESSION < ROWID_VALID_FOREVER 3209 * }</pre> 3210 * so conditional logic such as 3211 * <pre>{@code 3212 * if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION) 3213 * }</pre> 3214 * can be used. Valid Forever means valid across all Sessions, and valid for 3215 * a Session means valid across all its contained Transactions. 3216 * 3217 * @return the status indicating the lifetime of a <code>RowId</code> 3218 * @throws SQLException if a database access error occurs 3219 * @since 1.6 3220 */ 3221 RowIdLifetime getRowIdLifetime() throws SQLException; 3222 3223 /** 3224 * Retrieves the schema names available in this database. The results 3225 * are ordered by <code>TABLE_CATALOG</code> and 3226 * <code>TABLE_SCHEM</code>. 3227 * 3228 * <P>The schema columns are: 3229 * <OL> 3230 * <LI><B>TABLE_SCHEM</B> String {@code =>} schema name 3231 * <LI><B>TABLE_CATALOG</B> String {@code =>} catalog name (may be <code>null</code>) 3232 * </OL> 3233 * 3234 * 3235 * @param catalog a catalog name; must match the catalog name as it is stored 3236 * in the database;"" retrieves those without a catalog; null means catalog 3237 * name should not be used to narrow down the search. 3238 * @param schemaPattern a schema name; must match the schema name as it is 3239 * stored in the database; null means 3240 * schema name should not be used to narrow down the search. 3241 * @return a <code>ResultSet</code> object in which each row is a 3242 * schema description 3243 * @exception SQLException if a database access error occurs 3244 * @see #getSearchStringEscape 3245 * @since 1.6 3246 */ 3247 ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException; 3248 3249 /** 3250 * Retrieves whether this database supports invoking user-defined or vendor functions 3251 * using the stored procedure escape syntax. 3256 */ 3257 boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException; 3258 3259 /** 3260 * Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> inidcates 3261 * that all open ResultSets are closed, even ones that are holdable. When a <code>SQLException</code> occurs while 3262 * autocommit is <code>true</code>, it is vendor specific whether the JDBC driver responds with a commit operation, a 3263 * rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference 3264 * is in whether or not holdable ResultSets are closed. 3265 * 3266 * @return <code>true</code> if so; <code>false</code> otherwise 3267 * @exception SQLException if a database access error occurs 3268 * @since 1.6 3269 */ 3270 boolean autoCommitFailureClosesAllResultSets() throws SQLException; 3271 /** 3272 * Retrieves a list of the client info properties 3273 * that the driver supports. The result set contains the following columns 3274 * <p> 3275 * <ol> 3276 * <li><b>NAME</b> String{@code =>} The name of the client info property<br> 3277 * <li><b>MAX_LEN</b> int{@code =>} The maximum length of the value for the property<br> 3278 * <li><b>DEFAULT_VALUE</b> String{@code =>} The default value of the property<br> 3279 * <li><b>DESCRIPTION</b> String{@code =>} A description of the property. This will typically 3280 * contain information as to where this property is 3281 * stored in the database. 3282 * </ol> 3283 * <p> 3284 * The <code>ResultSet</code> is sorted by the NAME column 3285 * <p> 3286 * @return A <code>ResultSet</code> object; each row is a supported client info 3287 * property 3288 * <p> 3289 * @exception SQLException if a database access error occurs 3290 * <p> 3291 * @since 1.6 3292 */ 3293 ResultSet getClientInfoProperties() 3294 throws SQLException; 3295 3296 /** 3297 * Retrieves a description of the system and user functions available 3298 * in the given catalog. 3299 * <P> 3300 * Only system and user function descriptions matching the schema and 3301 * function name criteria are returned. They are ordered by 3302 * <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>, 3303 * <code>FUNCTION_NAME</code> and 3304 * <code>SPECIFIC_ NAME</code>. 3305 * 3306 * <P>Each function description has the the following columns: 3307 * <OL> 3308 * <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be <code>null</code>) 3309 * <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be <code>null</code>) 3310 * <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name 3311 * used to invoke the function 3312 * <LI><B>REMARKS</B> String {@code =>} explanatory comment on the function 3313 * <LI><B>FUNCTION_TYPE</B> short {@code =>} kind of function: 3314 * <UL> 3315 * <LI>functionResultUnknown - Cannot determine if a return value 3316 * or table will be returned 3317 * <LI> functionNoTable- Does not return a table 3318 * <LI> functionReturnsTable - Returns a table 3319 * </UL> 3320 * <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies 3321 * this function within its schema. This is a user specified, or DBMS 3322 * generated, name that may be different then the <code>FUNCTION_NAME</code> 3323 * for example with overload functions 3324 * </OL> 3325 * <p> 3326 * A user may not have permission to execute any of the functions that are 3327 * returned by <code>getFunctions</code> 3328 * 3329 * @param catalog a catalog name; must match the catalog name as it 3330 * is stored in the database; "" retrieves those without a catalog; 3331 * <code>null</code> means that the catalog name should not be used to narrow 3332 * the search 3333 * @param schemaPattern a schema name pattern; must match the schema name 3334 * as it is stored in the database; "" retrieves those without a schema; 3335 * <code>null</code> means that the schema name should not be used to narrow 3336 * the search 3337 * @param functionNamePattern a function name pattern; must match the 3338 * function name as it is stored in the database 3339 * @return <code>ResultSet</code> - each row is a function description 3340 * @exception SQLException if a database access error occurs 3342 * @since 1.6 3343 */ 3344 ResultSet getFunctions(String catalog, String schemaPattern, 3345 String functionNamePattern) throws SQLException; 3346 /** 3347 * Retrieves a description of the given catalog's system or user 3348 * function parameters and return type. 3349 * 3350 * <P>Only descriptions matching the schema, function and 3351 * parameter name criteria are returned. They are ordered by 3352 * <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>, 3353 * <code>FUNCTION_NAME</code> and 3354 * <code>SPECIFIC_ NAME</code>. Within this, the return value, 3355 * if any, is first. Next are the parameter descriptions in call 3356 * order. The column descriptions follow in column number order. 3357 * 3358 * <P>Each row in the <code>ResultSet</code> 3359 * is a parameter description, column description or 3360 * return type description with the following fields: 3361 * <OL> 3362 * <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be <code>null</code>) 3363 * <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be <code>null</code>) 3364 * <LI><B>FUNCTION_NAME</B> String {@code =>} function name. This is the name 3365 * used to invoke the function 3366 * <LI><B>COLUMN_NAME</B> String {@code =>} column/parameter name 3367 * <LI><B>COLUMN_TYPE</B> Short {@code =>} kind of column/parameter: 3368 * <UL> 3369 * <LI> functionColumnUnknown - nobody knows 3370 * <LI> functionColumnIn - IN parameter 3371 * <LI> functionColumnInOut - INOUT parameter 3372 * <LI> functionColumnOut - OUT parameter 3373 * <LI> functionColumnReturn - function return value 3374 * <LI> functionColumnResult - Indicates that the parameter or column 3375 * is a column in the <code>ResultSet</code> 3376 * </UL> 3377 * <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types 3378 * <LI><B>TYPE_NAME</B> String {@code =>} SQL type name, for a UDT type the 3379 * type name is fully qualified 3380 * <LI><B>PRECISION</B> int {@code =>} precision 3381 * <LI><B>LENGTH</B> int {@code =>} length in bytes of data 3382 * <LI><B>SCALE</B> short {@code =>} scale - null is returned for data types where 3383 * SCALE is not applicable. 3384 * <LI><B>RADIX</B> short {@code =>} radix 3385 * <LI><B>NULLABLE</B> short {@code =>} can it contain NULL. 3386 * <UL> 3387 * <LI> functionNoNulls - does not allow NULL values 3388 * <LI> functionNullable - allows NULL values 3389 * <LI> functionNullableUnknown - nullability unknown 3390 * </UL> 3391 * <LI><B>REMARKS</B> String {@code =>} comment describing column/parameter 3392 * <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} the maximum length of binary 3393 * and character based parameters or columns. For any other datatype the returned value 3394 * is a NULL 3395 * <LI><B>ORDINAL_POSITION</B> int {@code =>} the ordinal position, starting 3396 * from 1, for the input and output parameters. A value of 0 3397 * is returned if this row describes the function's return value. 3398 * For result set columns, it is the 3399 * ordinal position of the column in the result set starting from 1. 3400 * <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine 3401 * the nullability for a parameter or column. 3402 * <UL> 3403 * <LI> YES --- if the parameter or column can include NULLs 3404 * <LI> NO --- if the parameter or column cannot include NULLs 3405 * <LI> empty string --- if the nullability for the 3406 * parameter or column is unknown 3407 * </UL> 3408 * <LI><B>SPECIFIC_NAME</B> String {@code =>} the name which uniquely identifies 3409 * this function within its schema. This is a user specified, or DBMS 3410 * generated, name that may be different then the <code>FUNCTION_NAME</code> 3411 * for example with overload functions 3412 * </OL> 3413 * 3414 * <p>The PRECISION column represents the specified column size for the given 3415 * parameter or column. 3416 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 3417 * For datetime datatypes, this is the length in characters of the String representation (assuming the 3418 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 3419 * this is the length in bytes. Null is returned for data types where the 3420 * column size is not applicable. 3421 * @param catalog a catalog name; must match the catalog name as it 3422 * is stored in the database; "" retrieves those without a catalog; 3423 * <code>null</code> means that the catalog name should not be used to narrow 3424 * the search 3425 * @param schemaPattern a schema name pattern; must match the schema name 3426 * as it is stored in the database; "" retrieves those without a schema; 3427 * <code>null</code> means that the schema name should not be used to narrow 3428 * the search 3574 int functionReturnsTable = 2; 3575 3576 //--------------------------JDBC 4.1 ----------------------------- 3577 3578 /** 3579 * Retrieves a description of the pseudo or hidden columns available 3580 * in a given table within the specified catalog and schema. 3581 * Pseudo or hidden columns may not always be stored within 3582 * a table and are not visible in a ResultSet unless they are 3583 * specified in the query's outermost SELECT list. Pseudo or hidden 3584 * columns may not necessarily be able to be modified. If there are 3585 * no pseudo or hidden columns, an empty ResultSet is returned. 3586 * 3587 * <P>Only column descriptions matching the catalog, schema, table 3588 * and column name criteria are returned. They are ordered by 3589 * <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>, <code>TABLE_NAME</code> 3590 * and <code>COLUMN_NAME</code>. 3591 * 3592 * <P>Each column description has the following columns: 3593 * <OL> 3594 * <LI><B>TABLE_CAT</B> String {@code =>} table catalog (may be <code>null</code>) 3595 * <LI><B>TABLE_SCHEM</B> String {@code =>} table schema (may be <code>null</code>) 3596 * <LI><B>TABLE_NAME</B> String {@code =>} table name 3597 * <LI><B>COLUMN_NAME</B> String {@code =>} column name 3598 * <LI><B>DATA_TYPE</B> int {@code =>} SQL type from java.sql.Types 3599 * <LI><B>COLUMN_SIZE</B> int {@code =>} column size. 3600 * <LI><B>DECIMAL_DIGITS</B> int {@code =>} the number of fractional digits. Null is returned for data types where 3601 * DECIMAL_DIGITS is not applicable. 3602 * <LI><B>NUM_PREC_RADIX</B> int {@code =>} Radix (typically either 10 or 2) 3603 * <LI><B>COLUMN_USAGE</B> String {@code =>} The allowed usage for the column. The 3604 * value returned will correspond to the enum name returned by {@link PseudoColumnUsage#name PseudoColumnUsage.name()} 3605 * <LI><B>REMARKS</B> String {@code =>} comment describing column (may be <code>null</code>) 3606 * <LI><B>CHAR_OCTET_LENGTH</B> int {@code =>} for char types the 3607 * maximum number of bytes in the column 3608 * <LI><B>IS_NULLABLE</B> String {@code =>} ISO rules are used to determine the nullability for a column. 3609 * <UL> 3610 * <LI> YES --- if the column can include NULLs 3611 * <LI> NO --- if the column cannot include NULLs 3612 * <LI> empty string --- if the nullability for the column is unknown 3613 * </UL> 3614 * </OL> 3615 * 3616 * <p>The COLUMN_SIZE column specifies the column size for the given column. 3617 * For numeric data, this is the maximum precision. For character data, this is the length in characters. 3618 * For datetime datatypes, this is the length in characters of the String representation (assuming the 3619 * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, 3620 * this is the length in bytes. Null is returned for data types where the 3621 * column size is not applicable. 3622 * 3623 * @param catalog a catalog name; must match the catalog name as it 3624 * is stored in the database; "" retrieves those without a catalog; 3625 * <code>null</code> means that the catalog name should not be used to narrow 3626 * the search 3627 * @param schemaPattern a schema name pattern; must match the schema name 3628 * as it is stored in the database; "" retrieves those without a schema; |