home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / sql / DatabaseMetaData.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  92.6 KB  |  2,459 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)DatabaseMetaData.java    1.20 98/09/29
  3.  * 
  4.  * Copyright 1996-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15.  
  16. package java.sql;
  17.  
  18. /**
  19.  * Comprehensive information about the database as a whole.
  20.  *
  21.  * <P>Many of the methods here return lists of information in 
  22.  * the form of <code>ResultSet</code> objects.
  23.  * You can use the normal ResultSet methods such as getString and getInt 
  24.  * to retrieve the data from these ResultSets.  If a given form of
  25.  * metadata is not available, these methods should throw an SQLException.
  26.  *
  27.  * <P>Some of these methods take arguments that are String patterns.  These
  28.  * arguments all have names such as fooPattern.  Within a pattern String, "%"
  29.  * means match any substring of 0 or more characters, and "_" means match
  30.  * any one character. Only metadata entries matching the search pattern 
  31.  * are returned. If a search pattern argument is set to a null ref, 
  32.  * that argument's criteria will be dropped from the search.
  33.  * 
  34.  * <P>An <code>SQLException</code> will be thrown if a driver does not support a meta
  35.  * data method.  In the case of methods that return a ResultSet,
  36.  * either a ResultSet (which may be empty) is returned or a
  37.  * SQLException is thrown.
  38.  */
  39. public interface DatabaseMetaData {
  40.  
  41.     //----------------------------------------------------------------------
  42.     // First, a variety of minor information about the target database.
  43.  
  44.     /**
  45.      * Can all the procedures returned by getProcedures be called by the
  46.      * current user?
  47.      *
  48.      * @return <code>true</code> if so; <code>false</code> otherwise
  49.      * @exception SQLException if a database access error occurs
  50.      */
  51.     boolean allProceduresAreCallable() throws SQLException;
  52.  
  53.     /**
  54.      * Can all the tables returned by getTable be SELECTed by the
  55.      * current user?
  56.      *
  57.      * @return <code>true</code> if so; <code>false</code> otherwise 
  58.      * @exception SQLException if a database access error occurs
  59.      */
  60.     boolean allTablesAreSelectable() throws SQLException;
  61.  
  62.     /**
  63.      * What's the url for this database?
  64.      *
  65.      * @return the url or null if it cannot be generated
  66.      * @exception SQLException if a database access error occurs
  67.      */
  68.     String getURL() throws SQLException;
  69.  
  70.     /**
  71.      * What's our user name as known to the database?
  72.      *
  73.      * @return our database user name
  74.      * @exception SQLException if a database access error occurs
  75.      */
  76.     String getUserName() throws SQLException;
  77.  
  78.     /**
  79.      * Is the database in read-only mode?
  80.      *
  81.      * @return <code>true</code> if so; <code>false</code> otherwise
  82.      * @exception SQLException if a database access error occurs
  83.      */
  84.     boolean isReadOnly() throws SQLException;
  85.  
  86.     /**
  87.      * Are NULL values sorted high?
  88.      *
  89.      * @return <code>true</code> if so; <code>false</code> otherwise
  90.      * @exception SQLException if a database access error occurs
  91.      */
  92.     boolean nullsAreSortedHigh() throws SQLException;
  93.  
  94.     /**
  95.      * Are NULL values sorted low?
  96.      *
  97.      * @return <code>true</code> if so; <code>false</code> otherwise
  98.      * @exception SQLException if a database access error occurs
  99.      */
  100.     boolean nullsAreSortedLow() throws SQLException;
  101.  
  102.     /**
  103.      * Are NULL values sorted at the start regardless of sort order?
  104.      *
  105.      * @return <code>true</code> if so; <code>false</code> otherwise 
  106.      * @exception SQLException if a database access error occurs
  107.      */
  108.     boolean nullsAreSortedAtStart() throws SQLException;
  109.  
  110.     /**
  111.      * Are NULL values sorted at the end regardless of sort order?
  112.      *
  113.      * @return <code>true</code> if so; <code>false</code> otherwise
  114.      * @exception SQLException if a database access error occurs
  115.      */
  116.     boolean nullsAreSortedAtEnd() throws SQLException;
  117.  
  118.     /**
  119.      * What's the name of this database product?
  120.      *
  121.      * @return database product name
  122.      * @exception SQLException if a database access error occurs
  123.      */
  124.     String getDatabaseProductName() throws SQLException;
  125.  
  126.     /**
  127.      * What's the version of this database product?
  128.      *
  129.      * @return database version
  130.      * @exception SQLException if a database access error occurs
  131.      */
  132.     String getDatabaseProductVersion() throws SQLException;
  133.  
  134.     /**
  135.      * What's the name of this JDBC driver?
  136.      *
  137.      * @return JDBC driver name
  138.      * @exception SQLException if a database access error occurs
  139.      */
  140.     String getDriverName() throws SQLException;
  141.  
  142.     /**
  143.      * What's the version of this JDBC driver?
  144.      *
  145.      * @return JDBC driver version
  146.      * @exception SQLException if a database access error occurs
  147.      */
  148.     String getDriverVersion() throws SQLException;
  149.  
  150.     /**
  151.      * What's this JDBC driver's major version number?
  152.      *
  153.      * @return JDBC driver major version
  154.      */
  155.     int getDriverMajorVersion();
  156.  
  157.     /**
  158.      * What's this JDBC driver's minor version number?
  159.      *
  160.      * @return JDBC driver minor version number
  161.      */
  162.     int getDriverMinorVersion();
  163.  
  164.     /**
  165.      * Does the database store tables in a local file?
  166.      *
  167.      * @return <code>true</code> if so; <code>false</code> otherwise
  168.      * @exception SQLException if a database access error occurs
  169.      */
  170.     boolean usesLocalFiles() throws SQLException;
  171.  
  172.     /**
  173.      * Does the database use a file for each table?
  174.      *
  175.      * @return true if the database uses a local file for each table
  176.      * @exception SQLException if a database access error occurs
  177.      */
  178.     boolean usesLocalFilePerTable() throws SQLException;
  179.  
  180.     /**
  181.      * Does the database treat mixed case unquoted SQL identifiers as
  182.      * case sensitive and as a result store them in mixed case?
  183.      *
  184.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver will always return false.
  185.      *
  186.      * @return <code>true</code> if so; <code>false</code> otherwise 
  187.      * @exception SQLException if a database access error occurs
  188.      */
  189.     boolean supportsMixedCaseIdentifiers() throws SQLException;
  190.  
  191.     /**
  192.      * Does the database treat mixed case unquoted SQL identifiers as
  193.      * case insensitive and store them in upper case?
  194.      *
  195.      * @return <code>true</code> if so; <code>false</code> otherwise 
  196.      * @exception SQLException if a database access error occurs
  197.      */
  198.     boolean storesUpperCaseIdentifiers() throws SQLException;
  199.  
  200.     /**
  201.      * Does the database treat mixed case unquoted SQL identifiers as
  202.      * case insensitive and store them in lower case?
  203.      *
  204.      * @return <code>true</code> if so; <code>false</code> otherwise 
  205.      * @exception SQLException if a database access error occurs
  206.      */
  207.     boolean storesLowerCaseIdentifiers() throws SQLException;
  208.  
  209.     /**
  210.      * Does the database treat mixed case unquoted SQL identifiers as
  211.      * case insensitive and store them in mixed case?
  212.      *
  213.      * @return <code>true</code> if so; <code>false</code> otherwise 
  214.      * @exception SQLException if a database access error occurs
  215.      */
  216.     boolean storesMixedCaseIdentifiers() throws SQLException;
  217.  
  218.     /**
  219.      * Does the database treat mixed case quoted SQL identifiers as
  220.      * case sensitive and as a result store them in mixed case?
  221.      *
  222.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver will always return true.
  223.      *
  224.      * @return <code>true</code> if so; <code>false</code> otherwise
  225.      * @exception SQLException if a database access error occurs
  226.      */
  227.     boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
  228.  
  229.     /**
  230.      * Does the database treat mixed case quoted SQL identifiers as
  231.      * case insensitive and store them in upper case?
  232.      *
  233.      * @return <code>true</code> if so; <code>false</code> otherwise 
  234.      * @exception SQLException if a database access error occurs
  235.      */
  236.     boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
  237.  
  238.     /**
  239.      * Does the database treat mixed case quoted SQL identifiers as
  240.      * case insensitive and store them in lower case?
  241.      *
  242.      * @return <code>true</code> if so; <code>false</code> otherwise 
  243.      * @exception SQLException if a database access error occurs
  244.      */
  245.     boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
  246.  
  247.     /**
  248.      * Does the database treat mixed case quoted SQL identifiers as
  249.      * case insensitive and store them in mixed case?
  250.      *
  251.      * @return <code>true</code> if so; <code>false</code> otherwise 
  252.      * @exception SQLException if a database access error occurs
  253.      */
  254.     boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
  255.  
  256.     /**
  257.      * What's the string used to quote SQL identifiers?
  258.      * This returns a space " " if identifier quoting isn't supported.
  259.      *
  260.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> 
  261.      * driver always uses a double quote character.
  262.      *
  263.      * @return the quoting string
  264.      * @exception SQLException if a database access error occurs
  265.      */
  266.     String getIdentifierQuoteString() throws SQLException;
  267.  
  268.     /**
  269.      * Gets a comma-separated list of all a database's SQL keywords
  270.      * that are NOT also SQL92 keywords.
  271.      *
  272.      * @return the list 
  273.      * @exception SQLException if a database access error occurs
  274.      */
  275.     String getSQLKeywords() throws SQLException;
  276.  
  277.     /**
  278.      * Gets a comma-separated list of math functions.  These are the 
  279.      * X/Open CLI math function names used in the JDBC function escape 
  280.      * clause.
  281.      *
  282.      * @return the list
  283.      * @exception SQLException if a database access error occurs
  284.      */
  285.     String getNumericFunctions() throws SQLException;
  286.  
  287.     /**
  288.      * Gets a comma-separated list of string functions.  These are the 
  289.      * X/Open CLI string function names used in the JDBC function escape 
  290.      * clause.
  291.      *
  292.      * @return the list
  293.      * @exception SQLException if a database access error occurs
  294.      */
  295.     String getStringFunctions() throws SQLException;
  296.  
  297.     /**
  298.      * Gets a comma-separated list of system functions.  These are the 
  299.      * X/Open CLI system function names used in the JDBC function escape 
  300.      * clause.
  301.      *
  302.      * @return the list
  303.      * @exception SQLException if a database access error occurs
  304.      */
  305.     String getSystemFunctions() throws SQLException;
  306.  
  307.     /**
  308.      * Gets a comma-separated list of time and date functions.
  309.      *
  310.      * @return the list
  311.      * @exception SQLException if a database access error occurs
  312.      */
  313.     String getTimeDateFunctions() throws SQLException;
  314.  
  315.     /**
  316.      * Gets the string that can be used to escape wildcard characters.
  317.      * This is the string that can be used to escape '_' or '%' in
  318.      * the string pattern style catalog search parameters.
  319.      *
  320.      * <P>The '_' character represents any single character.
  321.      * <P>The '%' character represents any sequence of zero or 
  322.      * more characters.
  323.      *
  324.      * @return the string used to escape wildcard characters
  325.      * @exception SQLException if a database access error occurs
  326.      */
  327.     String getSearchStringEscape() throws SQLException;
  328.  
  329.     /**
  330.      * Gets all the "extra" characters that can be used in unquoted
  331.      * identifier names (those beyond a-z, A-Z, 0-9 and _).
  332.      *
  333.      * @return the string containing the extra characters 
  334.      * @exception SQLException if a database access error occurs
  335.      */
  336.     String getExtraNameCharacters() throws SQLException;
  337.  
  338.     //--------------------------------------------------------------------
  339.     // Functions describing which features are supported.
  340.  
  341.     /**
  342.      * Is "ALTER TABLE" with add column supported?
  343.      *
  344.      * @return <code>true</code> if so; <code>false</code> otherwise
  345.      * @exception SQLException if a database access error occurs
  346.      */
  347.     boolean supportsAlterTableWithAddColumn() throws SQLException;
  348.  
  349.     /**
  350.      * Is "ALTER TABLE" with drop column supported?
  351.      *
  352.      * @return <code>true</code> if so; <code>false</code> otherwise
  353.      * @exception SQLException if a database access error occurs
  354.      */
  355.     boolean supportsAlterTableWithDropColumn() throws SQLException;
  356.  
  357.     /**
  358.      * Is column aliasing supported? 
  359.      *
  360.      * <P>If so, the SQL AS clause can be used to provide names for
  361.      * computed columns or to provide alias names for columns as
  362.      * required.
  363.      *
  364.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  365.      *
  366.      * @return <code>true</code> if so; <code>false</code> otherwise 
  367.      * @exception SQLException if a database access error occurs
  368.      */
  369.     boolean supportsColumnAliasing() throws SQLException;
  370.  
  371.     /**
  372.      * Are concatenations between NULL and non-NULL values NULL?
  373.      *
  374.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  375.      *
  376.      * @return <code>true</code> if so; <code>false</code> otherwise
  377.      * @exception SQLException if a database access error occurs
  378.      */
  379.     boolean nullPlusNonNullIsNull() throws SQLException;
  380.  
  381.     /**
  382.      * Is the CONVERT function between SQL types supported?
  383.      *
  384.      * @return <code>true</code> if so; <code>false</code> otherwise
  385.      * @exception SQLException if a database access error occurs
  386.      */
  387.     boolean supportsConvert() throws SQLException;
  388.  
  389.     /**
  390.      * Is CONVERT between the given SQL types supported?
  391.      *
  392.      * @param fromType the type to convert from
  393.      * @param toType the type to convert to     
  394.      * @return <code>true</code> if so; <code>false</code> otherwise
  395.      * @exception SQLException if a database access error occurs
  396.      * @see Types
  397.      */
  398.     boolean supportsConvert(int fromType, int toType) throws SQLException;
  399.  
  400.     /**
  401.      * Are table correlation names supported?
  402.      *
  403.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  404.      *
  405.      * @return <code>true</code> if so; <code>false</code> otherwise
  406.      * @exception SQLException if a database access error occurs
  407.      */
  408.     boolean supportsTableCorrelationNames() throws SQLException;
  409.  
  410.     /**
  411.      * If table correlation names are supported, are they restricted
  412.      * to be different from the names of the tables?
  413.      *
  414.      * @return <code>true</code> if so; <code>false</code> otherwise 
  415.      * @exception SQLException if a database access error occurs
  416.      */
  417.     boolean supportsDifferentTableCorrelationNames() throws SQLException;
  418.  
  419.     /**
  420.      * Are expressions in "ORDER BY" lists supported?
  421.      *
  422.      * @return <code>true</code> if so; <code>false</code> otherwise
  423.      * @exception SQLException if a database access error occurs
  424.      */
  425.     boolean supportsExpressionsInOrderBy() throws SQLException;
  426.  
  427.     /**
  428.      * Can an "ORDER BY" clause use columns not in the SELECT statement?
  429.      *
  430.      * @return <code>true</code> if so; <code>false</code> otherwise
  431.      * @exception SQLException if a database access error occurs
  432.      */
  433.     boolean supportsOrderByUnrelated() throws SQLException;
  434.  
  435.     /**
  436.      * Is some form of "GROUP BY" clause supported?
  437.      *
  438.      * @return <code>true</code> if so; <code>false</code> otherwise
  439.      * @exception SQLException if a database access error occurs
  440.      */
  441.     boolean supportsGroupBy() throws SQLException;
  442.  
  443.     /**
  444.      * Can a "GROUP BY" clause use columns not in the SELECT?
  445.      *
  446.      * @return <code>true</code> if so; <code>false</code> otherwise
  447.      * @exception SQLException if a database access error occurs
  448.      */
  449.     boolean supportsGroupByUnrelated() throws SQLException;
  450.  
  451.     /**
  452.      * Can a "GROUP BY" clause add columns not in the SELECT
  453.      * provided it specifies all the columns in the SELECT?
  454.      *
  455.      * @return <code>true</code> if so; <code>false</code> otherwise
  456.      * @exception SQLException if a database access error occurs
  457.      */
  458.     boolean supportsGroupByBeyondSelect() throws SQLException;
  459.  
  460.     /**
  461.      * Is the escape character in "LIKE" clauses supported?
  462.      *
  463.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  464.      *
  465.      * @return <code>true</code> if so; <code>false</code> otherwise
  466.      * @exception SQLException if a database access error occurs
  467.      */
  468.     boolean supportsLikeEscapeClause() throws SQLException;
  469.  
  470.     /**
  471.      * Are multiple ResultSets from a single execute supported?
  472.      *
  473.      * @return <code>true</code> if so; <code>false</code> otherwise
  474.      * @exception SQLException if a database access error occurs
  475.      */
  476.     boolean supportsMultipleResultSets() throws SQLException;
  477.  
  478.     /**
  479.      * Can we have multiple transactions open at once (on different
  480.      * connections)?
  481.      *
  482.      * @return <code>true</code> if so; <code>false</code> otherwise
  483.      * @exception SQLException if a database access error occurs
  484.      */
  485.     boolean supportsMultipleTransactions() throws SQLException;
  486.  
  487.     /**
  488.      * Can columns be defined as non-nullable?
  489.      *
  490.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  491.      *
  492.      * @return <code>true</code> if so; <code>false</code> otherwise
  493.      * @exception SQLException if a database access error occurs
  494.      */
  495.     boolean supportsNonNullableColumns() throws SQLException;
  496.  
  497.     /**
  498.      * Is the ODBC Minimum SQL grammar supported?
  499.      *
  500.      * All JDBC Compliant<sup><font size=-2>TM</font></sup> drivers must return true.
  501.      *
  502.      * @return <code>true</code> if so; <code>false</code> otherwise
  503.      * @exception SQLException if a database access error occurs
  504.      */
  505.     boolean supportsMinimumSQLGrammar() throws SQLException;
  506.  
  507.     /**
  508.      * Is the ODBC Core SQL grammar supported?
  509.      *
  510.      * @return <code>true</code> if so; <code>false</code> otherwise
  511.      * @exception SQLException if a database access error occurs
  512.      */
  513.     boolean supportsCoreSQLGrammar() throws SQLException;
  514.  
  515.     /**
  516.      * Is the ODBC Extended SQL grammar supported?
  517.      *
  518.      * @return <code>true</code> if so; <code>false</code> otherwise
  519.      * @exception SQLException if a database access error occurs
  520.      */
  521.     boolean supportsExtendedSQLGrammar() throws SQLException;
  522.  
  523.     /**
  524.      * Is the ANSI92 entry level SQL grammar supported?
  525.      *
  526.      * All JDBC Compliant<sup><font size=-2>TM</font></sup> drivers must return true.
  527.      *
  528.      * @return <code>true</code> if so; <code>false</code> otherwise
  529.      * @exception SQLException if a database access error occurs
  530.      */
  531.     boolean supportsANSI92EntryLevelSQL() throws SQLException;
  532.  
  533.     /**
  534.      * Is the ANSI92 intermediate SQL grammar supported?
  535.      *
  536.      * @return <code>true</code> if so; <code>false</code> otherwise
  537.      * @exception SQLException if a database access error occurs
  538.      */
  539.     boolean supportsANSI92IntermediateSQL() throws SQLException;
  540.  
  541.     /**
  542.      * Is the ANSI92 full SQL grammar supported?
  543.      *
  544.      * @return <code>true</code> if so; <code>false</code> otherwise
  545.      * @exception SQLException if a database access error occurs
  546.      */
  547.     boolean supportsANSI92FullSQL() throws SQLException;
  548.  
  549.     /**
  550.      * Is the SQL Integrity Enhancement Facility supported?
  551.      *
  552.      * @return <code>true</code> if so; <code>false</code> otherwise
  553.      * @exception SQLException if a database access error occurs
  554.      */
  555.     boolean supportsIntegrityEnhancementFacility() throws SQLException;
  556.  
  557.     /**
  558.      * Is some form of outer join supported?
  559.      *
  560.      * @return <code>true</code> if so; <code>false</code> otherwise
  561.      * @exception SQLException if a database access error occurs
  562.      */
  563.     boolean supportsOuterJoins() throws SQLException;
  564.  
  565.     /**
  566.      * Are full nested outer joins supported?
  567.      *
  568.      * @return <code>true</code> if so; <code>false</code> otherwise
  569.      * @exception SQLException if a database access error occurs
  570.      */
  571.     boolean supportsFullOuterJoins() throws SQLException;
  572.  
  573.     /**
  574.      * Is there limited support for outer joins?  (This will be true
  575.      * if supportFullOuterJoins is true.)
  576.      *
  577.      * @return <code>true</code> if so; <code>false</code> otherwise
  578.      * @exception SQLException if a database access error occurs
  579.      */
  580.     boolean supportsLimitedOuterJoins() throws SQLException;
  581.  
  582.     /**
  583.      * What's the database vendor's preferred term for "schema"?
  584.      *
  585.      * @return the vendor term
  586.      * @exception SQLException if a database access error occurs
  587.      */
  588.     String getSchemaTerm() throws SQLException;
  589.  
  590.     /**
  591.      * What's the database vendor's preferred term for "procedure"?
  592.      *
  593.      * @return the vendor term
  594.      * @exception SQLException if a database access error occurs
  595.      */
  596.     String getProcedureTerm() throws SQLException;
  597.  
  598.     /**
  599.      * What's the database vendor's preferred term for "catalog"?
  600.      *
  601.      * @return the vendor term
  602.      * @exception SQLException if a database access error occurs
  603.      */
  604.     String getCatalogTerm() throws SQLException;
  605.  
  606.     /**
  607.      * Does a catalog appear at the start of a qualified table name?
  608.      * (Otherwise it appears at the end)
  609.      *
  610.      * @return true if it appears at the start 
  611.      * @exception SQLException if a database access error occurs
  612.      */
  613.     boolean isCatalogAtStart() throws SQLException;
  614.  
  615.     /**
  616.      * What's the separator between catalog and table name?
  617.      *
  618.      * @return the separator string
  619.      * @exception SQLException if a database access error occurs
  620.      */
  621.     String getCatalogSeparator() throws SQLException;
  622.  
  623.     /**
  624.      * Can a schema name be used in a data manipulation statement?
  625.      *
  626.      * @return <code>true</code> if so; <code>false</code> otherwise
  627.      * @exception SQLException if a database access error occurs
  628.      */
  629.     boolean supportsSchemasInDataManipulation() throws SQLException;
  630.  
  631.     /**
  632.      * Can a schema name be used in a procedure call statement?
  633.      *
  634.      * @return <code>true</code> if so; <code>false</code> otherwise
  635.      * @exception SQLException if a database access error occurs
  636.      */
  637.     boolean supportsSchemasInProcedureCalls() throws SQLException;
  638.  
  639.     /**
  640.      * Can a schema name be used in a table definition statement?
  641.      *
  642.      * @return <code>true</code> if so; <code>false</code> otherwise
  643.      * @exception SQLException if a database access error occurs
  644.      */
  645.     boolean supportsSchemasInTableDefinitions() throws SQLException;
  646.  
  647.     /**
  648.      * Can a schema name be used in an index definition statement?
  649.      *
  650.      * @return <code>true</code> if so; <code>false</code> otherwise
  651.      * @exception SQLException if a database access error occurs
  652.      */
  653.     boolean supportsSchemasInIndexDefinitions() throws SQLException;
  654.  
  655.     /**
  656.      * Can a schema name be used in a privilege definition statement?
  657.      *
  658.      * @return <code>true</code> if so; <code>false</code> otherwise
  659.      * @exception SQLException if a database access error occurs
  660.      */
  661.     boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
  662.  
  663.     /**
  664.      * Can a catalog name be used in a data manipulation statement?
  665.      *
  666.      * @return <code>true</code> if so; <code>false</code> otherwise
  667.      * @exception SQLException if a database access error occurs
  668.      */
  669.     boolean supportsCatalogsInDataManipulation() throws SQLException;
  670.  
  671.     /**
  672.      * Can a catalog name be used in a procedure call statement?
  673.      *
  674.      * @return <code>true</code> if so; <code>false</code> otherwise
  675.      * @exception SQLException if a database access error occurs
  676.      */
  677.     boolean supportsCatalogsInProcedureCalls() throws SQLException;
  678.  
  679.     /**
  680.      * Can a catalog name be used in a table definition statement?
  681.      *
  682.      * @return <code>true</code> if so; <code>false</code> otherwise
  683.      * @exception SQLException if a database access error occurs
  684.      */
  685.     boolean supportsCatalogsInTableDefinitions() throws SQLException;
  686.  
  687.     /**
  688.      * Can a catalog name be used in an index definition statement?
  689.      *
  690.      * @return <code>true</code> if so; <code>false</code> otherwise
  691.      * @exception SQLException if a database access error occurs
  692.      */
  693.     boolean supportsCatalogsInIndexDefinitions() throws SQLException;
  694.  
  695.     /**
  696.      * Can a catalog name be used in a privilege definition statement?
  697.      *
  698.      * @return <code>true</code> if so; <code>false</code> otherwise
  699.      * @exception SQLException if a database access error occurs
  700.      */
  701.     boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
  702.  
  703.  
  704.     /**
  705.      * Is positioned DELETE supported?
  706.      *
  707.      * @return <code>true</code> if so; <code>false</code> otherwise
  708.      * @exception SQLException if a database access error occurs
  709.      */
  710.     boolean supportsPositionedDelete() throws SQLException;
  711.  
  712.     /**
  713.      * Is positioned UPDATE supported?
  714.      *
  715.      * @return <code>true</code> if so; <code>false</code> otherwise
  716.      * @exception SQLException if a database access error occurs
  717.      */
  718.     boolean supportsPositionedUpdate() throws SQLException;
  719.  
  720.     /**
  721.      * Is SELECT for UPDATE supported?
  722.      *
  723.      * @return <code>true</code> if so; <code>false</code> otherwise
  724.      * @exception SQLException if a database access error occurs
  725.      */
  726.     boolean supportsSelectForUpdate() throws SQLException;
  727.  
  728.     /**
  729.      * Are stored procedure calls using the stored procedure escape
  730.      * syntax supported?
  731.      *
  732.      * @return <code>true</code> if so; <code>false</code> otherwise 
  733.      * @exception SQLException if a database access error occurs
  734.      */
  735.     boolean supportsStoredProcedures() throws SQLException;
  736.  
  737.     /**
  738.      * Are subqueries in comparison expressions supported?
  739.      *
  740.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  741.      *
  742.      * @return <code>true</code> if so; <code>false</code> otherwise
  743.      * @exception SQLException if a database access error occurs
  744.      */
  745.     boolean supportsSubqueriesInComparisons() throws SQLException;
  746.  
  747.     /**
  748.      * Are subqueries in 'exists' expressions supported?
  749.      *
  750.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  751.      *
  752.      * @return <code>true</code> if so; <code>false</code> otherwise
  753.      * @exception SQLException if a database access error occurs
  754.      */
  755.     boolean supportsSubqueriesInExists() throws SQLException;
  756.  
  757.     /**
  758.      * Are subqueries in 'in' statements supported?
  759.      *
  760.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  761.      *
  762.      * @return <code>true</code> if so; <code>false</code> otherwise
  763.      * @exception SQLException if a database access error occurs
  764.      */
  765.     boolean supportsSubqueriesInIns() throws SQLException;
  766.  
  767.     /**
  768.      * Are subqueries in quantified expressions supported?
  769.      *
  770.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  771.      *
  772.      * @return <code>true</code> if so; <code>false</code> otherwise
  773.      * @exception SQLException if a database access error occurs
  774.      */
  775.     boolean supportsSubqueriesInQuantifieds() throws SQLException;
  776.  
  777.     /**
  778.      * Are correlated subqueries supported?
  779.      *
  780.      * A JDBC Compliant<sup><font size=-2>TM</font></sup> driver always returns true.
  781.      *
  782.      * @return <code>true</code> if so; <code>false</code> otherwise
  783.      * @exception SQLException if a database access error occurs
  784.      */
  785.     boolean supportsCorrelatedSubqueries() throws SQLException;
  786.  
  787.     /**
  788.      * Is SQL UNION supported?
  789.      *
  790.      * @return <code>true</code> if so; <code>false</code> otherwise
  791.      * @exception SQLException if a database access error occurs
  792.      */
  793.     boolean supportsUnion() throws SQLException;
  794.  
  795.     /**
  796.      * Is SQL UNION ALL supported?
  797.      *
  798.      * @return <code>true</code> if so; <code>false</code> otherwise
  799.      * @exception SQLException if a database access error occurs
  800.      */
  801.     boolean supportsUnionAll() throws SQLException;
  802.  
  803.     /**
  804.      * Can cursors remain open across commits? 
  805.      * 
  806.      * @return <code>true</code> if cursors always remain open;
  807.      *       <code>false</code> if they might not remain open
  808.      * @exception SQLException if a database access error occurs
  809.      */
  810.     boolean supportsOpenCursorsAcrossCommit() throws SQLException;
  811.  
  812.     /**
  813.      * Can cursors remain open across rollbacks?
  814.      * 
  815.      * @return <code>true</code> if cursors always remain open;
  816.      *       <code>false</code> if they might not remain open
  817.      * @exception SQLException if a database access error occurs
  818.      */
  819.     boolean supportsOpenCursorsAcrossRollback() throws SQLException;
  820.  
  821.     /**
  822.      * Can statements remain open across commits?
  823.      * 
  824.      * @return <code>true</code> if statements always remain open;
  825.      *       <code>false</code> if they might not remain open
  826.      * @exception SQLException if a database access error occurs
  827.      */
  828.     boolean supportsOpenStatementsAcrossCommit() throws SQLException;
  829.  
  830.     /**
  831.      * Can statements remain open across rollbacks?
  832.      * 
  833.      * @return <code>true</code> if statements always remain open;
  834.      *       <code>false</code> if they might not remain open
  835.      * @exception SQLException if a database access error occurs
  836.      */
  837.     boolean supportsOpenStatementsAcrossRollback() throws SQLException;
  838.  
  839.     
  840.  
  841.     //----------------------------------------------------------------------
  842.     // The following group of methods exposes various limitations 
  843.     // based on the target database with the current driver.
  844.     // Unless otherwise specified, a result of zero means there is no
  845.     // limit, or the limit is not known.
  846.     
  847.     /**
  848.      * How many hex characters can you have in an inline binary literal?
  849.      *
  850.      * @return max binary literal length in hex characters;
  851.      *      a result of zero means that there is no limit or the limit is not known
  852.      * @exception SQLException if a database access error occurs
  853.      */
  854.     int getMaxBinaryLiteralLength() throws SQLException;
  855.  
  856.     /**
  857.      * What's the max length for a character literal?
  858.      *
  859.      * @return max literal length;
  860.      *      a result of zero means that there is no limit or the limit is not known
  861.      * @exception SQLException if a database access error occurs
  862.      */
  863.     int getMaxCharLiteralLength() throws SQLException;
  864.  
  865.     /**
  866.      * What's the limit on column name length?
  867.      *
  868.      * @return max column name length;
  869.      *      a result of zero means that there is no limit or the limit is not known
  870.      * @exception SQLException if a database access error occurs
  871.      */
  872.     int getMaxColumnNameLength() throws SQLException;
  873.  
  874.     /**
  875.      * What's the maximum number of columns in a "GROUP BY" clause?
  876.      *
  877.      * @return max number of columns;
  878.      *      a result of zero means that there is no limit or the limit is not known
  879.      * @exception SQLException if a database access error occurs
  880.      */
  881.     int getMaxColumnsInGroupBy() throws SQLException;
  882.  
  883.     /**
  884.      * What's the maximum number of columns allowed in an index?
  885.      *
  886.      * @return max number of columns;
  887.      *      a result of zero means that there is no limit or the limit is not known
  888.      * @exception SQLException if a database access error occurs
  889.      */
  890.     int getMaxColumnsInIndex() throws SQLException;
  891.  
  892.     /**
  893.      * What's the maximum number of columns in an "ORDER BY" clause?
  894.      *
  895.      * @return max number of columns;
  896.      *      a result of zero means that there is no limit or the limit is not known
  897.      * @exception SQLException if a database access error occurs
  898.      */
  899.     int getMaxColumnsInOrderBy() throws SQLException;
  900.  
  901.     /**
  902.      * What's the maximum number of columns in a "SELECT" list?
  903.      *
  904.      * @return max number of columns;
  905.      *      a result of zero means that there is no limit or the limit is not known
  906.      * @exception SQLException if a database access error occurs
  907.      */
  908.     int getMaxColumnsInSelect() throws SQLException;
  909.  
  910.     /**
  911.      * What's the maximum number of columns in a table?
  912.      *
  913.      * @return max number of columns;
  914.      *      a result of zero means that there is no limit or the limit is not known
  915.      * @exception SQLException if a database access error occurs
  916.      */
  917.     int getMaxColumnsInTable() throws SQLException;
  918.  
  919.     /**
  920.      * How many active connections can we have at a time to this database?
  921.      *
  922.      * @return max number of active connections;
  923.      *      a result of zero means that there is no limit or the limit is not known
  924.      * @exception SQLException if a database access error occurs
  925.      */
  926.     int getMaxConnections() throws SQLException;
  927.  
  928.     /**
  929.      * What's the maximum cursor name length?
  930.      *
  931.      * @return max cursor name length in bytes;
  932.      *      a result of zero means that there is no limit or the limit is not known
  933.      * @exception SQLException if a database access error occurs
  934.      */
  935.     int getMaxCursorNameLength() throws SQLException;
  936.  
  937.     /**
  938.      * What's the maximum length of an index (in bytes)?    
  939.      *
  940.      * @return max index length in bytes;
  941.      *      a result of zero means that there is no limit or the limit is not known
  942.      * @exception SQLException if a database access error occurs
  943.      */
  944.     int getMaxIndexLength() throws SQLException;
  945.  
  946.     /**
  947.      * What's the maximum length allowed for a schema name?
  948.      *
  949.      * @return max name length in bytes;
  950.      *      a result of zero means that there is no limit or the limit is not known
  951.      * @exception SQLException if a database access error occurs
  952.      */
  953.     int getMaxSchemaNameLength() throws SQLException;
  954.  
  955.     /**
  956.      * What's the maximum length of a procedure name?
  957.      *
  958.      * @return max name length in bytes; 
  959.      *      a result of zero means that there is no limit or the limit is not known
  960.      * @exception SQLException if a database access error occurs
  961.      */
  962.     int getMaxProcedureNameLength() throws SQLException;
  963.  
  964.     /**
  965.      * What's the maximum length of a catalog name?
  966.      *
  967.      * @return max name length in bytes;
  968.      *      a result of zero means that there is no limit or the limit is not known
  969.      * @exception SQLException if a database access error occurs
  970.      */
  971.     int getMaxCatalogNameLength() throws SQLException;
  972.  
  973.     /**
  974.      * What's the maximum length of a single row?
  975.      *
  976.      * @return max row size in bytes;
  977.      *      a result of zero means that there is no limit or the limit is not known
  978.      * @exception SQLException if a database access error occurs
  979.      */
  980.     int getMaxRowSize() throws SQLException;
  981.  
  982.     /**
  983.      * Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
  984.      * blobs?
  985.      *
  986.      * @return <code>true</code> if so; <code>false</code> otherwise 
  987.      * @exception SQLException if a database access error occurs
  988.      */
  989.     boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
  990.  
  991.     /**
  992.      * What's the maximum length of a SQL statement?
  993.      *
  994.      * @return max length in bytes;
  995.      *      a result of zero means that there is no limit or the limit is not known
  996.      * @exception SQLException if a database access error occurs
  997.      */
  998.     int getMaxStatementLength() throws SQLException;
  999.  
  1000.     /**
  1001.      * How many active statements can we have open at one time to this
  1002.      * database?
  1003.      *
  1004.      * @return the maximum number of statements that can be open at one time;
  1005.      *      a result of zero means that there is no limit or the limit is not known
  1006.      * @exception SQLException if a database access error occurs
  1007.      */
  1008.     int getMaxStatements() throws SQLException;
  1009.  
  1010.     /**
  1011.      * What's the maximum length of a table name?
  1012.      *
  1013.      * @return max name length in bytes;
  1014.      *      a result of zero means that there is no limit or the limit is not known
  1015.      * @exception SQLException if a database access error occurs
  1016.      */
  1017.     int getMaxTableNameLength() throws SQLException;
  1018.  
  1019.     /**
  1020.      * What's the maximum number of tables in a SELECT statement?
  1021.      *
  1022.      * @return the maximum number of tables allowed in a SELECT statement;
  1023.      *      a result of zero means that there is no limit or the limit is not known
  1024.      * @exception SQLException if a database access error occurs
  1025.      */
  1026.     int getMaxTablesInSelect() throws SQLException;
  1027.  
  1028.     /**
  1029.      * What's the maximum length of a user name?
  1030.      *
  1031.      * @return max user name length  in bytes;
  1032.      *      a result of zero means that there is no limit or the limit is not known
  1033.      * @exception SQLException if a database access error occurs
  1034.      */
  1035.     int getMaxUserNameLength() throws SQLException;
  1036.  
  1037.     //----------------------------------------------------------------------
  1038.  
  1039.     /**
  1040.      * What's the database's default transaction isolation level?  The
  1041.      * values are defined in <code>java.sql.Connection</code>.
  1042.      *
  1043.      * @return the default isolation level 
  1044.      * @exception SQLException if a database access error occurs
  1045.      * @see Connection
  1046.      */
  1047.     int getDefaultTransactionIsolation() throws SQLException;
  1048.  
  1049.     /**
  1050.      * Are transactions supported? If not, invoking the method
  1051.      * <code>commit</code> is a noop and the
  1052.      * isolation level is TRANSACTION_NONE.
  1053.      *
  1054.      * @return <code>true</code> if transactions are supported; <code>false</code> otherwise 
  1055.      * @exception SQLException if a database access error occurs
  1056.      */
  1057.     boolean supportsTransactions() throws SQLException;
  1058.  
  1059.     /**
  1060.      * Does this database support the given transaction isolation level?
  1061.      *
  1062.      * @param level the values are defined in <code>java.sql.Connection</code>
  1063.      * @return <code>true</code> if so; <code>false</code> otherwise 
  1064.      * @exception SQLException if a database access error occurs
  1065.      * @see Connection
  1066.      */
  1067.     boolean supportsTransactionIsolationLevel(int level)
  1068.                             throws SQLException;
  1069.  
  1070.     /**
  1071.      * Are both data definition and data manipulation statements
  1072.      * within a transaction supported?
  1073.      *
  1074.      * @return <code>true</code> if so; <code>false</code> otherwise 
  1075.      * @exception SQLException if a database access error occurs
  1076.      */
  1077.     boolean supportsDataDefinitionAndDataManipulationTransactions()
  1078.                              throws SQLException;
  1079.     /**
  1080.      * Are only data manipulation statements within a transaction
  1081.      * supported?
  1082.      *
  1083.      * @return <code>true</code> if so; <code>false</code> otherwise
  1084.      * @exception SQLException if a database access error occurs
  1085.      */
  1086.     boolean supportsDataManipulationTransactionsOnly()
  1087.                             throws SQLException;
  1088.     /**
  1089.      * Does a data definition statement within a transaction force the
  1090.      * transaction to commit?
  1091.      *
  1092.      * @return <code>true</code> if so; <code>false</code> otherwise 
  1093.      * @exception SQLException if a database access error occurs
  1094.      */
  1095.     boolean dataDefinitionCausesTransactionCommit()
  1096.                             throws SQLException;
  1097.     /**
  1098.      * Is a data definition statement within a transaction ignored?
  1099.      *
  1100.      * @return <code>true</code> if so; <code>false</code> otherwise 
  1101.      * @exception SQLException if a database access error occurs
  1102.      */
  1103.     boolean dataDefinitionIgnoredInTransactions()
  1104.                             throws SQLException;
  1105.  
  1106.  
  1107.     /**
  1108.      * Gets a description of the stored procedures available in a
  1109.      * catalog.
  1110.      *
  1111.      * <P>Only procedure descriptions matching the schema and
  1112.      * procedure name criteria are returned.  They are ordered by
  1113.      * PROCEDURE_SCHEM, and PROCEDURE_NAME.
  1114.      *
  1115.      * <P>Each procedure description has the the following columns:
  1116.      *  <OL>
  1117.      *    <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
  1118.      *    <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
  1119.      *    <LI><B>PROCEDURE_NAME</B> String => procedure name
  1120.      *  <LI> reserved for future use
  1121.      *  <LI> reserved for future use
  1122.      *  <LI> reserved for future use
  1123.      *    <LI><B>REMARKS</B> String => explanatory comment on the procedure
  1124.      *    <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
  1125.      *      <UL>
  1126.      *      <LI> procedureResultUnknown - May return a result
  1127.      *      <LI> procedureNoResult - Does not return a result
  1128.      *      <LI> procedureReturnsResult - Returns a result
  1129.      *      </UL>
  1130.      *  </OL>
  1131.      *
  1132.      * @param catalog a catalog name; "" retrieves those without a
  1133.      * catalog; null means drop catalog name from the selection criteria
  1134.      * @param schemaPattern a schema name pattern; "" retrieves those
  1135.      * without a schema
  1136.      * @param procedureNamePattern a procedure name pattern 
  1137.      * @return ResultSet - each row is a procedure description 
  1138.      * @exception SQLException if a database access error occurs
  1139.      * @see #getSearchStringEscape 
  1140.      */
  1141.     ResultSet getProcedures(String catalog, String schemaPattern,
  1142.             String procedureNamePattern) throws SQLException;
  1143.  
  1144.     /**
  1145.      * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1146.      * <code>ResultSet</code> object returned by the method
  1147.      * <code>getProcedures</code>.
  1148.      * <p> Indicates that it is not known whether the procedure returns
  1149.      * a result.
  1150.      */
  1151.     int procedureResultUnknown    = 0;
  1152.  
  1153.     /**
  1154.      * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1155.      * <code>ResultSet</code> object returned by the method
  1156.      * <code>getProcedures</code>.
  1157.      * <p> Indicates that the procedure does not return
  1158.      * a result.
  1159.      */
  1160.     int procedureNoResult        = 1;
  1161.  
  1162.     /**
  1163.      * A possible value for column <code>PROCEDURE_TYPE</code> in the
  1164.      * <code>ResultSet</code> object returned by the method
  1165.      * <code>getProcedures</code>.
  1166.      * <p> Indicates that the procedure returns
  1167.      * a result.
  1168.      */
  1169.     int procedureReturnsResult    = 2;
  1170.  
  1171.     /**
  1172.      * Gets a description of a catalog's stored procedure parameters
  1173.      * and result columns.
  1174.      *
  1175.      * <P>Only descriptions matching the schema, procedure and
  1176.      * parameter name criteria are returned.  They are ordered by
  1177.      * PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value,
  1178.      * if any, is first. Next are the parameter descriptions in call
  1179.      * order. The column descriptions follow in column number order.
  1180.      *
  1181.      * <P>Each row in the ResultSet is a parameter description or
  1182.      * column description with the following fields:
  1183.      *  <OL>
  1184.      *    <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be null)
  1185.      *    <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be null)
  1186.      *    <LI><B>PROCEDURE_NAME</B> String => procedure name
  1187.      *    <LI><B>COLUMN_NAME</B> String => column/parameter name 
  1188.      *    <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
  1189.      *      <UL>
  1190.      *      <LI> procedureColumnUnknown - nobody knows
  1191.      *      <LI> procedureColumnIn - IN parameter
  1192.      *      <LI> procedureColumnInOut - INOUT parameter
  1193.      *      <LI> procedureColumnOut - OUT parameter
  1194.      *      <LI> procedureColumnReturn - procedure return value
  1195.      *      <LI> procedureColumnResult - result column in ResultSet
  1196.      *      </UL>
  1197.      *  <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
  1198.      *    <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
  1199.      *  type name is fully qualified
  1200.      *    <LI><B>PRECISION</B> int => precision
  1201.      *    <LI><B>LENGTH</B> int => length in bytes of data
  1202.      *    <LI><B>SCALE</B> short => scale
  1203.      *    <LI><B>RADIX</B> short => radix
  1204.      *    <LI><B>NULLABLE</B> short => can it contain NULL?
  1205.      *      <UL>
  1206.      *      <LI> procedureNoNulls - does not allow NULL values
  1207.      *      <LI> procedureNullable - allows NULL values
  1208.      *      <LI> procedureNullableUnknown - nullability unknown
  1209.      *      </UL>
  1210.      *    <LI><B>REMARKS</B> String => comment describing parameter/column
  1211.      *  </OL>
  1212.      *
  1213.      * <P><B>Note:</B> Some databases may not return the column
  1214.      * descriptions for a procedure. Additional columns beyond
  1215.      * REMARKS can be defined by the database.
  1216.      *
  1217.      * @param catalog a catalog name; "" retrieves those without a
  1218.      * catalog; null means drop catalog name from the selection criteria
  1219.      * @param schemaPattern a schema name pattern; "" retrieves those
  1220.      * without a schema 
  1221.      * @param procedureNamePattern a procedure name pattern 
  1222.      * @param columnNamePattern a column name pattern 
  1223.      * @return ResultSet - each row describes a stored procedure parameter or 
  1224.      *      column
  1225.      * @exception SQLException if a database access error occurs
  1226.      * @see #getSearchStringEscape 
  1227.      */
  1228.     ResultSet getProcedureColumns(String catalog,
  1229.             String schemaPattern,
  1230.             String procedureNamePattern, 
  1231.             String columnNamePattern) throws SQLException;
  1232.  
  1233.     /**
  1234.      * Indicates that type of the column is unknown.
  1235.      * A possible value for the column
  1236.      * <code>COLUMN_TYPE</code>
  1237.      * in the <code>ResultSet</code> 
  1238.      * returned by the method <code>getProcedureColumns</code>.
  1239.      */
  1240.     int procedureColumnUnknown = 0;
  1241.  
  1242.     /**
  1243.      * Indicates that the column stores IN parameters.
  1244.      * A possible value for the column
  1245.      * <code>COLUMN_TYPE</code>
  1246.      * in the <code>ResultSet</code> 
  1247.      * returned by the method <code>getProcedureColumns</code>.
  1248.      */
  1249.     int procedureColumnIn = 1;
  1250.  
  1251.     /**
  1252.      * Indicates that the column stores INOUT parameters.
  1253.      * A possible value for the column
  1254.      * <code>COLUMN_TYPE</code>
  1255.      * in the <code>ResultSet</code> 
  1256.      * returned by the method <code>getProcedureColumns</code>.
  1257.      */
  1258.     int procedureColumnInOut = 2;
  1259.  
  1260.     /**
  1261.      * Indicates that the column stores OUT parameters.
  1262.      * A possible value for the column
  1263.      * <code>COLUMN_TYPE</code>
  1264.      * in the <code>ResultSet</code> 
  1265.      * returned by the method <code>getProcedureColumns</code>.
  1266.      */
  1267.     int procedureColumnOut = 4;
  1268.     /**
  1269.      * Indicates that the column stores return values.
  1270.      * A possible value for the column
  1271.      * <code>COLUMN_TYPE</code>
  1272.      * in the <code>ResultSet</code> 
  1273.      * returned by the method <code>getProcedureColumns</code>.
  1274.      */
  1275.     int procedureColumnReturn = 5;
  1276.  
  1277.     /**
  1278.      * Indicates that the column stores results.
  1279.      * A possible value for the column
  1280.      * <code>COLUMN_TYPE</code>
  1281.      * in the <code>ResultSet</code> 
  1282.      * returned by the method <code>getProcedureColumns</code>.
  1283.      */
  1284.     int procedureColumnResult = 3;
  1285.  
  1286.     /**
  1287.      * Indicates that <code>NULL</code> values are not allowed.
  1288.      * A possible value for the column
  1289.      * <code>NULLABLE</code>
  1290.      * in the <code>ResultSet</code> 
  1291.      * returned by the method <code>getProcedureColumns</code>.
  1292.      */
  1293.     int procedureNoNulls = 0;
  1294.  
  1295.     /**
  1296.      * Indicates that <code>NULL</code> values are allowed.
  1297.      * A possible value for the column
  1298.      * <code>NULLABLE</code>
  1299.      * in the <code>ResultSet</code> 
  1300.      * returned by the method <code>getProcedureColumns</code>.
  1301.      */
  1302.     int procedureNullable = 1;
  1303.  
  1304.     /**
  1305.      * Indicates that whether <code>NULL</code> values are allowed
  1306.      * is unknown.
  1307.      * A possible value for the column
  1308.      * <code>NULLABLE</code>
  1309.      * in the <code>ResultSet</code> 
  1310.      * returned by the method <code>getProcedureColumns</code>.
  1311.      */
  1312.     int procedureNullableUnknown = 2;
  1313.  
  1314.  
  1315.     /**
  1316.      * Gets a description of tables available in a catalog.
  1317.      *
  1318.      * <P>Only table descriptions matching the catalog, schema, table
  1319.      * name and type criteria are returned.  They are ordered by
  1320.      * TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
  1321.      *
  1322.      * <P>Each table description has the following columns:
  1323.      *  <OL>
  1324.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  1325.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  1326.      *    <LI><B>TABLE_NAME</B> String => table name
  1327.      *    <LI><B>TABLE_TYPE</B> String => table type.  Typical types are "TABLE",
  1328.      *            "VIEW",    "SYSTEM TABLE", "GLOBAL TEMPORARY", 
  1329.      *            "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  1330.      *    <LI><B>REMARKS</B> String => explanatory comment on the table
  1331.      *  </OL>
  1332.      *
  1333.      * <P><B>Note:</B> Some databases may not return information for
  1334.      * all tables.
  1335.      *
  1336.      * @param catalog a catalog name; "" retrieves those without a
  1337.      * catalog; null means drop catalog name from the selection criteria
  1338.      * @param schemaPattern a schema name pattern; "" retrieves those
  1339.      * without a schema
  1340.      * @param tableNamePattern a table name pattern 
  1341.      * @param types a list of table types to include; null returns all types 
  1342.      * @return ResultSet - each row is a table description
  1343.      * @exception SQLException if a database access error occurs
  1344.      * @see #getSearchStringEscape 
  1345.      */
  1346.     ResultSet getTables(String catalog, String schemaPattern,
  1347.         String tableNamePattern, String types[]) throws SQLException;
  1348.  
  1349.     /**
  1350.      * Gets the schema names available in this database.  The results
  1351.      * are ordered by schema name.
  1352.      *
  1353.      * <P>The schema column is:
  1354.      *  <OL>
  1355.      *    <LI><B>TABLE_SCHEM</B> String => schema name
  1356.      *  </OL>
  1357.      *
  1358.      * @return ResultSet - each row has a single String column that is a
  1359.      * schema name 
  1360.      * @exception SQLException if a database access error occurs
  1361.      */
  1362.     ResultSet getSchemas() throws SQLException;
  1363.  
  1364.     /**
  1365.      * Gets the catalog names available in this database.  The results
  1366.      * are ordered by catalog name.
  1367.      *
  1368.      * <P>The catalog column is:
  1369.      *  <OL>
  1370.      *    <LI><B>TABLE_CAT</B> String => catalog name
  1371.      *  </OL>
  1372.      *
  1373.      * @return ResultSet - each row has a single String column that is a
  1374.      * catalog name 
  1375.      * @exception SQLException if a database access error occurs
  1376.      */
  1377.     ResultSet getCatalogs() throws SQLException;
  1378.  
  1379.     /**
  1380.      * Gets the table types available in this database.  The results
  1381.      * are ordered by table type.
  1382.      *
  1383.      * <P>The table type is:
  1384.      *  <OL>
  1385.      *    <LI><B>TABLE_TYPE</B> String => table type.  Typical types are "TABLE",
  1386.      *            "VIEW",    "SYSTEM TABLE", "GLOBAL TEMPORARY", 
  1387.      *            "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  1388.      *  </OL>
  1389.      *
  1390.      * @return ResultSet - each row has a single String column that is a
  1391.      * table type 
  1392.      * @exception SQLException if a database access error occurs
  1393.      */
  1394.     ResultSet getTableTypes() throws SQLException;
  1395.  
  1396.     /**
  1397.      * Gets a description of table columns available in 
  1398.      * the specified catalog.
  1399.      *
  1400.      * <P>Only column descriptions matching the catalog, schema, table
  1401.      * and column name criteria are returned.  They are ordered by
  1402.      * TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
  1403.      *
  1404.      * <P>Each column description has the following columns:
  1405.      *  <OL>
  1406.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  1407.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  1408.      *    <LI><B>TABLE_NAME</B> String => table name
  1409.      *    <LI><B>COLUMN_NAME</B> String => column name
  1410.      *    <LI><B>DATA_TYPE</B> short => SQL type from java.sql.Types
  1411.      *    <LI><B>TYPE_NAME</B> String => Data source dependent type name,
  1412.      *  for a UDT the type name is fully qualified
  1413.      *    <LI><B>COLUMN_SIZE</B> int => column size.  For char or date
  1414.      *        types this is the maximum number of characters, for numeric or
  1415.      *        decimal types this is precision.
  1416.      *    <LI><B>BUFFER_LENGTH</B> is not used.
  1417.      *    <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits
  1418.      *    <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
  1419.      *    <LI><B>NULLABLE</B> int => is NULL allowed?
  1420.      *      <UL>
  1421.      *      <LI> columnNoNulls - might not allow NULL values
  1422.      *      <LI> columnNullable - definitely allows NULL values
  1423.      *      <LI> columnNullableUnknown - nullability unknown
  1424.      *      </UL>
  1425.      *    <LI><B>REMARKS</B> String => comment describing column (may be null)
  1426.      *     <LI><B>COLUMN_DEF</B> String => default value (may be null)
  1427.      *    <LI><B>SQL_DATA_TYPE</B> int => unused
  1428.      *    <LI><B>SQL_DATETIME_SUB</B> int => unused
  1429.      *    <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the 
  1430.      *       maximum number of bytes in the column
  1431.      *    <LI><B>ORDINAL_POSITION</B> int    => index of column in table 
  1432.      *      (starting at 1)
  1433.      *    <LI><B>IS_NULLABLE</B> String => "NO" means column definitely 
  1434.      *      does not allow NULL values; "YES" means the column might 
  1435.      *      allow NULL values.  An empty string means nobody knows.
  1436.      *  </OL>
  1437.      *
  1438.      * @param catalog a catalog name; "" retrieves those without a
  1439.      * catalog; null means drop catalog name from the selection criteria
  1440.      * @param schemaPattern a schema name pattern; "" retrieves those
  1441.      * without a schema
  1442.      * @param tableNamePattern a table name pattern 
  1443.      * @param columnNamePattern a column name pattern 
  1444.      * @return ResultSet - each row is a column description
  1445.      * @exception SQLException if a database access error occurs
  1446.      * @see #getSearchStringEscape 
  1447.      */
  1448.     ResultSet getColumns(String catalog, String schemaPattern,
  1449.         String tableNamePattern, String columnNamePattern)
  1450.                     throws SQLException;
  1451.     /**
  1452.      * Indicates that the column might not allow NULL values.
  1453.      * A possible value for the column
  1454.      * <code>NULLABLE</code>
  1455.      * in the <code>ResultSet</code> returned by the method
  1456.      * <code>getColumns</code>.
  1457.      */
  1458.     int columnNoNulls = 0;
  1459.  
  1460.     /**
  1461.      * Indicates that the column definitely allows <code>NULL</code> values.
  1462.      * A possible value for the column
  1463.      * <code>NULLABLE</code>
  1464.      * in the <code>ResultSet</code> returned by the method
  1465.      * <code>getColumns</code>.
  1466.      */
  1467.     int columnNullable = 1;
  1468.  
  1469.     /**
  1470.      * Indicates that the nullability of columns is unknown.
  1471.      * A possible value for the column
  1472.      * <code>NULLABLE</code>
  1473.      * in the <code>ResultSet</code> returned by the method
  1474.      * <code>getColumns</code>.
  1475.      */
  1476.     int columnNullableUnknown = 2;
  1477.  
  1478.     /**
  1479.      * Gets a description of the access rights for a table's columns.
  1480.      *
  1481.      * <P>Only privileges matching the column name criteria are
  1482.      * returned.  They are ordered by COLUMN_NAME and PRIVILEGE.
  1483.      *
  1484.      * <P>Each privilige description has the following columns:
  1485.      *  <OL>
  1486.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  1487.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  1488.      *    <LI><B>TABLE_NAME</B> String => table name
  1489.      *    <LI><B>COLUMN_NAME</B> String => column name
  1490.      *    <LI><B>GRANTOR</B> => grantor of access (may be null)
  1491.      *    <LI><B>GRANTEE</B> String => grantee of access
  1492.      *    <LI><B>PRIVILEGE</B> String => name of access (SELECT, 
  1493.      *      INSERT, UPDATE, REFRENCES, ...)
  1494.      *    <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted 
  1495.      *      to grant to others; "NO" if not; null if unknown 
  1496.      *  </OL>
  1497.      *
  1498.      * @param catalog a catalog name; "" retrieves those without a
  1499.      * catalog; null means drop catalog name from the selection criteria
  1500.      * @param schema a schema name; "" retrieves those without a schema
  1501.      * @param table a table name
  1502.      * @param columnNamePattern a column name pattern 
  1503.      * @return ResultSet - each row is a column privilege description
  1504.      * @exception SQLException if a database access error occurs
  1505.      * @see #getSearchStringEscape 
  1506.      */
  1507.     ResultSet getColumnPrivileges(String catalog, String schema,
  1508.         String table, String columnNamePattern) throws SQLException;
  1509.  
  1510.     /**
  1511.      * Gets a description of the access rights for each table available
  1512.      * in a catalog. Note that a table privilege applies to one or
  1513.      * more columns in the table. It would be wrong to assume that
  1514.      * this priviledge applies to all columns (this may be true for
  1515.      * some systems but is not true for all.)
  1516.      *
  1517.      * <P>Only privileges matching the schema and table name
  1518.      * criteria are returned.  They are ordered by TABLE_SCHEM,
  1519.      * TABLE_NAME, and PRIVILEGE.
  1520.      *
  1521.      * <P>Each privilige description has the following columns:
  1522.      *  <OL>
  1523.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  1524.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  1525.      *    <LI><B>TABLE_NAME</B> String => table name
  1526.      *    <LI><B>GRANTOR</B> => grantor of access (may be null)
  1527.      *    <LI><B>GRANTEE</B> String => grantee of access
  1528.      *    <LI><B>PRIVILEGE</B> String => name of access (SELECT, 
  1529.      *      INSERT, UPDATE, REFRENCES, ...)
  1530.      *    <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted 
  1531.      *      to grant to others; "NO" if not; null if unknown 
  1532.      *  </OL>
  1533.      *
  1534.      * @param catalog a catalog name; "" retrieves those without a
  1535.      * catalog; null means drop catalog name from the selection criteria
  1536.      * @param schemaPattern a schema name pattern; "" retrieves those
  1537.      * without a schema
  1538.      * @param tableNamePattern a table name pattern 
  1539.      * @return ResultSet - each row is a table privilege description
  1540.      * @exception SQLException if a database access error occurs
  1541.      * @see #getSearchStringEscape 
  1542.      */
  1543.     ResultSet getTablePrivileges(String catalog, String schemaPattern,
  1544.                 String tableNamePattern) throws SQLException;
  1545.  
  1546.     /**
  1547.      * Gets a description of a table's optimal set of columns that
  1548.      * uniquely identifies a row. They are ordered by SCOPE.
  1549.      *
  1550.      * <P>Each column description has the following columns:
  1551.      *  <OL>
  1552.      *    <LI><B>SCOPE</B> short => actual scope of result
  1553.      *      <UL>
  1554.      *      <LI> bestRowTemporary - very temporary, while using row
  1555.      *      <LI> bestRowTransaction - valid for remainder of current transaction
  1556.      *      <LI> bestRowSession - valid for remainder of current session
  1557.      *      </UL>
  1558.      *    <LI><B>COLUMN_NAME</B> String => column name
  1559.      *    <LI><B>DATA_TYPE</B> short => SQL data type from java.sql.Types
  1560.      *    <LI><B>TYPE_NAME</B> String => Data source dependent type name,
  1561.      *  for a UDT the type name is fully qualified
  1562.      *    <LI><B>COLUMN_SIZE</B> int => precision
  1563.      *    <LI><B>BUFFER_LENGTH</B> int => not used
  1564.      *    <LI><B>DECIMAL_DIGITS</B> short     => scale
  1565.      *    <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column 
  1566.      *      like an Oracle ROWID
  1567.      *      <UL>
  1568.      *      <LI> bestRowUnknown - may or may not be pseudo column
  1569.      *      <LI> bestRowNotPseudo - is NOT a pseudo column
  1570.      *      <LI> bestRowPseudo - is a pseudo column
  1571.      *      </UL>
  1572.      *  </OL>
  1573.      *
  1574.      * @param catalog a catalog name; "" retrieves those without a
  1575.      * catalog; null means drop catalog name from the selection criteria
  1576.      * @param schema a schema name; "" retrieves those without a schema
  1577.      * @param table a table name
  1578.      * @param scope the scope of interest; use same values as SCOPE
  1579.      * @param nullable include columns that are nullable?
  1580.      * @return ResultSet - each row is a column description 
  1581.      * @exception SQLException if a database access error occurs
  1582.      */
  1583.     ResultSet getBestRowIdentifier(String catalog, String schema,
  1584.         String table, int scope, boolean nullable) throws SQLException;
  1585.     
  1586.     /**
  1587.      * Indicates that the scope of the best row identifier is
  1588.      * very temporary, lasting only while the
  1589.      * row is being used.
  1590.      * A possible value for the column
  1591.      * <code>SCOPE</code>
  1592.      * in the <code>ResultSet</code> object
  1593.      * returned by the method <code>getBestRowIdentifier</code>.
  1594.      */
  1595.     int bestRowTemporary   = 0;
  1596.  
  1597.     /**
  1598.      * Indicates that the scope of the best row identifier is
  1599.      * the remainder of the current transaction.
  1600.      * A possible value for the column
  1601.      * <code>SCOPE</code>
  1602.      * in the <code>ResultSet</code> object
  1603.      * returned by the method <code>getBestRowIdentifier</code>.
  1604.      */
  1605.     int bestRowTransaction = 1;
  1606.  
  1607.     /**
  1608.      * Indicates that the scope of the best row identifier is
  1609.      * the remainder of the current session.
  1610.      * A possible value for the column
  1611.      * <code>SCOPE</code>
  1612.      * in the <code>ResultSet</code> object
  1613.      * returned by the method <code>getBestRowIdentifier</code>.
  1614.      */
  1615.     int bestRowSession     = 2;
  1616.  
  1617.     /**
  1618.      * Indicates that the best row identifier may or may not be a pseudo column.
  1619.      * A possible value for the column
  1620.      * <code>PSEUDO_COLUMN</code>
  1621.      * in the <code>ResultSet</code> object
  1622.      * returned by the method <code>getBestRowIdentifier</code>.
  1623.      */
  1624.     int bestRowUnknown    = 0;
  1625.  
  1626.     /**
  1627.      * Indicates that the best row identifier is NOT a pseudo column.
  1628.      * A possible value for the column
  1629.      * <code>PSEUDO_COLUMN</code>
  1630.      * in the <code>ResultSet</code> object
  1631.      * returned by the method <code>getBestRowIdentifier</code>.
  1632.      */
  1633.     int bestRowNotPseudo    = 1;
  1634.  
  1635.     /**
  1636.      * Indicates that the best row identifier is a pseudo column.
  1637.      * A possible value for the column
  1638.      * <code>PSEUDO_COLUMN</code>
  1639.      * in the <code>ResultSet</code> object
  1640.      * returned by the method <code>getBestRowIdentifier</code>.
  1641.      */
  1642.     int bestRowPseudo    = 2;
  1643.  
  1644.     /**
  1645.      * Gets a description of a table's columns that are automatically
  1646.      * updated when any value in a row is updated.  They are
  1647.      * unordered.
  1648.      *
  1649.      * <P>Each column description has the following columns:
  1650.      *  <OL>
  1651.      *    <LI><B>SCOPE</B> short => is not used
  1652.      *    <LI><B>COLUMN_NAME</B> String => column name
  1653.      *    <LI><B>DATA_TYPE</B> short => SQL data type from java.sql.Types
  1654.      *    <LI><B>TYPE_NAME</B> String => Data source dependent type name
  1655.      *    <LI><B>COLUMN_SIZE</B> int => precision
  1656.      *    <LI><B>BUFFER_LENGTH</B> int => length of column value in bytes
  1657.      *    <LI><B>DECIMAL_DIGITS</B> short     => scale
  1658.      *    <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column 
  1659.      *      like an Oracle ROWID
  1660.      *      <UL>
  1661.      *      <LI> versionColumnUnknown - may or may not be pseudo column
  1662.      *      <LI> versionColumnNotPseudo - is NOT a pseudo column
  1663.      *      <LI> versionColumnPseudo - is a pseudo column
  1664.      *      </UL>
  1665.      *  </OL>
  1666.      *
  1667.      * @param catalog a catalog name; "" retrieves those without a
  1668.      * catalog; null means drop catalog name from the selection criteria
  1669.      * @param schema a schema name; "" retrieves those without a schema
  1670.      * @param table a table name
  1671.      * @return ResultSet - each row is a column description 
  1672.      * @exception SQLException if a database access error occurs
  1673.      */
  1674.     ResultSet getVersionColumns(String catalog, String schema,
  1675.                 String table) throws SQLException;
  1676.     
  1677.     /**
  1678.      * Indicates that this version column may or may not be a pseudo column.
  1679.      * A possible value for the column
  1680.      * <code>PSEUDO_COLUMN</code>
  1681.      * in the <code>ResultSet</code> object
  1682.      * returned by the method <code>getVersionColumns</code>.
  1683.      */
  1684.     int versionColumnUnknown    = 0;
  1685.  
  1686.     /**
  1687.      * Indicates that this version column is NOT a pseudo column.
  1688.      * A possible value for the column
  1689.      * <code>PSEUDO_COLUMN</code>
  1690.      * in the <code>ResultSet</code> object
  1691.      * returned by the method <code>getVersionColumns</code>.
  1692.      */
  1693.     int versionColumnNotPseudo    = 1;
  1694.  
  1695.     /**
  1696.      * Indicates that this version column is a pseudo column.
  1697.      * A possible value for the column
  1698.      * <code>PSEUDO_COLUMN</code>
  1699.      * in the <code>ResultSet</code> object
  1700.      * returned by the method <code>getVersionColumns</code>.
  1701.      */
  1702.     int versionColumnPseudo    = 2;
  1703.  
  1704.     /**
  1705.      * Gets a description of a table's primary key columns.  They
  1706.      * are ordered by COLUMN_NAME.
  1707.      *
  1708.      * <P>Each primary key column description has the following columns:
  1709.      *  <OL>
  1710.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  1711.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  1712.      *    <LI><B>TABLE_NAME</B> String => table name
  1713.      *    <LI><B>COLUMN_NAME</B> String => column name
  1714.      *    <LI><B>KEY_SEQ</B> short => sequence number within primary key
  1715.      *    <LI><B>PK_NAME</B> String => primary key name (may be null)
  1716.      *  </OL>
  1717.      *
  1718.      * @param catalog a catalog name; "" retrieves those without a
  1719.      * catalog; null means drop catalog name from the selection criteria
  1720.      * @param schema a schema name; "" retrieves those
  1721.      * without a schema
  1722.      * @param table a table name
  1723.      * @return ResultSet - each row is a primary key column description 
  1724.      * @exception SQLException if a database access error occurs
  1725.      */
  1726.     ResultSet getPrimaryKeys(String catalog, String schema,
  1727.                 String table) throws SQLException;
  1728.  
  1729.     /**
  1730.      * Gets a description of the primary key columns that are
  1731.      * referenced by a table's foreign key columns (the primary keys
  1732.      * imported by a table).  They are ordered by PKTABLE_CAT,
  1733.      * PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
  1734.      *
  1735.      * <P>Each primary key column description has the following columns:
  1736.      *  <OL>
  1737.      *    <LI><B>PKTABLE_CAT</B> String => primary key table catalog 
  1738.      *      being imported (may be null)
  1739.      *    <LI><B>PKTABLE_SCHEM</B> String => primary key table schema
  1740.      *      being imported (may be null)
  1741.      *    <LI><B>PKTABLE_NAME</B> String => primary key table name
  1742.      *      being imported
  1743.      *    <LI><B>PKCOLUMN_NAME</B> String => primary key column name
  1744.      *      being imported
  1745.      *    <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be null)
  1746.      *    <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be null)
  1747.      *    <LI><B>FKTABLE_NAME</B> String => foreign key table name
  1748.      *    <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
  1749.      *    <LI><B>KEY_SEQ</B> short => sequence number within foreign key
  1750.      *    <LI><B>UPDATE_RULE</B> short => What happens to 
  1751.      *       foreign key when primary is updated:
  1752.      *      <UL>
  1753.      *      <LI> importedNoAction - do not allow update of primary 
  1754.      *               key if it has been imported
  1755.      *      <LI> importedKeyCascade - change imported key to agree 
  1756.      *               with primary key update
  1757.      *      <LI> importedKeySetNull - change imported key to NULL if 
  1758.      *               its primary key has been updated
  1759.      *      <LI> importedKeySetDefault - change imported key to default values 
  1760.      *               if its primary key has been updated
  1761.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  1762.      *                                 (for ODBC 2.x compatibility)
  1763.      *      </UL>
  1764.      *    <LI><B>DELETE_RULE</B> short => What happens to 
  1765.      *      the foreign key when primary is deleted.
  1766.      *      <UL>
  1767.      *      <LI> importedKeyNoAction - do not allow delete of primary 
  1768.      *               key if it has been imported
  1769.      *      <LI> importedKeyCascade - delete rows that import a deleted key
  1770.      *      <LI> importedKeySetNull - change imported key to NULL if 
  1771.      *               its primary key has been deleted
  1772.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  1773.      *                                 (for ODBC 2.x compatibility)
  1774.      *      <LI> importedKeySetDefault - change imported key to default if 
  1775.      *               its primary key has been deleted
  1776.      *      </UL>
  1777.      *    <LI><B>FK_NAME</B> String => foreign key name (may be null)
  1778.      *    <LI><B>PK_NAME</B> String => primary key name (may be null)
  1779.      *    <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 
  1780.      *      constraints be deferred until commit
  1781.      *      <UL>
  1782.      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
  1783.      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition 
  1784.      *      <LI> importedKeyNotDeferrable - see SQL92 for definition 
  1785.      *      </UL>
  1786.      *  </OL>
  1787.      *
  1788.      * @param catalog a catalog name; "" retrieves those without a
  1789.      * catalog; null means drop catalog name from the selection criteria
  1790.      * @param schema a schema name; "" retrieves those
  1791.      * without a schema
  1792.      * @param table a table name
  1793.      * @return ResultSet - each row is a primary key column description 
  1794.      * @exception SQLException if a database access error occurs
  1795.      * @see #getExportedKeys 
  1796.      */
  1797.     ResultSet getImportedKeys(String catalog, String schema,
  1798.                 String table) throws SQLException;
  1799.  
  1800.     /**
  1801.      * A possible value for the columns <code>UPDATE_RULE</code>
  1802.      * and <code>DELETE_RULE</code> in the
  1803.      * <code>ResultSet</code> objects returned by the methods
  1804.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1805.      * and <code>getCrossReference</code>.
  1806.      * <P>For the column <code>UPDATE_RULE</code>,
  1807.      * it indicates that
  1808.      * when the primary key is updated, the foreign key (imported key)
  1809.      * is changed to agree with it.
  1810.      * <P>For the column <code>DELETE_RULE</code>,
  1811.      * it indicates that
  1812.      * when the primary key is deleted, rows that imported that key
  1813.      * are deleted.
  1814.      */
  1815.     int importedKeyCascade    = 0;
  1816.  
  1817.     /**
  1818.      * A possible value for the columns <code>UPDATE_RULE</code>
  1819.      * and <code>DELETE_RULE</code> in the
  1820.      * <code>ResultSet</code> objects returned by the methods
  1821.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1822.      * and <code>getCrossReference</code>.
  1823.      * <P>For the column <code>UPDATE_RULE</code>, it indicates that
  1824.      * a primary key may not be updated if it has been imported by
  1825.      * another table as a foreign key.
  1826.      * <P>For the column <code>DELETE_RULE</code>, it indicates that
  1827.      * a primary key may not be deleted if it has been imported by
  1828.      * another table as a foreign key.
  1829.      */
  1830.     int importedKeyRestrict = 1;
  1831.  
  1832.     /**
  1833.      * A possible value for the columns <code>UPDATE_RULE</code>
  1834.      * and <code>DELETE_RULE</code> in the
  1835.      * <code>ResultSet</code> objects returned by the methods
  1836.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1837.      * and <code>getCrossReference</code>.
  1838.      * <P>For the columns <code>UPDATE_RULE</code>
  1839.      * and <code>DELETE_RULE</code>,
  1840.      * it indicates that
  1841.      * when the primary key is updated or deleted, the foreign key (imported key)
  1842.      * is changed to <code>NULL</code>.
  1843.      */
  1844.     int importedKeySetNull  = 2;
  1845.  
  1846.     /**
  1847.      * A possible value for the columns <code>UPDATE_RULE</code>
  1848.      * and <code>DELETE_RULE</code> in the
  1849.      * <code>ResultSet</code> objects returned by the methods
  1850.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1851.      * and <code>getCrossReference</code>.
  1852.      * <P>For the columns <code>UPDATE_RULE</code>
  1853.      * and <code>DELETE_RULE</code>,
  1854.      * it indicates that
  1855.      * if the primary key has been imported, it cannot be updated or deleted.
  1856.      */
  1857.     int importedKeyNoAction = 3;
  1858.  
  1859.     /**
  1860.      * A possible value for the columns <code>UPDATE_RULE</code>
  1861.      * and <code>DELETE_RULE</code> in the
  1862.      * <code>ResultSet</code> objects returned by the methods
  1863.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1864.      * and <code>getCrossReference</code>.
  1865.      * <P>For the columns <code>UPDATE_RULE</code>
  1866.      * and <code>DELETE_RULE</code>,
  1867.      * it indicates that
  1868.      * if the primary key is updated or deleted, the foreign key (imported key)
  1869.      * is set to the default value.
  1870.      */
  1871.     int importedKeySetDefault  = 4;
  1872.  
  1873.     /**
  1874.      * A possible value for the column <code>DEFERRABILITY</code>
  1875.      * in the
  1876.      * <code>ResultSet</code> objects returned by the methods
  1877.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1878.      * and <code>getCrossReference</code>.
  1879.      * <P>Indicates deferrability.  See SQL-92 for a definition.
  1880.      */
  1881.     int importedKeyInitiallyDeferred  = 5;
  1882.  
  1883.     /**
  1884.      * A possible value for the column <code>DEFERRABILITY</code>
  1885.      * in the
  1886.      * <code>ResultSet</code> objects returned by the methods
  1887.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1888.      * and <code>getCrossReference</code>.
  1889.      * <P>Indicates deferrability.  See SQL-92 for a definition.
  1890.      */
  1891.     int importedKeyInitiallyImmediate  = 6;
  1892.  
  1893.     /**
  1894.      * A possible value for the column <code>DEFERRABILITY</code>
  1895.      * in the
  1896.      * <code>ResultSet</code> objects returned by the methods
  1897.      * <code>getImportedKeys</code>,  <code>getExportedKeys</code>,
  1898.      * and <code>getCrossReference</code>.
  1899.      * <P>Indicates deferrability.  See SQL-92 for a definition.
  1900.      */
  1901.     int importedKeyNotDeferrable  = 7;
  1902.  
  1903.     /**
  1904.      * Gets a description of the foreign key columns that reference a
  1905.      * table's primary key columns (the foreign keys exported by a
  1906.      * table).  They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
  1907.      * FKTABLE_NAME, and KEY_SEQ.
  1908.      *
  1909.      * <P>Each foreign key column description has the following columns:
  1910.      *  <OL>
  1911.      *    <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
  1912.      *    <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be null)
  1913.      *    <LI><B>PKTABLE_NAME</B> String => primary key table name
  1914.      *    <LI><B>PKCOLUMN_NAME</B> String => primary key column name
  1915.      *    <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be null)
  1916.      *      being exported (may be null)
  1917.      *    <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be null)
  1918.      *      being exported (may be null)
  1919.      *    <LI><B>FKTABLE_NAME</B> String => foreign key table name
  1920.      *      being exported
  1921.      *    <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
  1922.      *      being exported
  1923.      *    <LI><B>KEY_SEQ</B> short => sequence number within foreign key
  1924.      *    <LI><B>UPDATE_RULE</B> short => What happens to 
  1925.      *       foreign key when primary is updated:
  1926.      *      <UL>
  1927.      *      <LI> importedNoAction - do not allow update of primary 
  1928.      *               key if it has been imported
  1929.      *      <LI> importedKeyCascade - change imported key to agree 
  1930.      *               with primary key update
  1931.      *      <LI> importedKeySetNull - change imported key to NULL if 
  1932.      *               its primary key has been updated
  1933.      *      <LI> importedKeySetDefault - change imported key to default values 
  1934.      *               if its primary key has been updated
  1935.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  1936.      *                                 (for ODBC 2.x compatibility)
  1937.      *      </UL>
  1938.      *    <LI><B>DELETE_RULE</B> short => What happens to 
  1939.      *      the foreign key when primary is deleted.
  1940.      *      <UL>
  1941.      *      <LI> importedKeyNoAction - do not allow delete of primary 
  1942.      *               key if it has been imported
  1943.      *      <LI> importedKeyCascade - delete rows that import a deleted key
  1944.      *      <LI> importedKeySetNull - change imported key to NULL if 
  1945.      *               its primary key has been deleted
  1946.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  1947.      *                                 (for ODBC 2.x compatibility)
  1948.      *      <LI> importedKeySetDefault - change imported key to default if 
  1949.      *               its primary key has been deleted
  1950.      *      </UL>
  1951.      *    <LI><B>FK_NAME</B> String => foreign key name (may be null)
  1952.      *    <LI><B>PK_NAME</B> String => primary key name (may be null)
  1953.      *    <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 
  1954.      *      constraints be deferred until commit
  1955.      *      <UL>
  1956.      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
  1957.      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition 
  1958.      *      <LI> importedKeyNotDeferrable - see SQL92 for definition 
  1959.      *      </UL>
  1960.      *  </OL>
  1961.      *
  1962.      * @param catalog a catalog name; "" retrieves those without a
  1963.      * catalog; null means drop catalog name from the selection criteria
  1964.      * @param schema a schema name; "" retrieves those
  1965.      * without a schema
  1966.      * @param table a table name
  1967.      * @return ResultSet - each row is a foreign key column description 
  1968.      * @exception SQLException if a database access error occurs
  1969.      * @see #getImportedKeys 
  1970.      */
  1971.     ResultSet getExportedKeys(String catalog, String schema,
  1972.                 String table) throws SQLException;
  1973.  
  1974.     /**
  1975.      * Gets a description of the foreign key columns in the foreign key
  1976.      * table that reference the primary key columns of the primary key
  1977.      * table (describe how one table imports another's key.) This
  1978.      * should normally return a single foreign key/primary key pair
  1979.      * (most tables only import a foreign key from a table once.)  They
  1980.      * are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
  1981.      * KEY_SEQ.
  1982.      *
  1983.      * <P>Each foreign key column description has the following columns:
  1984.      *  <OL>
  1985.      *    <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
  1986.      *    <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be null)
  1987.      *    <LI><B>PKTABLE_NAME</B> String => primary key table name
  1988.      *    <LI><B>PKCOLUMN_NAME</B> String => primary key column name
  1989.      *    <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be null)
  1990.      *      being exported (may be null)
  1991.      *    <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be null)
  1992.      *      being exported (may be null)
  1993.      *    <LI><B>FKTABLE_NAME</B> String => foreign key table name
  1994.      *      being exported
  1995.      *    <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
  1996.      *      being exported
  1997.      *    <LI><B>KEY_SEQ</B> short => sequence number within foreign key
  1998.      *    <LI><B>UPDATE_RULE</B> short => What happens to 
  1999.      *       foreign key when primary is updated:
  2000.      *      <UL>
  2001.      *      <LI> importedNoAction - do not allow update of primary 
  2002.      *               key if it has been imported
  2003.      *      <LI> importedKeyCascade - change imported key to agree 
  2004.      *               with primary key update
  2005.      *      <LI> importedKeySetNull - change imported key to NULL if 
  2006.      *               its primary key has been updated
  2007.      *      <LI> importedKeySetDefault - change imported key to default values 
  2008.      *               if its primary key has been updated
  2009.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  2010.      *                                 (for ODBC 2.x compatibility)
  2011.      *      </UL>
  2012.      *    <LI><B>DELETE_RULE</B> short => What happens to 
  2013.      *      the foreign key when primary is deleted.
  2014.      *      <UL>
  2015.      *      <LI> importedKeyNoAction - do not allow delete of primary 
  2016.      *               key if it has been imported
  2017.      *      <LI> importedKeyCascade - delete rows that import a deleted key
  2018.      *      <LI> importedKeySetNull - change imported key to NULL if 
  2019.      *               its primary key has been deleted
  2020.      *      <LI> importedKeyRestrict - same as importedKeyNoAction 
  2021.      *                                 (for ODBC 2.x compatibility)
  2022.      *      <LI> importedKeySetDefault - change imported key to default if 
  2023.      *               its primary key has been deleted
  2024.      *      </UL>
  2025.      *    <LI><B>FK_NAME</B> String => foreign key name (may be null)
  2026.      *    <LI><B>PK_NAME</B> String => primary key name (may be null)
  2027.      *    <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key 
  2028.      *      constraints be deferred until commit
  2029.      *      <UL>
  2030.      *      <LI> importedKeyInitiallyDeferred - see SQL92 for definition
  2031.      *      <LI> importedKeyInitiallyImmediate - see SQL92 for definition 
  2032.      *      <LI> importedKeyNotDeferrable - see SQL92 for definition 
  2033.      *      </UL>
  2034.      *  </OL>
  2035.      *
  2036.      * @param primaryCatalog a catalog name; "" retrieves those without a
  2037.      * catalog; null means drop catalog name from the selection criteria
  2038.      * @param primarySchema a schema name; "" retrieves those
  2039.      * without a schema
  2040.      * @param primaryTable the table name that exports the key
  2041.      * @param foreignCatalog a catalog name; "" retrieves those without a
  2042.      * catalog; null means drop catalog name from the selection criteria
  2043.      * @param foreignSchema a schema name; "" retrieves those
  2044.      * without a schema
  2045.      * @param foreignTable the table name that imports the key
  2046.      * @return ResultSet - each row is a foreign key column description 
  2047.      * @exception SQLException if a database access error occurs
  2048.      * @see #getImportedKeys 
  2049.      */
  2050.     ResultSet getCrossReference(
  2051.         String primaryCatalog, String primarySchema, String primaryTable,
  2052.         String foreignCatalog, String foreignSchema, String foreignTable
  2053.         ) throws SQLException;
  2054.  
  2055.     /**
  2056.      * Gets a description of all the standard SQL types supported by
  2057.      * this database. They are ordered by DATA_TYPE and then by how
  2058.      * closely the data type maps to the corresponding JDBC SQL type.
  2059.      *
  2060.      * <P>Each type description has the following columns:
  2061.      *  <OL>
  2062.      *    <LI><B>TYPE_NAME</B> String => Type name
  2063.      *    <LI><B>DATA_TYPE</B> short => SQL data type from java.sql.Types
  2064.      *    <LI><B>PRECISION</B> int => maximum precision
  2065.      *    <LI><B>LITERAL_PREFIX</B> String => prefix used to quote a literal 
  2066.      *      (may be null)
  2067.      *    <LI><B>LITERAL_SUFFIX</B> String => suffix used to quote a literal 
  2068.             (may be null)
  2069.      *    <LI><B>CREATE_PARAMS</B> String => parameters used in creating 
  2070.      *      the type (may be null)
  2071.      *    <LI><B>NULLABLE</B> short => can you use NULL for this type?
  2072.      *      <UL>
  2073.      *      <LI> typeNoNulls - does not allow NULL values
  2074.      *      <LI> typeNullable - allows NULL values
  2075.      *      <LI> typeNullableUnknown - nullability unknown
  2076.      *      </UL>
  2077.      *    <LI><B>CASE_SENSITIVE</B> boolean=> is it case sensitive?
  2078.      *    <LI><B>SEARCHABLE</B> short => can you use "WHERE" based on this type:
  2079.      *      <UL>
  2080.      *      <LI> typePredNone - No support
  2081.      *      <LI> typePredChar - Only supported with WHERE .. LIKE
  2082.      *      <LI> typePredBasic - Supported except for WHERE .. LIKE
  2083.      *      <LI> typeSearchable - Supported for all WHERE ..
  2084.      *      </UL>
  2085.      *    <LI><B>UNSIGNED_ATTRIBUTE</B> boolean => is it unsigned?
  2086.      *    <LI><B>FIXED_PREC_SCALE</B> boolean => can it be a money value?
  2087.      *    <LI><B>AUTO_INCREMENT</B> boolean => can it be used for an 
  2088.      *      auto-increment value?
  2089.      *    <LI><B>LOCAL_TYPE_NAME</B> String => localized version of type name 
  2090.      *      (may be null)
  2091.      *    <LI><B>MINIMUM_SCALE</B> short => minimum scale supported
  2092.      *    <LI><B>MAXIMUM_SCALE</B> short => maximum scale supported
  2093.      *    <LI><B>SQL_DATA_TYPE</B> int => unused
  2094.      *    <LI><B>SQL_DATETIME_SUB</B> int => unused
  2095.      *    <LI><B>NUM_PREC_RADIX</B> int => usually 2 or 10
  2096.      *  </OL>
  2097.      *
  2098.      * @return ResultSet - each row is a SQL type description 
  2099.      * @exception SQLException if a database access error occurs
  2100.      */
  2101.     ResultSet getTypeInfo() throws SQLException;
  2102.     
  2103.     /**
  2104.      * A possible value for column <code>NULLABLE</code> in the
  2105.      * <code>ResultSet</code> object returned by the method
  2106.      * <code>getTypeInfo</code>.
  2107.      * <p>Indicates that a <code>NULL</code> value is NOT allowed for this
  2108.      * data type.
  2109.      */
  2110.     int typeNoNulls = 0;
  2111.  
  2112.     /**
  2113.      * A possible value for column <code>NULLABLE</code> in the
  2114.      * <code>ResultSet</code> object returned by the method
  2115.      * <code>getTypeInfo</code>.
  2116.      * <p>Indicates that a <code>NULL</code> value is allowed for this
  2117.      * data type.
  2118.      */
  2119.     int typeNullable = 1;
  2120.  
  2121.     /**
  2122.      * A possible value for column <code>NULLABLE</code> in the
  2123.      * <code>ResultSet</code> object returned by the method
  2124.      * <code>getTypeInfo</code>.
  2125.      * <p>Indicates that it is not known whether a <code>NULL</code> value 
  2126.      * is allowed for this data type.
  2127.      */
  2128.     int typeNullableUnknown = 2;
  2129.  
  2130.     /**
  2131.      * A possible value for column <code>SEARCHABLE</code> in the
  2132.      * <code>ResultSet</code> object returned by the method
  2133.      * <code>getTypeInfo</code>.
  2134.      * <p>Indicates that <code>WHERE</code> search clauses are not supported
  2135.      * for this type.
  2136.      */
  2137.     int typePredNone = 0;
  2138.  
  2139.     /**
  2140.      * A possible value for column <code>SEARCHABLE</code> in the
  2141.      * <code>ResultSet</code> object returned by the method
  2142.      * <code>getTypeInfo</code>.
  2143.      * <p>Indicates that the only <code>WHERE</code> search clause that can
  2144.      * be based on this type is <code>WHERE . . .LIKE</code>.
  2145.      */
  2146.     int typePredChar = 1;
  2147.  
  2148.     /**
  2149.      * A possible value for column <code>SEARCHABLE</code> in the
  2150.      * <code>ResultSet</code> object returned by the method
  2151.      * <code>getTypeInfo</code>.
  2152.      * <p>Indicates that one can base all <code>WHERE</code> search clauses 
  2153.      * except <code>WHERE . . .LIKE</code> on this data type.
  2154.      */
  2155.     int typePredBasic = 2;
  2156.  
  2157.     /**
  2158.      * A possible value for column <code>SEARCHABLE</code> in the
  2159.      * <code>ResultSet</code> object returned by the method
  2160.      * <code>getTypeInfo</code>.
  2161.      * <p>Indicates that all <code>WHERE</code> search clauses can be 
  2162.      * based on this type.
  2163.      */
  2164.     int typeSearchable  = 3;
  2165.  
  2166.     /**
  2167.      * Gets a description of a table's indices and statistics. They are
  2168.      * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
  2169.      *
  2170.      * <P>Each index column description has the following columns:
  2171.      *  <OL>
  2172.      *    <LI><B>TABLE_CAT</B> String => table catalog (may be null)
  2173.      *    <LI><B>TABLE_SCHEM</B> String => table schema (may be null)
  2174.      *    <LI><B>TABLE_NAME</B> String => table name
  2175.      *    <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique? 
  2176.      *      false when TYPE is tableIndexStatistic
  2177.      *    <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be null); 
  2178.      *      null when TYPE is tableIndexStatistic
  2179.      *    <LI><B>INDEX_NAME</B> String => index name; null when TYPE is 
  2180.      *      tableIndexStatistic
  2181.      *    <LI><B>TYPE</B> short => index type:
  2182.      *      <UL>
  2183.      *      <LI> tableIndexStatistic - this identifies table statistics that are
  2184.      *           returned in conjuction with a table's index descriptions
  2185.      *      <LI> tableIndexClustered - this is a clustered index
  2186.      *      <LI> tableIndexHashed - this is a hashed index
  2187.      *      <LI> tableIndexOther - this is some other style of index
  2188.      *      </UL>
  2189.      *    <LI><B>ORDINAL_POSITION</B> short => column sequence number 
  2190.      *      within index; zero when TYPE is tableIndexStatistic
  2191.      *    <LI><B>COLUMN_NAME</B> String => column name; null when TYPE is 
  2192.      *      tableIndexStatistic
  2193.      *    <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending, 
  2194.      *      "D" => descending, may be null if sort sequence is not supported; 
  2195.      *      null when TYPE is tableIndexStatistic    
  2196.      *    <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then 
  2197.      *      this is the number of rows in the table; otherwise, it is the 
  2198.      *      number of unique values in the index.
  2199.      *    <LI><B>PAGES</B> int => When TYPE is  tableIndexStatisic then 
  2200.      *      this is the number of pages used for the table, otherwise it 
  2201.      *      is the number of pages used for the current index.
  2202.      *    <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.  
  2203.      *      (may be null)
  2204.      *  </OL>
  2205.      *
  2206.      * @param catalog a catalog name; "" retrieves those without a
  2207.      * catalog; null means drop catalog name from the selection criteria
  2208.      * @param schema a schema name; "" retrieves those without a schema
  2209.      * @param table a table name  
  2210.      * @param unique when true, return only indices for unique values; 
  2211.      *     when false, return indices regardless of whether unique or not 
  2212.      * @param approximate when true, result is allowed to reflect approximate 
  2213.      *     or out of data values; when false, results are requested to be 
  2214.      *     accurate
  2215.      * @return ResultSet - each row is an index column description 
  2216.      * @exception SQLException if a database access error occurs
  2217.      */
  2218.     ResultSet getIndexInfo(String catalog, String schema, String table,
  2219.             boolean unique, boolean approximate)
  2220.                     throws SQLException;
  2221.  
  2222.     /**
  2223.      * A possible value for column <code>TYPE</code> in the
  2224.      * <code>ResultSet</code> object returned by the method
  2225.      * <code>getIndexInfo</code>.
  2226.      * <P>Indicates that this column contains table statistics that
  2227.      * are returned in conjunction with a table's index descriptions.
  2228.      */
  2229.     short tableIndexStatistic = 0;
  2230.  
  2231.     /**
  2232.      * A possible value for column <code>TYPE</code> in the
  2233.      * <code>ResultSet</code> object returned by the method
  2234.      * <code>getIndexInfo</code>.
  2235.      * <P>Indicates that this table index is a clustered index.
  2236.      */
  2237.     short tableIndexClustered = 1;
  2238.  
  2239.     /**
  2240.      * A possible value for column <code>TYPE</code> in the
  2241.      * <code>ResultSet</code> object returned by the method
  2242.      * <code>getIndexInfo</code>.
  2243.      * <P>Indicates that this table index is a hashed index.
  2244.      */
  2245.     short tableIndexHashed    = 2;
  2246.  
  2247.     /**
  2248.      * A possible value for column <code>TYPE</code> in the
  2249.      * <code>ResultSet</code> object returned by the method
  2250.      * <code>getIndexInfo</code>.
  2251.      * <P>Indicates that this table index is not a clustered
  2252.      * index, a hashed index, or table statistics;
  2253.      * it is something other than these.
  2254.      */
  2255.     short tableIndexOther     = 3;
  2256.  
  2257.     //--------------------------JDBC 2.0-----------------------------
  2258.  
  2259.     /**
  2260.      * JDBC 2.0
  2261.      *
  2262.      * Does the database support the given result set type?
  2263.      *
  2264.      * @param type defined in <code>java.sql.ResultSet</code>
  2265.      * @return <code>true</code> if so; <code>false</code> otherwise 
  2266.      * @exception SQLException if a database access error occurs
  2267.      * @see Connection
  2268.      */
  2269.     boolean supportsResultSetType(int type) throws SQLException;
  2270.  
  2271.     /**
  2272.      * JDBC 2.0
  2273.      *
  2274.      * Does the database support the concurrency type in combination
  2275.      * with the given result set type?
  2276.      *
  2277.      * @param type defined in <code>java.sql.ResultSet</code>
  2278.      * @param concurrency type defined in <code>java.sql.ResultSet</code>
  2279.      * @return <code>true</code> if so; <code>false</code> otherwise 
  2280.      * @exception SQLException if a database access error occurs
  2281.      * @see Connection
  2282.      */
  2283.     boolean supportsResultSetConcurrency(int type, int concurrency)
  2284.       throws SQLException;
  2285.  
  2286.     /**
  2287.      * JDBC 2.0
  2288.      *
  2289.      * Indicates whether a result set's own updates are visible.
  2290.      *
  2291.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2292.      * @return <code>true</code> if updates are visible for the result set type;
  2293.      *        <code>false</code> otherwise
  2294.      * @exception SQLException if a database access error occurs
  2295.      */
  2296.     boolean ownUpdatesAreVisible(int type) throws SQLException;
  2297.  
  2298.     /**
  2299.      * JDBC 2.0
  2300.      *
  2301.      * Indicates whether a result set's own deletes are visible.
  2302.      *
  2303.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2304.      * @return <code>true</code> if deletes are visible for the result set type;
  2305.      *        <code>false</code> otherwise
  2306.      * @exception SQLException if a database access error occurs
  2307.      */
  2308.     boolean ownDeletesAreVisible(int type) throws SQLException;
  2309.     /**
  2310.      * JDBC 2.0
  2311.      *
  2312.      * Indicates whether a result set's own inserts are visible.
  2313.      *
  2314.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2315.      * @return <code>true</code> if inserts are visible for the result set type;
  2316.      *        <code>false</code> otherwise
  2317.      * @exception SQLException if a database access error occurs
  2318.      */
  2319.     boolean ownInsertsAreVisible(int type) throws SQLException;
  2320.  
  2321.     /**
  2322.      * JDBC 2.0
  2323.      *
  2324.      * Indicates whether updates made by others are visible.
  2325.      *
  2326.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2327.      * @return <code>true</code> if updates made by others
  2328.      * are visible for the result set type;
  2329.      *        <code>false</code> otherwise
  2330.      * @exception SQLException if a database access error occurs
  2331.      */
  2332.     boolean othersUpdatesAreVisible(int type) throws SQLException;
  2333.  
  2334.     /**
  2335.      * JDBC 2.0
  2336.      *
  2337.      * Indicates whether deletes made by others are visible.
  2338.      *
  2339.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2340.      * @return <code>true</code> if deletes made by others
  2341.      * are visible for the result set type;
  2342.      *        <code>false</code> otherwise
  2343.      * @exception SQLException if a database access error occurs
  2344.      */
  2345.     boolean othersDeletesAreVisible(int type) throws SQLException;
  2346.     /**
  2347.      * JDBC 2.0
  2348.      *
  2349.      * Indicates whether inserts made by others are visible.
  2350.      *
  2351.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2352.      * @return true if updates are visible for the result set type
  2353.      * @return <code>true</code> if inserts made by others
  2354.      * are visible for the result set type;
  2355.      *        <code>false</code> otherwise
  2356.      * @exception SQLException if a database access error occurs
  2357.      */
  2358.     boolean othersInsertsAreVisible(int type) throws SQLException;
  2359.  
  2360.     /**
  2361.      * JDBC 2.0
  2362.      *
  2363.      * Indicates whether or not a visible row update can be detected by 
  2364.      * calling the method <code>ResultSet.rowUpdated</code>.
  2365.      *
  2366.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2367.      * @return <code>true</code> if changes are detected by the result set type;
  2368.      *         <code>false</code> otherwise
  2369.      * @exception SQLException if a database access error occurs
  2370.      */
  2371.     boolean updatesAreDetected(int type) throws SQLException;
  2372.  
  2373.     /**
  2374.      * JDBC 2.0
  2375.      *
  2376.      * Indicates whether or not a visible row delete can be detected by 
  2377.      * calling ResultSet.rowDeleted().  If deletesAreDetected()
  2378.      * returns false, then deleted rows are removed from the result set.
  2379.      *
  2380.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2381.      * @return true if changes are detected by the resultset type
  2382.      * @exception SQLException if a database access error occurs
  2383.      */
  2384.     boolean deletesAreDetected(int type) throws SQLException;
  2385.  
  2386.     /**
  2387.      * JDBC 2.0
  2388.      *
  2389.      * Indicates whether or not a visible row insert can be detected
  2390.      * by calling ResultSet.rowInserted().
  2391.      *
  2392.      * @param result set type, i.e. ResultSet.TYPE_XXX
  2393.      * @return true if changes are detected by the resultset type
  2394.      * @exception SQLException if a database access error occurs
  2395.      */
  2396.     boolean insertsAreDetected(int type) throws SQLException;
  2397.  
  2398.     /**
  2399.      * JDBC 2.0
  2400.      *
  2401.      * Indicates whether the driver supports batch updates.
  2402.      * @return true if the driver supports batch updates; false otherwise
  2403.      */
  2404.     boolean supportsBatchUpdates() throws SQLException;
  2405.  
  2406.     /**
  2407.      * JDBC 2.0
  2408.      *
  2409.      * Gets a description of the user-defined types defined in a particular
  2410.      * schema.  Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, 
  2411.      * or DISTINCT.
  2412.      *
  2413.      * <P>Only types matching the catalog, schema, type name and type  
  2414.      * criteria are returned.  They are ordered by DATA_TYPE, TYPE_SCHEM 
  2415.      * and TYPE_NAME.  The type name parameter may be a fully-qualified 
  2416.      * name.  In this case, the catalog and schemaPattern parameters are
  2417.      * ignored.
  2418.      *
  2419.      * <P>Each type description has the following columns:
  2420.      *  <OL>
  2421.      *    <LI><B>TYPE_CAT</B> String => the type's catalog (may be null)
  2422.      *    <LI><B>TYPE_SCHEM</B> String => type's schema (may be null)
  2423.      *    <LI><B>TYPE_NAME</B> String => type name
  2424.      *  <LI><B>CLASS_NAME</B> String => Java class name
  2425.      *    <LI><B>DATA_TYPE</B> String => type value defined in java.sql.Types.  
  2426.      *  One of JAVA_OBJECT, STRUCT, or DISTINCT
  2427.      *    <LI><B>REMARKS</B> String => explanatory comment on the type
  2428.      *  </OL>
  2429.      *
  2430.      * <P><B>Note:</B> If the driver does not support UDTs, an empty
  2431.      * result set is returned.
  2432.      *
  2433.      * @param catalog a catalog name; "" retrieves those without a
  2434.      * catalog; null means drop catalog name from the selection criteria
  2435.      * @param schemaPattern a schema name pattern; "" retrieves those
  2436.      * without a schema
  2437.      * @param typeNamePattern a type name pattern; may be a fully-qualified
  2438.      * name
  2439.      * @param types a list of user-named types to include (JAVA_OBJECT, 
  2440.      * STRUCT, or DISTINCT); null returns all types 
  2441.      * @return ResultSet - each row is a type description
  2442.      * @exception SQLException if a database access error occurs
  2443.      */
  2444.     ResultSet getUDTs(String catalog, String schemaPattern, 
  2445.               String typeNamePattern, int[] types) 
  2446.       throws SQLException;
  2447.  
  2448.     /**
  2449.      * JDBC 2.0
  2450.      * Retrieves the connection that produced this metadata object.
  2451.      *
  2452.      * @return the connection that produced this metadata object
  2453.      */
  2454.     Connection getConnection() throws SQLException;
  2455. }
  2456.  
  2457.  
  2458.  
  2459.