home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / DatabaseMetaData.java < prev    next >
Text File  |  1997-05-20  |  75KB  |  2,026 lines

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