Source for java.sql.DatabaseMetaData

   1: /* DatabaseMetaData.java -- Information about the database itself.
   2:    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
   3: 
   4: This file is part of GNU Classpath.
   5: 
   6: GNU Classpath is free software; you can redistribute it and/or modify
   7: it under the terms of the GNU General Public License as published by
   8: the Free Software Foundation; either version 2, or (at your option)
   9: any later version.
  10:  
  11: GNU Classpath is distributed in the hope that it will be useful, but
  12: WITHOUT ANY WARRANTY; without even the implied warranty of
  13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14: General Public License for more details.
  15: 
  16: You should have received a copy of the GNU General Public License
  17: along with GNU Classpath; see the file COPYING.  If not, write to the
  18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19: 02110-1301 USA.
  20: 
  21: Linking this library statically or dynamically with other modules is
  22: making a combined work based on this library.  Thus, the terms and
  23: conditions of the GNU General Public License cover the whole
  24: combination.
  25: 
  26: As a special exception, the copyright holders of this library give you
  27: permission to link this library with independent modules to produce an
  28: executable, regardless of the license terms of these independent
  29: modules, and to copy and distribute the resulting executable under
  30: terms of your choice, provided that you also meet, for each linked
  31: independent module, the terms and conditions of the license of that
  32: module.  An independent module is a module which is not derived from
  33: or based on this library.  If you modify this library, you may extend
  34: this exception to your version of the library, but you are not
  35: obligated to do so.  If you do not wish to do so, delete this
  36: exception statement from your version. */
  37: 
  38: package java.sql;
  39: 
  40: public interface DatabaseMetaData 
  41: {
  42:   /**
  43:    * It is unknown whether or not the procedure returns a result.
  44:    */
  45:   int procedureResultUnknown = 0;
  46: 
  47:   /**
  48:    * The procedure does not return a result.
  49:    */
  50:   int procedureNoResult = 1;
  51: 
  52:   /**
  53:    * The procedure returns a result.
  54:    */
  55:   int procedureReturnsResult = 2;
  56: 
  57:   /**
  58:    * The column type is unknown.
  59:    */
  60:   int procedureColumnUnknown = 0;
  61: 
  62:   /**
  63:    * The column type is input.
  64:    */
  65:   int procedureColumnIn = 1;
  66: 
  67:   /**
  68:    * The column type is input/output.
  69:    */
  70:   int procedureColumnInOut = 2;
  71: 
  72:   /**
  73:    * The column type is output
  74:    */
  75:   int procedureColumnOut = 4;
  76: 
  77:   /**
  78:    * The column is used for return values.
  79:    */
  80:   int procedureColumnReturn = 5;
  81: 
  82:   /**
  83:    * The column is used for storing results
  84:    */
  85:   int procedureColumnResult = 3;
  86: 
  87:   /**
  88:    * NULL values are not allowed.
  89:    */
  90:   int procedureNoNulls = 0;
  91: 
  92:   /**
  93:    * NULL values are allowed.
  94:    */
  95:   int procedureNullable = 1;
  96: 
  97:   /**
  98:    * It is unknown whether or not NULL values are allowed.
  99:    */
 100:   int procedureNullableUnknown = 2;
 101: 
 102:   /**
 103:    * The column does not allow NULL
 104:    */
 105:   int columnNoNulls = 0;
 106: 
 107:   /**
 108:    * The column does allow NULL
 109:    */
 110:   int columnNullable = 1;
 111: 
 112:   /**
 113:    * It is unknown whether or not the column allows NULL
 114:    */
 115:   int columnNullableUnknown = 2;
 116: 
 117:   /**
 118:    * The best row's scope is only guaranteed to be valid so long as the
 119:    * row is actually being used.
 120:    */
 121:   int bestRowTemporary = 0;
 122: 
 123:   /**
 124:    * The best row identifier is valid to the end of the transaction.
 125:    */
 126:   int bestRowTransaction = 1;
 127: 
 128:   /**
 129:    * The best row identifier is valid to the end of the session.
 130:    */
 131:   int bestRowSession = 2;
 132: 
 133:   /**
 134:    * The best row may or may not be a pseudo-column.
 135:    */
 136:   int bestRowUnknown = 0;
 137: 
 138:   /**
 139:    * The best row identifier is not a pseudo-column.
 140:    */
 141:   int bestRowNotPseudo = 1;
 142: 
 143:   /**
 144:    * The best row identifier is a pseudo-column.
 145:    */
 146:   int bestRowPseudo = 2;
 147: 
 148:   /**
 149:    * It is unknown whether or not the version column is a pseudo-column.
 150:    */
 151:   int versionColumnUnknown = 0;
 152: 
 153:   /**
 154:    * The version column is not a pseudo-column
 155:    */
 156:   int versionColumnNotPseudo = 1;
 157: 
 158:   /**
 159:    * The version column is a pseudo-column
 160:    */
 161:   int versionColumnPseudo = 2;
 162: 
 163:   /**
 164:    * Foreign key changes are cascaded in updates or deletes.
 165:    */
 166:   int importedKeyCascade = 0;
 167: 
 168:   /**
 169:    * Column may not be updated or deleted in use as a foreign key.
 170:    */
 171:   int importedKeyRestrict = 1;
 172: 
 173:   /**
 174:    * When primary key is updated or deleted, the foreign key is set to NULL.
 175:    */
 176:   int importedKeySetNull = 2;
 177: 
 178:   /**
 179:    * If the primary key is a foreign key, it cannot be udpated or deleted.
 180:    */
 181:   int importedKeyNoAction = 3;
 182: 
 183:   /**
 184:    * If the primary key is updated or deleted, the foreign key is set to
 185:    * a default value.
 186:    */
 187:   int importedKeySetDefault = 4;
 188: 
 189:   /**
 190:    * Wish I knew what this meant.
 191:    */
 192:   int importedKeyInitiallyDeferred = 5;
 193: 
 194:   /**
 195:    * Wish I knew what this meant.
 196:    */
 197:   int importedKeyInitiallyImmediate = 6;
 198: 
 199:   /**
 200:    * Wish I knew what this meant.
 201:    */
 202:   int importedKeyNotDeferrable = 7;
 203: 
 204:   /**
 205:    * A NULL value is not allowed for this data type.
 206:    */
 207:   int typeNoNulls = 0;
 208: 
 209:   /**
 210:    * A NULL value is allowed for this data type.
 211:    */
 212:   int typeNullable = 1;
 213: 
 214:   /**
 215:    * It is unknown whether or not NULL values are allowed for this data type.
 216:    */
 217:   int typeNullableUnknown = 2;
 218: 
 219:   /**
 220:    * Where clauses are not supported for this type.
 221:    */
 222:   int typePredNone = 0;
 223: 
 224:   /**
 225:    * Only "WHERE..LIKE" style WHERE clauses are allowed on this data type.
 226:    */
 227:   int typePredChar = 1;
 228: 
 229:   /**
 230:    * All WHERE clauses except "WHERE..LIKE" style are allowed on this data type.
 231:    */
 232:   int typePredBasic = 2;
 233: 
 234:   /**
 235:    * Any type of WHERE clause is allowed for this data type.
 236:    */
 237:   int typeSearchable = 3;
 238: 
 239:   /**
 240:    * This column contains table statistics.
 241:    */
 242:   short tableIndexStatistic = 0;
 243: 
 244:   /**
 245:    * This table index is clustered.
 246:    */
 247:   short tableIndexClustered = 1;
 248: 
 249:   /**
 250:    * This table index is hashed.
 251:    */
 252:   short tableIndexHashed = 2;
 253: 
 254:   /**
 255:    * This table index is of another type.
 256:    */
 257:   short tableIndexOther = 3;
 258: 
 259:   short attributeNoNulls = 0;
 260: 
 261:   short attributeNullable = 1;
 262: 
 263:   short attributeNullableUnknown = 2;
 264: 
 265:   int sqlStateXOpen = 1;
 266: 
 267:   int sqlStateSQL99 = 2;
 268: 
 269:   /**
 270:    * This method tests whether or not all the procedures returned by
 271:    * the <code>getProcedures</code> method can be called by this user.
 272:    *
 273:    * @return <code>true</code> if all the procedures can be called,
 274:    * <code>false</code> otherwise.
 275:    * @exception SQLException If an error occurs.
 276:    */
 277:   boolean allProceduresAreCallable() throws SQLException;
 278: 
 279:   /**
 280:    * This method tests whether or not all the table returned by the
 281:    * <code>getTables</code> method can be selected by this user.
 282:    *
 283:    * @return <code>true</code> if all the procedures can be called,
 284:    * <code>false</code> otherwise.
 285:    *
 286:    * @exception SQLException If an error occurs.
 287:    */
 288:   boolean allTablesAreSelectable() throws SQLException;
 289: 
 290:   /**
 291:    * This method returns the URL for this database.
 292:    *
 293:    * @return The URL string for this database, or <code>null</code> if it
 294:    *         is not known.
 295:    * @exception SQLException If an error occurs.
 296:    */
 297:   String getURL() throws SQLException;
 298: 
 299:   /**
 300:    * This method returns the database username for this connection.
 301:    *
 302:    * @return The database username.
 303:    * @exception SQLException If an error occurs.
 304:    */
 305:   String getUserName() throws SQLException;
 306: 
 307:   /**
 308:    * This method tests whether or not the database is in read only mode.
 309:    *
 310:    * @return <code>true</code> if the database is in read only mode,
 311:    *         <code>false</code> otherwise.
 312:    * @exception SQLException If an error occurs.
 313:    */
 314:   boolean isReadOnly() throws SQLException;
 315: 
 316:   /**
 317:    * This method tests whether or not NULL's sort as high values.
 318:    *
 319:    * @return <code>true</code> if NULL's sort as high values, <code>false</code>
 320:    *         otherwise.
 321:    * @exception SQLException If an error occurs.
 322:    */
 323:   boolean nullsAreSortedHigh() throws SQLException;
 324: 
 325:   /**
 326:    * This method tests whether or not NULL's sort as low values.
 327:    *
 328:    * @return <code>true</code> if NULL's sort as low values, <code>false</code>
 329:    * otherwise.
 330:    * @exception SQLException If an error occurs.
 331:    */
 332:   boolean nullsAreSortedLow() throws SQLException;
 333: 
 334:   /**
 335:    * This method tests whether or not NULL's sort as high values.
 336:    *
 337:    * @return <code>true</code> if NULL's sort as high values, <code>false</code>
 338:    * otherwise.
 339:    * @exception SQLException If an error occurs.
 340:    */
 341:   boolean nullsAreSortedAtStart() throws SQLException;
 342: 
 343:   /**
 344:    * This method test whether or not NULL's are sorted to the end
 345:    * of the list regardless of ascending or descending sort order.
 346:    *
 347:    * @return <code>true</code> if NULL's always sort to the end,
 348:    * <code>false</code> otherwise.
 349:    * @exception SQLException If an error occurs.
 350:    */
 351:   boolean nullsAreSortedAtEnd() throws SQLException;
 352: 
 353:   /**
 354:    * This method returns the name of the database product.
 355:    *
 356:    * @return The database product.
 357:    * @exception SQLException If an error occurs.
 358:    */
 359:   String getDatabaseProductName() throws SQLException;
 360: 
 361:   /**
 362:    * This method returns the version of the database product.
 363:    *
 364:    * @return The version of the database product.
 365:    * @exception SQLException If an error occurs.
 366:    */
 367:   String getDatabaseProductVersion() throws SQLException;
 368: 
 369:   /**
 370:    * This method returns the name of the JDBC driver.
 371:    *
 372:    * @return The name of the JDBC driver.
 373:    * @exception SQLException If an error occurs.
 374:    */
 375:   String getDriverName() throws SQLException;
 376: 
 377:   /**
 378:    * This method returns the version of the JDBC driver.
 379:    *
 380:    * @return The version of the JDBC driver.
 381:    * @exception SQLException If an error occurs.
 382:    */
 383:   String getDriverVersion() throws SQLException;
 384: 
 385:   /**
 386:    * This method returns the major version number of the JDBC driver.
 387:    *
 388:    * @return The major version number of the JDBC driver.
 389:    */
 390:   int getDriverMajorVersion();
 391: 
 392:   /**
 393:    * This method returns the minor version number of the JDBC driver.
 394:    *
 395:    * @return The minor version number of the JDBC driver.
 396:    */
 397:   int getDriverMinorVersion();
 398: 
 399:   /**
 400:    * This method tests whether or not the database uses local files to
 401:    * store tables.
 402:    *
 403:    * @return <code>true</code> if the database uses local files, 
 404:    * <code>false</code> otherwise.
 405:    *
 406:    * @exception SQLException If an error occurs.
 407:    */
 408:   boolean usesLocalFiles() throws SQLException;
 409: 
 410:   /**
 411:    * This method tests whether or not the database uses a separate file for
 412:    * each table.
 413:    *
 414:    * @return <code>true</code> if the database uses a separate file for each
 415:    * table <code>false</code> otherwise.
 416:    *
 417:    * @exception SQLException If an error occurs.
 418:    */
 419:   boolean usesLocalFilePerTable() throws SQLException;
 420: 
 421:   /**
 422:    * This method tests whether or not the database supports identifiers
 423:    * with mixed case.
 424:    *
 425:    * @return <code>true</code> if the database supports mixed case identifiers,
 426:    * <code>false</code> otherwise.
 427:    *
 428:    * @exception SQLException If an error occurs.
 429:    */
 430:   boolean supportsMixedCaseIdentifiers() throws SQLException;
 431: 
 432:   /**
 433:    * This method tests whether or not the database treats mixed case
 434:    * identifiers as all upper case.
 435:    *
 436:    * @return <code>true</code> if the database treats all identifiers as
 437:    *         upper case, <code>false</code> otherwise.
 438:    * @exception SQLException If an error occurs.
 439:    */
 440:   boolean storesUpperCaseIdentifiers() throws SQLException;
 441: 
 442:   /**
 443:    * This method tests whether or not the database treats mixed case
 444:    * identifiers as all lower case.
 445:    *
 446:    * @return <code>true</code> if the database treats all identifiers as
 447:    *         lower case, <code>false</code> otherwise.
 448:    * @exception SQLException If an error occurs.
 449:    */
 450:   boolean storesLowerCaseIdentifiers() throws SQLException;
 451: 
 452:   /**
 453:    * This method tests whether or not the database stores mixed case 
 454:    * identifers even if it treats them as case insensitive.
 455:    *
 456:    * @return <code>true</code> if the database stores mixed case identifiers,
 457:    *         <code>false</code> otherwise.
 458:    * @exception SQLException If an error occurs.
 459:    */
 460:   boolean storesMixedCaseIdentifiers() throws SQLException;
 461: 
 462:   /**
 463:    * This method tests whether or not the database supports quoted identifiers
 464:    * with mixed case.
 465:    *
 466:    * @return <code>true</code> if the database supports mixed case quoted
 467:    *         identifiers, <code>false</code> otherwise.
 468:    * @exception SQLException If an error occurs.
 469:    */
 470:   boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
 471: 
 472:   /**
 473:    * This method tests whether or not the database treats mixed case
 474:    * quoted identifiers as all upper case.
 475:    *
 476:    * @return <code>true</code> if the database treats all quoted identifiers 
 477:    *         as upper case, <code>false</code> otherwise.
 478:    * @exception SQLException If an error occurs.
 479:    */
 480:   boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
 481: 
 482:   /**
 483:    * This method tests whether or not the database treats mixed case
 484:    * quoted identifiers as all lower case.
 485:    *
 486:    * @return <code>true</code> if the database treats all quoted identifiers 
 487:    *         as lower case, <code>false</code> otherwise.
 488:    * @exception SQLException If an error occurs.
 489:    */
 490:   boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
 491: 
 492:   /**
 493:    * This method tests whether or not the database stores mixed case 
 494:    * quoted identifers even if it treats them as case insensitive.
 495:    *
 496:    * @return <code>true</code> if the database stores mixed case quoted 
 497:    *         identifiers, <code>false</code> otherwise.
 498:    * @exception SQLException If an error occurs.
 499:    */
 500:   boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
 501: 
 502:   /**
 503:    * This metohd returns the quote string for SQL identifiers.
 504:    *
 505:    * @return The quote string for SQL identifers, or a space if quoting
 506:    *         is not supported.
 507:    * @exception SQLException If an error occurs.
 508:    */
 509:   String getIdentifierQuoteString() throws SQLException;
 510: 
 511:   /**
 512:    * This method returns a comma separated list of all the SQL keywords in
 513:    * the database that are not in SQL92.
 514:    *
 515:    * @return The list of SQL keywords not in SQL92.
 516:    * @exception SQLException If an error occurs.
 517:    */
 518:   String getSQLKeywords() throws SQLException;
 519: 
 520:   /**
 521:    * This method returns a comma separated list of math functions.
 522:    *
 523:    * @return The list of math functions.
 524:    * @exception SQLException If an error occurs.
 525:    */
 526:   String getNumericFunctions() throws SQLException;
 527: 
 528:   /**
 529:    * This method returns a comma separated list of string functions.
 530:    *
 531:    * @return The list of string functions.
 532:    * @exception SQLException If an error occurs.
 533:    */
 534:   String getStringFunctions() throws SQLException;
 535: 
 536:   /**
 537:    * This method returns a comma separated list of of system functions.
 538:    *
 539:    * @return A comma separated list of system functions.
 540:    * @exception SQLException If an error occurs.
 541:    */
 542:   String getSystemFunctions() throws SQLException;
 543: 
 544:   /**
 545:    * This method returns comma separated list of time/date functions.
 546:    * 
 547:    * @return The list of time/date functions.
 548:    * @exception SQLException If an error occurs.
 549:    */
 550:   String getTimeDateFunctions() throws SQLException;
 551: 
 552:   /**
 553:    * This method returns the string used to escape wildcards in search strings.
 554:    *
 555:    * @return The string used to escape wildcards in search strings.
 556:    * @exception SQLException If an error occurs.
 557:    */
 558:   String getSearchStringEscape() throws SQLException;
 559: 
 560:   /**
 561:    * This methods returns non-standard characters that can appear in 
 562:    * unquoted identifiers.
 563:    *
 564:    * @return Non-standard characters that can appear in unquoted identifiers.
 565:    * @exception SQLException If an error occurs.
 566:    */
 567:   String getExtraNameCharacters() throws SQLException;
 568: 
 569:   /**
 570:    * This method tests whether or not the database supports
 571:    * "ALTER TABLE ADD COLUMN"
 572:    *
 573:    * @return <code>true</code> if column add supported, <code>false</code>
 574:    *         otherwise.
 575:    * @exception SQLException If an error occurs.
 576:    */
 577:   boolean supportsAlterTableWithAddColumn() throws SQLException;
 578: 
 579:   /**
 580:    * This method tests whether or not the database supports
 581:    * "ALTER TABLE DROP COLUMN"
 582:    *
 583:    * @return <code>true</code> if column drop supported, <code>false</code>
 584:    *         otherwise.
 585:    * @exception SQLException If an error occurs.
 586:    */
 587:   boolean supportsAlterTableWithDropColumn() throws SQLException;
 588: 
 589:   /**
 590:    * This method tests whether or not column aliasing is supported.
 591:    *
 592:    * @return <code>true</code> if column aliasing is supported,
 593:    *         <code>false</code> otherwise.
 594:    * @exception SQLException If an error occurs.
 595:    */
 596:   boolean supportsColumnAliasing() throws SQLException;
 597: 
 598:   /**
 599:    * This method tests whether the concatenation of a NULL and non-NULL
 600:    * value results in a NULL.  This will always be true in fully JDBC compliant
 601:    * drivers.
 602:    *
 603:    * @return <code>true</code> if concatenating NULL and a non-NULL value
 604:    *         returns a NULL, <code>false</code> otherwise.
 605:    * @exception SQLException If an error occurs.
 606:    */
 607:   boolean nullPlusNonNullIsNull() throws SQLException;
 608: 
 609:   /**
 610:    * Tests whether or not CONVERT is supported.
 611:    *
 612:    * @return <code>true</code> if CONVERT is supported, <code>false</code>
 613:    *         otherwise.
 614:    * @exception SQLException If an error occurs.
 615:    */
 616:   boolean supportsConvert() throws SQLException;
 617: 
 618:   /**
 619:    * This method tests whether or not CONVERT can be performed between the
 620:    * specified types.  The types are contants from <code>Types</code>.
 621:    *
 622:    * @param fromType The SQL type to convert from.
 623:    * @param toType The SQL type to convert to.
 624:    * @return <code>true</code> if the conversion can be performed,
 625:    *         <code>false</code> otherwise.
 626:    * @see Types
 627:    */
 628:   boolean supportsConvert(int fromType, int toType) throws
 629:       SQLException;
 630: 
 631:   /**
 632:    * This method tests whether or not table correlation names are 
 633:    * supported.  This will be always be <code>true</code> in a fully JDBC
 634:    * compliant driver.
 635:    *
 636:    * @return <code>true</code> if table correlation names are supported,
 637:    *         <code>false</code> otherwise.
 638:    * @exception SQLException If an error occurs.
 639:    */
 640:   boolean supportsTableCorrelationNames() throws SQLException;
 641: 
 642:   /**
 643:    * This method tests whether correlation names must be different from the
 644:    * name of the table.
 645:    *
 646:    * @return <code>true</code> if the correlation name must be different from
 647:    *         the table name, <code>false</code> otherwise.
 648:    * @exception SQLException If an error occurs.
 649:    */
 650:   boolean supportsDifferentTableCorrelationNames() throws SQLException;
 651: 
 652:   /**
 653:    * This method tests whether or not expressions are allowed in an
 654:    * ORDER BY lists.
 655:    *
 656:    * @return <code>true</code> if expressions are allowed in ORDER BY
 657:    *         lists, <code>false</code> otherwise.
 658:    * @exception SQLException If an error occurs.
 659:    */
 660:   boolean supportsExpressionsInOrderBy() throws SQLException;
 661: 
 662:   /**
 663:    * This method tests whether or ORDER BY on a non-selected column is
 664:    * allowed.
 665:    *
 666:    * @return <code>true</code> if a non-selected column can be used in an
 667:    *         ORDER BY, <code>false</code> otherwise.
 668:    * @exception SQLException If an error occurs.
 669:    */
 670:   boolean supportsOrderByUnrelated() throws SQLException;
 671: 
 672:   /**
 673:    * This method tests whether or not GROUP BY is supported.
 674:    *
 675:    * @return <code>true</code> if GROUP BY is supported, <code>false</code>
 676:    *         otherwise.
 677:    * @exception SQLException If an error occurs.
 678:    */
 679:   boolean supportsGroupBy() throws SQLException;
 680: 
 681:   /**
 682:    * This method tests whether GROUP BY on a non-selected column is
 683:    * allowed.
 684:    *
 685:    * @return <code>true</code> if a non-selected column can be used in a
 686:    *         GROUP BY, <code>false</code> otherwise.
 687:    * @exception SQLException If an error occurs.
 688:    */
 689:   boolean supportsGroupByUnrelated() throws SQLException;
 690: 
 691:   /**
 692:    * This method tests whether or not a GROUP BY can add columns not in the
 693:    * select if it includes all the columns in the select.
 694:    *
 695:    * @return <code>true</code> if GROUP BY an add columns provided it includes
 696:    *         all columns in the select, <code>false</code> otherwise.
 697:    * @exception SQLException If an error occurs.
 698:    */
 699:   boolean supportsGroupByBeyondSelect() throws SQLException;
 700: 
 701:   /**
 702:    * This method tests whether or not the escape character is supported in
 703:    * LIKE expressions.  A fully JDBC compliant driver will always return
 704:    * <code>true</code>.
 705:    *
 706:    * @return <code>true</code> if escapes are supported in LIKE expressions,
 707:    *         <code>false</code> otherwise.
 708:    * @exception SQLException If an error occurs.
 709:    */
 710:   boolean supportsLikeEscapeClause() throws SQLException;
 711: 
 712:   /**
 713:    * This method tests whether multiple result sets for a single statement are
 714:    * supported.
 715:    *
 716:    * @return <code>true</code> if multiple result sets are supported for a 
 717:    *         single statement, <code>false</code> otherwise.
 718:    * @exception SQLException If an error occurs.
 719:    */
 720:   boolean supportsMultipleResultSets() throws SQLException;
 721: 
 722:   /**
 723:    * This method test whether or not multiple transactions may be open
 724:    * at once, as long as they are on different connections.
 725:    *
 726:    * @return <code>true</code> if multiple transactions on different
 727:    *         connections are supported, <code>false</code> otherwise.
 728:    * @exception SQLException If an error occurs.
 729:    */
 730:   boolean supportsMultipleTransactions() throws SQLException;
 731: 
 732:   /**
 733:    * This method tests whether or not columns can be defined as NOT NULL.  A
 734:    * fully JDBC compliant driver always returns <code>true</code>.
 735:    *
 736:    * @return <code>true</code> if NOT NULL columns are supported,
 737:    *         <code>false</code> otherwise.
 738:    * @exception SQLException If an error occurs.
 739:    */
 740:   boolean supportsNonNullableColumns() throws SQLException;
 741: 
 742:   /**
 743:    * This method tests whether or not the minimum grammer for ODBC is supported.
 744:    * A fully JDBC compliant driver will always return <code>true</code>.
 745:    *
 746:    * @return <code>true</code> if the ODBC minimum grammar is supported,
 747:    *         <code>false</code> otherwise.
 748:    * @exception SQLException If an error occurs.
 749:    */
 750:   boolean supportsMinimumSQLGrammar() throws SQLException;
 751: 
 752:   /**
 753:    * This method tests whether or not the core grammer for ODBC is supported.
 754:    *
 755:    * @return <code>true</code> if the ODBC core grammar is supported,
 756:    *         <code>false</code> otherwise.
 757:    * @exception SQLException If an error occurs.
 758:    */
 759:   boolean supportsCoreSQLGrammar() throws SQLException;
 760: 
 761:   /**
 762:    * This method tests whether or not the extended grammer for ODBC is supported.
 763:    *
 764:    * @return <code>true</code> if the ODBC extended grammar is supported,
 765:    *         <code>false</code> otherwise.
 766:    * @exception SQLException If an error occurs.
 767:    */
 768:   boolean supportsExtendedSQLGrammar() throws SQLException;
 769: 
 770:   /**
 771:    * This method tests whether or not the ANSI92 entry level SQL
 772:    * grammar is supported.  A fully JDBC compliant drivers must return
 773:    * <code>true</code>.
 774:    *
 775:    * @return <code>true</code> if the ANSI92 entry level SQL grammar is
 776:    *         supported, <code>false</code> otherwise.
 777:    * @exception SQLException If an error occurs.
 778:    */
 779:   boolean supportsANSI92EntryLevelSQL() throws SQLException;
 780: 
 781:   /**
 782:    * This method tests whether or not the ANSI92 intermediate SQL
 783:    * grammar is supported.  
 784:    *
 785:    * @return <code>true</code> if the ANSI92 intermediate SQL grammar is
 786:    *         supported, <code>false</code> otherwise.
 787:    * @exception SQLException If an error occurs.
 788:    */
 789:   boolean supportsANSI92IntermediateSQL() throws SQLException;
 790: 
 791:   /**
 792:    * This method tests whether or not the ANSI92 full SQL
 793:    * grammar is supported.  
 794:    *
 795:    * @return <code>true</code> if the ANSI92 full SQL grammar is
 796:    *         supported, <code>false</code> otherwise.
 797:    * @exception SQLException If an error occurs.
 798:    */
 799:   boolean supportsANSI92FullSQL() throws SQLException;
 800: 
 801:   /**
 802:    * This method tests whether or not the SQL integrity enhancement
 803:    * facility is supported.
 804:    *
 805:    * @return <code>true</code> if the integrity enhancement facility is
 806:    *         supported, <code>false</code> otherwise.
 807:    * @exception SQLException If an error occurs.
 808:    */
 809:   boolean supportsIntegrityEnhancementFacility() throws SQLException;
 810: 
 811:   /**
 812:    * This method tests whether or not the database supports outer joins.
 813:    *
 814:    * @return <code>true</code> if outer joins are supported, <code>false</code>
 815:    *         otherwise.
 816:    * @exception SQLException If an error occurs.
 817:    */
 818:   boolean supportsOuterJoins() throws SQLException;
 819: 
 820:   /**
 821:    * This method tests whether or not the database supports full outer joins.
 822:    *
 823:    * @return <code>true</code> if full outer joins are supported, 
 824:    *         <code>false</code> otherwise.
 825:    * @exception SQLException If an error occurs.
 826:    */
 827:   boolean supportsFullOuterJoins() throws SQLException;
 828: 
 829:   /**
 830:    * This method tests whether or not the database supports limited outer joins.
 831:    *
 832:    * @return <code>true</code> if limited outer joins are supported, 
 833:    *         <code>false</code> otherwise.
 834:    * @exception SQLException If an error occurs.
 835:    */
 836:   boolean supportsLimitedOuterJoins() throws SQLException;
 837: 
 838:   /**
 839:    * This method returns the vendor's term for "schema".
 840:    *
 841:    * @return The vendor's term for schema.
 842:    * @exception SQLException if an error occurs.
 843:    */
 844:   String getSchemaTerm() throws SQLException;
 845: 
 846:   /**
 847:    * This method returns the vendor's term for "procedure".
 848:    *
 849:    * @return The vendor's term for procedure.
 850:    * @exception SQLException if an error occurs.
 851:    */
 852:   String getProcedureTerm() throws SQLException;
 853: 
 854:   /**
 855:    * This method returns the vendor's term for "catalog".
 856:    *
 857:    * @return The vendor's term for catalog.
 858:    * @exception SQLException if an error occurs.
 859:    */
 860:   String getCatalogTerm() throws SQLException;
 861: 
 862:   /**
 863:    * This method tests whether a catalog name appears at the beginning of
 864:    * a fully qualified table name.
 865:    *
 866:    * @return <code>true</code> if the catalog name appears at the beginning,
 867:    *         <code>false</code> if it appears at the end.
 868:    * @exception SQLException If an error occurs.
 869:    */
 870:   boolean isCatalogAtStart() throws SQLException;
 871: 
 872:   /**
 873:    * This method returns the separator between the catalog name and the
 874:    * table name.
 875:    *
 876:    * @return The separator between the catalog name and the table name.
 877:    * @exception SQLException If an error occurs.
 878:    */
 879:   String getCatalogSeparator() throws SQLException;
 880: 
 881:   /**
 882:    * This method tests whether a catalog name can appear in a data
 883:    * manipulation statement.
 884:    *
 885:    * @return <code>true</code> if a catalog name can appear in a data
 886:    *         manipulation statement, <code>false</code> otherwise.
 887:    * @exception SQLException If an error occurs.
 888:    */
 889:   boolean supportsSchemasInDataManipulation() throws SQLException;
 890: 
 891:   /**
 892:    * This method tests whether a catalog name can appear in a procedure
 893:    * call
 894:    *
 895:    * @return <code>true</code> if a catalog name can appear in a procedure
 896:    *         call, <code>false</code> otherwise.
 897:    * @exception SQLException If an error occurs.
 898:    */
 899:   boolean supportsSchemasInProcedureCalls() throws SQLException;
 900: 
 901:   /**
 902:    * This method tests whether a catalog name can appear in a table definition.
 903:    *
 904:    * @return <code>true</code> if a catalog name can appear in a table
 905:    *         definition, <code>false</code> otherwise.
 906:    * @exception SQLException If an error occurs.
 907:    */
 908:   boolean supportsSchemasInTableDefinitions() throws SQLException;
 909: 
 910:   /**
 911:    * This method tests whether a catalog name can appear in an index definition.
 912:    *
 913:    * @return <code>true</code> if a catalog name can appear in an index
 914:    *         definition, <code>false</code> otherwise.
 915:    * @exception SQLException If an error occurs.
 916:    */
 917:   boolean supportsSchemasInIndexDefinitions() throws SQLException;
 918: 
 919:   /**
 920:    * This method tests whether a catalog name can appear in privilege definitions.
 921:    *
 922:    * @return <code>true</code> if a catalog name can appear in privilege
 923:    *         definition, <code>false</code> otherwise.
 924:    * @exception SQLException If an error occurs.
 925:    */
 926:   boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
 927: 
 928:   /**
 929:    * This method tests whether a catalog name can appear in a data
 930:    * manipulation statement.
 931:    *
 932:    * @return <code>true</code> if a catalog name can appear in a data
 933:    *         manipulation statement, <code>false</code> otherwise.
 934:    * @exception SQLException If an error occurs.
 935:    */
 936:   boolean supportsCatalogsInDataManipulation() throws SQLException;
 937: 
 938:   /**
 939:    * This method tests whether a catalog name can appear in a procedure
 940:    * call
 941:    *
 942:    * @return <code>true</code> if a catalog name can appear in a procedure
 943:    *         call, <code>false</code> otherwise.
 944:    * @exception SQLException If an error occurs.
 945:    */
 946:   boolean supportsCatalogsInProcedureCalls() throws SQLException;
 947: 
 948:   /**
 949:    * This method tests whether a catalog name can appear in a table definition.
 950:    *
 951:    * @return <code>true</code> if a catalog name can appear in a table
 952:    *         definition, <code>false</code> otherwise.
 953:    * @exception SQLException If an error occurs.
 954:    */
 955:   boolean supportsCatalogsInTableDefinitions() throws SQLException;
 956: 
 957:   /**
 958:    * This method tests whether a catalog name can appear in an index definition.
 959:    *
 960:    * @return <code>true</code> if a catalog name can appear in an index
 961:    *         definition, <code>false</code> otherwise.
 962:    * @exception SQLException If an error occurs.
 963:    */
 964:   boolean supportsCatalogsInIndexDefinitions() throws SQLException;
 965: 
 966:   /**
 967:    * This method tests whether a catalog name can appear in privilege definitions.
 968:    *
 969:    * @return <code>true</code> if a catalog name can appear in privilege
 970:    *         definition, <code>false</code> otherwise.
 971:    * @exception SQLException If an error occurs.
 972:    */
 973:   boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
 974: 
 975:   /**
 976:    * This method tests whether or not that database supports positioned
 977:    * deletes.
 978:    *
 979:    * @return <code>true</code> if positioned deletes are supported,
 980:    *         <code>false</code> otherwise.
 981:    * @exception SQLException If an error occurs.
 982:    */
 983:   boolean supportsPositionedDelete() throws SQLException;
 984: 
 985:   /**
 986:    * This method tests whether or not that database supports positioned
 987:    * updates.
 988:    *
 989:    * @return <code>true</code> if positioned updates are supported,
 990:    *         <code>false</code> otherwise.
 991:    * @exception SQLException If an error occurs.
 992:    */
 993:   boolean supportsPositionedUpdate() throws SQLException;
 994: 
 995:   /**
 996:    * This method tests whether or not SELECT FOR UPDATE is supported by the
 997:    * database.
 998:    *
 999:    * @return <code>true</code> if SELECT FOR UPDATE is supported 
1000:    *         <code>false</code> otherwise.
1001:    * @exception SQLException If an error occurs.
1002:    */
1003:   boolean supportsSelectForUpdate() throws SQLException;
1004: 
1005:   /**
1006:    * This method tests whether or not stored procedures are supported on
1007:    * this database.
1008:    *
1009:    * @return <code>true</code> if stored procedures are supported,
1010:    *         <code>false</code> otherwise.
1011:    * @exception SQLException If an error occurs.
1012:    */
1013:   boolean supportsStoredProcedures() throws SQLException;
1014: 
1015:   /**
1016:    * This method tests whether or not subqueries are allowed in comparisons.
1017:    * A fully JDBC compliant driver will always return <code>true</code>.
1018:    *
1019:    * @return <code>true</code> if subqueries are allowed in comparisons,
1020:    *         <code>false</code> otherwise.
1021:    * @exception SQLException If an error occurs.
1022:    */
1023:   boolean supportsSubqueriesInComparisons() throws SQLException;
1024: 
1025:   /**
1026:    * This method tests whether or not subqueries are allowed in exists
1027:    * expressions.  A fully JDBC compliant driver will always return
1028:    * <code>true</code>.
1029:    *
1030:    * @return <code>true</code> if subqueries are allowed in exists 
1031:    *         expressions, <code>false</code> otherwise.
1032:    * @exception SQLException If an error occurs.
1033:    */
1034:   boolean supportsSubqueriesInExists() throws SQLException;
1035: 
1036:   /**
1037:    * This method tests whether subqueries are allowed in IN statements.
1038:    * A fully JDBC compliant driver will always return <code>true</code>.
1039:    *
1040:    * @return <code>true</code> if the driver supports subqueries in IN
1041:    *         statements, <code>false</code> otherwise.
1042:    * @exception SQLException If an error occurs.
1043:    */
1044:   boolean supportsSubqueriesInIns() throws SQLException;
1045: 
1046:   /**
1047:    * This method tests whether or not subqueries are allowed in quantified
1048:    * expressions.  A fully JDBC compliant driver will always return
1049:    * <code>true</code>.
1050:    *
1051:    * @return <code>true</code> if subqueries are allowed in quantified 
1052:    *         expressions, <code>false</code> otherwise.
1053:    * @exception SQLException If an error occurs.
1054:    */
1055:   boolean supportsSubqueriesInQuantifieds() throws SQLException;
1056: 
1057:   /**
1058:    * This method test whether or not correlated subqueries are allowed. A
1059:    * fully JDBC compliant driver will always return <code>true</code>.
1060:    *
1061:    * @return <code>true</code> if correlated subqueries are allowed,
1062:    *         <code>false</code> otherwise.
1063:    * @exception SQLException If an error occurs.
1064:    */
1065:   boolean supportsCorrelatedSubqueries() throws SQLException;
1066: 
1067:   /**
1068:    * This method tests whether or not the UNION statement is supported.
1069:    *
1070:    * @return <code>true</code> if UNION is supported, <code>false</code>
1071:    *         otherwise.
1072:    * @exception SQLException If an error occurs.
1073:    */
1074:   boolean supportsUnion() throws SQLException;
1075: 
1076:   /**
1077:    * This method tests whether or not the UNION ALL statement is supported.
1078:    *
1079:    * @return <code>true</code> if UNION ALL is supported, <code>false</code>
1080:    *         otherwise.
1081:    * @exception SQLException If an error occurs.
1082:    */
1083:   boolean supportsUnionAll() throws SQLException;
1084: 
1085:   /**
1086:    * This method tests whether or not the database supports cursors
1087:    * remaining open across commits.
1088:    *
1089:    * @return <code>true</code> if cursors can remain open across commits,
1090:    *         <code>false</code> otherwise.
1091:    * @exception SQLException If an error occurs.
1092:    */
1093:   boolean supportsOpenCursorsAcrossCommit() throws SQLException;
1094: 
1095:   /**
1096:    * This method tests whether or not the database supports cursors
1097:    * remaining open across rollbacks.
1098:    *
1099:    * @return <code>true</code> if cursors can remain open across rollbacks,
1100:    *         <code>false</code> otherwise.
1101:    * @exception SQLException If an error occurs.
1102:    */
1103:   boolean supportsOpenCursorsAcrossRollback() throws SQLException;
1104: 
1105:   /**
1106:    * This method tests whether or not the database supports statements
1107:    * remaining open across commits.
1108:    *
1109:    * @return <code>true</code> if statements can remain open across commits,
1110:    *         <code>false</code> otherwise.
1111:    * @exception SQLException If an error occurs.
1112:    */
1113:   boolean supportsOpenStatementsAcrossCommit() throws SQLException;
1114: 
1115:   /**
1116:    * This method tests whether or not the database supports statements
1117:    * remaining open across rollbacks.
1118:    *
1119:    * @return <code>true</code> if statements can remain open across rollbacks,
1120:    *         <code>false</code> otherwise.
1121:    * @exception SQLException If an error occurs.
1122:    */
1123:   boolean supportsOpenStatementsAcrossRollback() throws SQLException;
1124: 
1125:   /**
1126:    * This method returns the number of hex characters allowed in an inline
1127:    * binary literal.
1128:    *
1129:    * @return The number of hex characters allowed in a binary literal, 0 meaning
1130:    *         either an unknown or unlimited number.
1131:    * @exception SQLException If an error occurs.
1132:    */
1133:   int getMaxBinaryLiteralLength() throws SQLException;
1134: 
1135:   /**
1136:    * This method returns the maximum length of a character literal.
1137:    * 
1138:    * @return The maximum length of a character literal.
1139:    * @exception SQLException If an error occurs.
1140:    */
1141:   int getMaxCharLiteralLength() throws SQLException;
1142: 
1143:   /**
1144:    * This method returns the maximum length of a column name.
1145:    *
1146:    * @return The maximum length of a column name.
1147:    * @exception SQLException If an error occurs.
1148:    */
1149:   int getMaxColumnNameLength() throws SQLException;
1150: 
1151:   /**
1152:    * This method returns the maximum number of columns in a GROUP BY statement.
1153:    *
1154:    * @return The maximum number of columns in a GROUP BY statement.
1155:    * @exception SQLException If an error occurs.
1156:    */
1157:   int getMaxColumnsInGroupBy() throws SQLException;
1158: 
1159:   /**
1160:    * This method returns the maximum number of columns in an index.
1161:    *
1162:    * @return The maximum number of columns in an index.
1163:    * @exception SQLException If an error occurs.
1164:    */
1165:   int getMaxColumnsInIndex() throws SQLException;
1166: 
1167:   /**
1168:    * This method returns the maximum number of columns in an ORDER BY statement.
1169:    *
1170:    * @return The maximum number of columns in an ORDER BY statement.
1171:    * @exception SQLException If an error occurs.
1172:    */
1173:   int getMaxColumnsInOrderBy() throws SQLException;
1174: 
1175:   /**
1176:    * This method returns the maximum number of columns in a SELECT statement.
1177:    *
1178:    * @return The maximum number of columns in a SELECT statement.
1179:    * @exception SQLException If an error occurs.
1180:    */
1181:   int getMaxColumnsInSelect() throws SQLException;
1182: 
1183:   /**
1184:    * This method returns the maximum number of columns in a table.
1185:    *
1186:    * @return The maximum number of columns in a table.
1187:    * @exception SQLException If an error occurs.
1188:    */
1189:   int getMaxColumnsInTable() throws SQLException;
1190: 
1191:   /**
1192:    * This method returns the maximum number of connections this client
1193:    * can have to the database.
1194:    *
1195:    * @return The maximum number of database connections.
1196:    * @SQLException If an error occurs.
1197:    */
1198:   int getMaxConnections() throws SQLException;
1199: 
1200:   /**
1201:    * This method returns the maximum length of a cursor name.
1202:    *
1203:    * @return The maximum length of a cursor name.
1204:    * @exception SQLException If an error occurs.
1205:    */
1206:   int getMaxCursorNameLength() throws SQLException;
1207: 
1208:   /**
1209:    * This method returns the maximum length of an index.
1210:    *
1211:    * @return The maximum length of an index.
1212:    * @exception SQLException If an error occurs.
1213:    */
1214:   int getMaxIndexLength() throws SQLException;
1215: 
1216:   /**
1217:    * This method returns the maximum length of a schema name.
1218:    *
1219:    * @return The maximum length of a schema name.
1220:    * @exception SQLException If an error occurs.
1221:    */
1222:   int getMaxSchemaNameLength() throws SQLException;
1223: 
1224:   /**
1225:    * This method returns the maximum length of a procedure name.
1226:    *
1227:    * @return The maximum length of a procedure name.
1228:    * @exception SQLException If an error occurs.
1229:    */
1230:   int getMaxProcedureNameLength() throws SQLException;
1231: 
1232:   /**
1233:    * This method returns the maximum length of a catalog name.
1234:    *
1235:    * @return The maximum length of a catalog name.
1236:    * @exception SQLException If an error occurs.
1237:    */
1238:   int getMaxCatalogNameLength() throws SQLException;
1239: 
1240:   /**
1241:    * This method returns the maximum size of a row in bytes.
1242:    *
1243:    * @return The maximum size of a row.
1244:    * @exception SQLException If an error occurs.
1245:    */
1246:   int getMaxRowSize() throws SQLException;
1247: 
1248:   /**
1249:    * This method tests whether or not the maximum row size includes BLOB's
1250:    *
1251:    * @return <code>true</code> if the maximum row size includes BLOB's,
1252:    *         <code>false</code> otherwise.
1253:    * @exception SQLException If an error occurs.
1254:    */
1255:   boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
1256: 
1257:   /**
1258:    * This method includes the maximum length of a SQL statement.
1259:    *
1260:    * @return The maximum length of a SQL statement.
1261:    * @exception SQLException If an error occurs.
1262:    */
1263:   int getMaxStatementLength() throws SQLException;
1264: 
1265:   /**
1266:    * This method returns the maximum number of statements that can be
1267:    * active at any time.
1268:    *
1269:    * @return The maximum number of statements that can be active at any time.
1270:    * @exception SQLException If an error occurs.
1271:    */
1272:   int getMaxStatements() throws SQLException;
1273: 
1274:   /**
1275:    * This method returns the maximum length of a table name.
1276:    *
1277:    * @return The maximum length of a table name.
1278:    * @exception SQLException If an error occurs.
1279:    */
1280:   int getMaxTableNameLength() throws SQLException;
1281: 
1282:   /**
1283:    * This method returns the maximum number of tables that may be referenced
1284:    * in a SELECT statement.
1285:    *
1286:    * @return The maximum number of tables allowed in a SELECT statement.
1287:    * @exception SQLException If an error occurs.
1288:    */
1289:   int getMaxTablesInSelect() throws SQLException;
1290: 
1291:   /**
1292:    * This method returns the maximum length of a user name.
1293:    *
1294:    * @return The maximum length of a user name.
1295:    * @exception SQLException If an error occurs.
1296:    */
1297:   int getMaxUserNameLength() throws SQLException;
1298: 
1299:   /**
1300:    * This method returns the default transaction isolation level of the
1301:    * database.
1302:    *
1303:    * @return The default transaction isolation level of the database.
1304:    * @exception SQLException If an error occurs.
1305:    * @see Connection
1306:    */
1307:   int getDefaultTransactionIsolation() throws SQLException;
1308: 
1309:   /**
1310:    * This method tests whether or not the database supports transactions.
1311:    *
1312:    * @return <code>true</code> if the database supports transactions,
1313:    *         <code>false</code> otherwise.
1314:    * @exception SQLException If an error occurs.
1315:    */
1316:   boolean supportsTransactions() throws SQLException;
1317: 
1318:   /**
1319:    * This method tests whether or not the database supports the specified
1320:    * transaction isolation level.
1321:    *
1322:    * @param level The transaction isolation level.
1323:    *
1324:    * @return <code>true</code> if the specified transaction isolation level
1325:    *         is supported, <code>false</code> otherwise.
1326:    * @exception SQLException If an error occurs.
1327:    */
1328:   boolean supportsTransactionIsolationLevel(int level) throws
1329:       SQLException;
1330: 
1331:   /**
1332:    * This method tests whether or not DDL and DML statements allowed within 
1333:    * the same transaction.
1334:    *
1335:    * @return <code>true</code> if DDL and DML statements are allowed in the
1336:    *         same transaction, <code>false</code> otherwise.
1337:    * @exception SQLException If an error occurs.
1338:    */
1339:   boolean supportsDataDefinitionAndDataManipulationTransactions()
1340:       throws SQLException;
1341: 
1342:   /**
1343:    * This method tests whether or not only DML statement are allowed
1344:    * inside a transaction.
1345:    *
1346:    * @return <code>true</code> if only DML statements are allowed in
1347:    *         transactions, <code>false</code> otherwise.
1348:    * @exception SQLException If an error occurs.
1349:    */
1350:   boolean supportsDataManipulationTransactionsOnly() throws
1351:       SQLException;
1352: 
1353:   /**
1354:    * This method tests whether or not a DDL statement will cause the
1355:    * current transaction to be automatically committed.
1356:    *
1357:    * @return <code>true</code> if DDL causes an immediate transaction commit,
1358:    *         <code>false</code> otherwise.
1359:    * @exception SQLException If an error occurs.
1360:    */
1361:   boolean dataDefinitionCausesTransactionCommit() throws SQLException;
1362: 
1363:   /**
1364:    * This method tests whether or not DDL statements are ignored in
1365:    * transactions.
1366:    *
1367:    * @return <code>true</code> if DDL statements are ignored in transactions,
1368:    *         <code>false</code> otherwise.
1369:    * @exception SQLException If an error occurs.
1370:    */
1371:   boolean dataDefinitionIgnoredInTransactions() throws SQLException;
1372: 
1373:   /**
1374:    * This method returns a list of all the stored procedures matching the
1375:    * specified pattern in the given schema and catalog.  This is returned
1376:    * a <code>ResultSet</code> with the following columns:
1377:    * <p>
1378:    * <ol>
1379:    * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be 
1380:    * <code>null</code>.</li>
1381:    * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be
1382:    * <code>null</code>.</li>
1383:    * <li>PROCEDURE_NAME - The name of the procedure.</li>
1384:    * <li>Unused</li>
1385:    * <li>Unused</li>
1386:    * <li>Unused</li>
1387:    * <li>REMARKS - A description of the procedure</li>
1388:    * <li>PROCEDURE_TYPE - Indicates the return type of the procedure, which 
1389:    * is one of the contstants defined in this class 
1390:    * (<code>procedureResultUnknown</code>, <code>procedureNoResult</code>, or
1391:    * <code>procedureReturnsResult</code>).</li>
1392:    * </ol>
1393:    *
1394:    * @param catalog The name of the catalog to return stored procedured from,
1395:    *        or "" to return procedures from all catalogs.
1396:    * @param schemaPattern A schema pattern for the schemas to return stored
1397:    *        procedures from, or "" to return procedures from all schemas.
1398:    * @param namePattern The pattern of procedures names to return.
1399:    * @returns A <code>ResultSet</code> with all the requested procedures.
1400:    * @exception SQLException If an error occurs.
1401:    */
1402:   ResultSet getProcedures(String catalog, String schemaPattern, String
1403:       procedureNamePattern) throws SQLException;
1404: 
1405:   /**
1406:    * This method returns a list of the parameter and result columns for
1407:    * the requested stored procedures.  This is returned in the form of a
1408:    * <code>ResultSet</code> with the following columns:
1409:    * <p>
1410:    * <ol>
1411:    * <li>PROCEDURE_CAT - The catalog the procedure is in, which may be 
1412:    * <code>null</code>.</li>
1413:    * <li>PROCEDURE_SCHEM - The schema the procedures is in, which may be
1414:    * <code>null</code>.</li>
1415:    * <li>PROCEDURE_NAME - The name of the procedure.</li>
1416:    * <li>COLUMN_NAME - The name of the column</li>
1417:    * <li>COLUMN_TYPE - The type of the column, which will be one of the
1418:    * contants defined in this class (<code>procedureColumnUnknown</code>,
1419:    * <code>procedureColumnIn</code>, <code>procedureColumnInOut</code>,
1420:    * <code>procedureColumnOut</code>, <code>procedureColumnReturn</code>,
1421:    * or <code>procedureColumnResult</code>).</li>
1422:    * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1423:    * defined in <code>Types</code>.</li>
1424:    * <li>TYPE_NAME - The string name of the data type for this column.</li>
1425:    * <li>PRECISION - The precision of the column.</li>
1426:    * <li>LENGTH - The length of the column in bytes</li>
1427:    * <li>SCALE - The scale of the column.</li>
1428:    * <li>RADIX - The radix of the column.</li>
1429:    * <li>NULLABLE - Whether or not the column is NULLABLE.  This is one of
1430:    * the constants defined in this class (<code>procedureNoNulls</code>,
1431:    * <code>procedureNullable</code>, or <code>procedureNullableUnknown</code>)</li>
1432:    * <li>REMARKS - A description of the column.</li>
1433:    * </ol>
1434:    *
1435:    * @param catalog The name of the catalog to return stored procedured from,
1436:    *        or "" to return procedures from all catalogs.
1437:    * @param schemaPattern A schema pattern for the schemas to return stored
1438:    *        procedures from, or "" to return procedures from all schemas.
1439:    * @param namePattern The pattern of procedures names to return.
1440:    * @param columnPattern The pattern of column names to return.
1441:    * @returns A <code>ResultSet</code> with all the requested procedures.
1442:    * @exception SQLException If an error occurs.
1443:    */
1444:   ResultSet getProcedureColumns(String catalog, String schemaPattern,
1445:       String procedureNamePattern, String columnNamePattern) throws
1446:       SQLException;
1447: 
1448:   /**
1449:    * This method returns a list of the requested table as a   
1450:    * <code>ResultSet</code> with the following columns:
1451:    *
1452:    * <ol>
1453:    * <li>TABLE_CAT - The catalog the table is in, which may be <code>null</code>.</li>
1454:    * <li>TABLE_SCHEM - The schema the table is in, which may be <code>null</code>.</li>
1455:    * <li>TABLE_NAME - The name of the table.</li>
1456:    * <li>TABLE_TYPE - A string describing the table type.  This will be one
1457:    * of the values returned by the <code>getTableTypes()</code> method.</li>
1458:    * <li>REMARKS - Comments about the table.</li>
1459:    * </ol>
1460:    * 
1461:    * @param catalog The name of the catalog to return tables from,
1462:    *        or "" to return tables from all catalogs.
1463:    * @param schemaPattern A schema pattern for the schemas to return tables
1464:    *        from, or "" to return tables from all schemas.
1465:    * @param namePattern The pattern of table names to return.
1466:    * @param types The list of table types to include; null returns all types.
1467:    * @returns A <code>ResultSet</code> with all the requested tables.
1468:    * @exception SQLException If an error occurs.
1469:    */
1470:   ResultSet getTables(String catalog, String schemaPattern, String
1471:       tableNamePattern, String[] types) throws SQLException;
1472: 
1473:   /**
1474:    * This method returns the list of database schemas as a 
1475:    * <code>ResultSet</code>, with one column - TABLE_SCHEM - that is the
1476:    * name of the schema.
1477:    *
1478:    * @return A <code>ResultSet</code> with all the requested schemas.
1479:    * @exception SQLException If an error occurs.
1480:    */
1481:   ResultSet getSchemas() throws SQLException;
1482: 
1483:   /**
1484:    * This method returns the list of database catalogs as a
1485:    * <code>ResultSet</code> with one column - TABLE_CAT - that is the
1486:    * name of the catalog.
1487:    *
1488:    * @return A <code>ResultSet</code> with all the requested catalogs.
1489:    * @exception SQLException If an error occurs.
1490:    */
1491:   ResultSet getCatalogs() throws SQLException;
1492: 
1493:   /**
1494:    * This method returns the list of database table types as a
1495:    * <code>ResultSet</code> with one column - TABLE_TYPE - that is the
1496:    * name of the table type.
1497:    *
1498:    * @return A <code>ResultSet</code> with all the requested table types.
1499:    * @exception SQLException If an error occurs.
1500:    */
1501:   ResultSet getTableTypes() throws SQLException;
1502: 
1503:   /**
1504:    * This method returns a list of the tables columns for
1505:    * the requested tables.  This is returned in the form of a
1506:    * <code>ResultSet</code> with the following columns:
1507:    * <p>
1508:    * <ol>
1509:    * <li>TABLE_CAT - The catalog the table is in, which may be 
1510:    * <code>null</code>.</li>
1511:    * <li>TABLE_SCHEM - The schema the tables is in, which may be
1512:    * <code>null</code>.</li>
1513:    * <li>TABLE_NAME - The name of the table.</li>
1514:    * <li>COLUMN_NAME - The name of the column</li>
1515:    * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1516:    * defined in <code>Types</code>.</li>
1517:    * <li>TYPE_NAME - The string name of the data type for this column.</li>
1518:    * <li>COLUMN_SIZE - The size of the column.</li>
1519:    * <li>Unused</li>
1520:    * <li>NUM_PREC_RADIX - The radix of the column.</li>
1521:    * <li>NULLABLE - Whether or not the column is NULLABLE.  This is one of
1522:    * the constants defined in this class (<code>tableNoNulls</code>,
1523:    * <code>tableNullable</code>, or <code>tableNullableUnknown</code>)</li>
1524:    * <li>REMARKS - A description of the column.</li>
1525:    * <li>COLUMN_DEF - The default value for the column, may be <code>null</code>.</li>
1526:    * <li>SQL_DATA_TYPE - Unused</li>
1527:    * <li>SQL_DATETIME_SUB - Unused</li>
1528:    * <li>CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes
1529:    * in the column.</li>
1530:    * <li>ORDINAL_POSITION - The index of the column in the table.</li>
1531:    * <li>IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string
1532:    * means unknown.</li>
1533:    * </ol>
1534:    *
1535:    * @param catalog The name of the catalog to return table from,
1536:    * or "" to return tables from all catalogs.
1537:    * @param schemaPattern A schema pattern for the schemas to return 
1538:    * tables from, or "" to return tables from all schemas.
1539:    * @param namePattern The pattern of tables names to return.
1540:    * @param columnPattern The pattern of column names to return.
1541:    * @returns A <code>ResultSet</code> with all the requested tables.
1542:    * @exception SQLException If an error occurs.
1543:    */
1544:   ResultSet getColumns(String catalog, String schemaPattern, String
1545:       tableNamePattern, String columnNamePattern) throws SQLException;
1546: 
1547:   /**
1548:    * This method returns the access rights that have been granted to the
1549:    * requested columns.  This information is returned as a <code>ResultSet</code>
1550:    * with the following columns:
1551:    *
1552:    * <ol>
1553:    * <li>TABLE_CAT - The catalog the table is in, which may be 
1554:    * <code>null</code>.</li>
1555:    * <li>TABLE_SCHEM - The schema the tables is in, which may be
1556:    * <code>null</code>.</li>
1557:    * <li>TABLE_NAME - The name of the table.</li>
1558:    * <li>COLUMN_NAME - The name of the column.</li>
1559:    * <li>GRANTOR - The entity that granted the access.</li>
1560:    * <li>GRANTEE - The entity granted the access.</li>
1561:    * <li>PRIVILEGE - The name of the privilege granted.</li>
1562:    * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to
1563:    * others, "NO" if not, and <code>null</code> if unknown.</li>
1564:    * </ol>
1565:    *
1566:    * @param catalog The catalog to retrieve information from, or the empty string
1567:    *        to return entities not associated with a catalog, or <code>null</code>
1568:    *        to return information from all catalogs.
1569:    * @param schema The schema to retrieve information from, or the empty string
1570:    *        to return entities not associated with a schema.
1571:    * @param table The table name to return information for.
1572:    * @param columnPattern A pattern of column names to return information for.
1573:    * @return A <code>ResultSet</code> with all the requested privileges.
1574:    * @exception SQLException If an error occurs.
1575:    */
1576:   ResultSet getColumnPrivileges(String catalog, String schema, String
1577:       table, String columnNamePattern) throws SQLException;
1578: 
1579:   /**
1580:    * This method returns the access rights that have been granted to the
1581:    * requested tables.  This information is returned as a <code>ResultSet</code>
1582:    * with the following columns:
1583:    *
1584:    * <ol>
1585:    * <li>TABLE_CAT - The catalog the table is in, which may be 
1586:    * <code>null</code>.</li>
1587:    * <li>TABLE_SCHEM - The schema the tables is in, which may be
1588:    * <code>null</code>.</li>
1589:    * <li>TABLE_NAME - The name of the table.</li>
1590:    * <li>GRANTOR - The entity that granted the access.</li>
1591:    * <li>GRANTEE - The entity granted the access.</li>
1592:    * <li>PRIVILEGE - The name of the privilege granted.</li>
1593:    * <li>IS_GRANTABLE - "YES" if the grantee can grant the privilege to
1594:    * others, "NO" if not, and <code>null</code> if unknown.</li>
1595:    * </ol>
1596:    *
1597:    * @param catalog The catalog to retrieve information from, or the empty string
1598:    *        to return entities not associated with a catalog, or <code>null</code>
1599:    *        to return information from all catalogs.
1600:    * @param schema The schema to retrieve information from, or the empty string
1601:    *        to return entities not associated with a schema.
1602:    * @param tablePattern The table name pattern of tables to return 
1603:    *        information for.
1604:    * @return A <code>ResultSet</code> with all the requested privileges.
1605:    * @exception SQLException If an error occurs.
1606:    */
1607:   ResultSet getTablePrivileges(String catalog, String schemaPattern,
1608:       String tableNamePattern) throws SQLException;
1609: 
1610:   /**
1611:    * This method returns the best set of columns for uniquely identifying
1612:    * a row.  It returns this information as a <code>ResultSet</code> with
1613:    * the following columns:
1614:    *
1615:    * <ol>
1616:    * <li>SCOPE - The scope of the results returned.  This is one of the 
1617:    * constants defined in this class (<code>bestRowTemporary</code>,
1618:    * <code>bestRowTransaction</code>, or <code>bestRowSession</code>).</li>
1619:    * <li>COLUMN_NAME - The name of the column.</li>
1620:    * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1621:    * defined in <code>Types</code>.</li>
1622:    * <li>TYPE_NAME - The string name of the data type for this column.</li>
1623:    * <li>COLUMN_SIZE - The precision of the columns</li>
1624:    * <li>BUFFER_LENGTH - Unused</li>
1625:    * <li>DECIMAL_DIGITS - The scale of the column.</li>
1626:    * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a
1627:    * pseudo_column.  This is one of the constants defined in this class 
1628:    * (<code>bestRowUnknown</code>, <code>bestRowNotPseudo</code>, or
1629:    * <code>bestRowPseudo</code>).</li>
1630:    * </ol>
1631:    *
1632:    * @param catalog The catalog to retrieve information from, or the empty string
1633:    * to return entities not associated with a catalog, or <code>null</code>
1634:    * to return information from all catalogs.
1635:    * @param schema The schema to retrieve information from, or the empty string
1636:    * to return entities not associated with a schema.
1637:    * @param table The table name to return information for.
1638:    * @param columnPattern A pattern of column names to return information for.
1639:    * @param scope One of the best row id scope constants from this class.
1640:    * @param nullable <code>true</code> to include columns that are nullable,
1641:    * <code>false</code> otherwise.
1642:    * @return A <code>ResultSet</code> with the best row identifier.
1643:    * @exception SQLException If an error occurs.
1644:    */
1645:   ResultSet getBestRowIdentifier(String catalog, String schema,
1646:     String table, int scope, boolean nullable) throws SQLException;
1647: 
1648:   /**
1649:    * This method returns the set of columns that are automatically updated
1650:    * when the row is update. It returns this information as a 
1651:    * <code>ResultSet</code> with the following columns:
1652:    *
1653:    * <ol>
1654:    * <li>SCOPE - Unused</li>
1655:    * <li>COLUMN_NAME - The name of the column.</li>
1656:    * <li>DATA_TYPE - The SQL type of the column. This is one of the constants
1657:    * defined in <code>Types</code>.</li>
1658:    * <li>TYPE_NAME - The string name of the data type for this column.</li>
1659:    * <li>COLUMN_SIZE - The precision of the columns</li>
1660:    * <li>BUFFER_LENGTH - Unused</li>
1661:    * <li>DECIMAL_DIGITS - The scale of the column.</li>
1662:    * <li>PSEUDO_COLUMN - Whether or not the best row identifier is a
1663:    * pseudo_column.  This is one of the constants defined in this class 
1664:    * (<code>versionRowUnknown</code>, <code>versionRowNotPseudo</code>, or
1665:    * <code>versionRowPseudo</code>).</li>
1666:    * </ol>
1667:    *
1668:    * @param catalog The catalog to retrieve information from, or the empty string
1669:    *        to return entities not associated with a catalog, or <code>null</code>
1670:    *        to return information from all catalogs.
1671:    * @param schema The schema to retrieve information from, or the empty string
1672:    *        to return entities not associated with a schema.
1673:    * @param table The table name to return information for.
1674:    * @param columnPattern A pattern of column names to return information for.
1675:    * @return A <code>ResultSet</code> with the version columns.
1676:    * @exception SQLException If an error occurs.
1677:    */
1678:   ResultSet getVersionColumns(String catalog, String schema,
1679:     String table) throws SQLException;
1680: 
1681:   /**
1682:    * This method returns a list of a table's primary key columns.  These
1683:    * are returned as a <code>ResultSet</code> with the following columns.
1684:    *
1685:    * <ol>
1686:    * <li>TABLE_CAT - The catalog of the table, which may be <code>null</code>.</li>
1687:    * <li>TABLE_SCHEM - The schema of the table, which may be <code>null</code>.</li>
1688:    * <li>TABLE_NAME - The name of the table.</li>
1689:    * <li>COLUMN_NAME - The name of the column.</li>
1690:    * <li>KEY_SEQ - The sequence number of the column within the primary key.</li>
1691:    * <li>PK_NAME - The name of the primary key, which may be <code>null</code>.</li>
1692:    * </ol>
1693:    *
1694:    * @param catalog The catalog to retrieve information from, or the empty string
1695:    *        to return entities not associated with a catalog, or <code>null</code>
1696:    *        to return information from all catalogs.
1697:    * @param schema The schema to retrieve information from, or the empty string
1698:    *        to return entities not associated with a schema.
1699:    * @param table The table name to return information for.
1700:    * @param columnPattern A pattern of column names to return information for.
1701:    * @return A <code>ResultSet</code> with the primary key columns.
1702:    * @exception SQLException If an error occurs.
1703:    */
1704:   ResultSet getPrimaryKeys(String catalog, String schema, String table)
1705:       throws SQLException;
1706: 
1707:   /**
1708:    * This method returns a list of the table's foreign keys.  These are
1709:    * returned as a <code>ResultSet</code> with the following columns:
1710:    *
1711:    * <ol>
1712:    * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>
1713:    * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>
1714:    * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>
1715:    * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>
1716:    * <li>FKTABLE_CAT - The foreign key catalog name.</li>
1717:    * <li>FKTABLE_SCHEM - The foreign key schema name.</li>
1718:    * <li>FKTABLE_NAME - The foreign key table name.</li>
1719:    * <li>FKCOLUMN_NAME - The foreign key column name.</li>
1720:    * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>
1721:    * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1722:    * updated.  This is one of the constants defined in this class 
1723:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1724:    * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1725:    * <code>importedKeyRestrict</code>).</li>
1726:    * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1727:    * deleted.  This is one of the constants defined in this class 
1728:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1729:    * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)</li>
1730:    * <li>FK_NAME - The name of the foreign key.</li>
1731:    * <li>PK_NAME - The name of the primary key.</li>
1732:    * <li>DEFERRABILITY - The deferrability value.  This is one of the
1733:    * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1734:    * <code>importedKeyInitiallyImmediate</code>, or
1735:    * <code>importedKeyNotDeferrable</code>).</li>
1736:    * </ol>
1737:    *
1738:    * @param catalog The catalog to retrieve information from, or the empty string
1739:    *        to return entities not associated with a catalog, or <code>null</code>
1740:    *        to return information from all catalogs.
1741:    * @param schema The schema to retrieve information from, or the empty string
1742:    *        to return entities not associated with a schema.
1743:    * @param table The table name to return information for.
1744:    *
1745:    * @return A <code>ResultSet</code> with the foreign key columns.
1746:    *
1747:    * @exception SQLException If an error occurs.
1748:    */
1749:   ResultSet getImportedKeys(String catalog, String schema,
1750:     String table) throws SQLException;
1751: 
1752:   /**
1753:    * This method returns a list of the table's which use this table's
1754:    * primary key as a foreign key.  The information is
1755:    * returned as a <code>ResultSet</code> with the following columns:
1756:    *
1757:    * <ol>
1758:    * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>
1759:    * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>
1760:    * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>
1761:    * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>
1762:    * <li>FKTABLE_CAT - The foreign key catalog name.</li>
1763:    * <li>FKTABLE_SCHEM - The foreign key schema name.</li>
1764:    * <li>FKTABLE_NAME - The foreign key table name.</li>
1765:    * <li>FKCOLUMN_NAME - The foreign key column name.</li>
1766:    * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>
1767:    * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1768:    * updated.  This is one of the constants defined in this class 
1769:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1770:    * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1771:    * <code>importedKeyRestrict</code>).</li>
1772:    * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1773:    * deleted.  This is one of the constants defined in this class 
1774:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1775:    * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)</li>
1776:    * <li>FK_NAME - The name of the foreign key.</li>
1777:    * <li>PK_NAME - The name of the primary key.</li>
1778:    * <li>DEFERRABILITY - The deferrability value.  This is one of the
1779:    * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1780:    * <code>importedKeyInitiallyImmediate</code>, or
1781:    * <code>importedKeyNotDeferrable</code>).</li>
1782:    * </ol>
1783:    *
1784:    * @param catalog The catalog to retrieve information from, or the empty string
1785:    *        to return entities not associated with a catalog, or <code>null</code>
1786:    *        to return information from all catalogs.
1787:    * @param schema The schema to retrieve information from, or the empty string
1788:    *        to return entities not associated with a schema.
1789:    * @param table The table name to return information for.
1790:    * @return A <code>ResultSet</code> with the requested information
1791:    * @exception SQLException If an error occurs.
1792:    */
1793:   ResultSet getExportedKeys(String catalog, String schema,
1794:     String table) throws SQLException;
1795: 
1796:   /**
1797:    * This method returns a description of how one table imports another
1798:    * table's primary key as a foreign key.  The information is
1799:    * returned as a <code>ResultSet</code> with the following columns:
1800:    *
1801:    * <ol>
1802:    * <li>PKTABLE_CAT - The catalog of the table the key was imported from.</li>
1803:    * <li>PKTABLE_SCHEM - The schema of the table the key was imported from.</li>
1804:    * <li>PKTABLE_NAME - The name of the table the key was imported from.</li>
1805:    * <li>PKCOLUMN_NAME - The name of the column that was imported.</li>
1806:    * <li>FKTABLE_CAT - The foreign key catalog name.</li>
1807:    * <li>FKTABLE_SCHEM - The foreign key schema name.</li>
1808:    * <li>FKTABLE_NAME - The foreign key table name.</li>
1809:    * <li>FKCOLUMN_NAME - The foreign key column name.</li>
1810:    * <li>KEY_SEQ - The sequence number of the column within the foreign key.</li>
1811:    * <li>UPDATE_RULE - How the foreign key behaves when the primary key is
1812:    * updated.  This is one of the constants defined in this class 
1813:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1814:    * <code>importedKeySetNull</code>, <code>importedKeySetDefault</code>, or
1815:    * <code>importedKeyRestrict</code>).</li>
1816:    * <li>DELETE_RULE - How the foreign key behaves when the primary key is
1817:    * deleted.  This is one of the constants defined in this class 
1818:    * (<code>importedNoAction</code>, <code>importedKeyCascade</code>,
1819:    * <code>importedKeySetNull</code>, or <code>importedKeySetDefault</code>)</li>
1820:    * <li>FK_NAME - The name of the foreign key.</li>
1821:    * <li>PK_NAME - The name of the primary key.</li>
1822:    * <li>DEFERRABILITY - The deferrability value.  This is one of the
1823:    * constants defined in this table (<code>importedKeyInitiallyDeferred</code>,
1824:    * <code>importedKeyInitiallyImmediate</code>, or
1825:    * <code>importedKeyNotDeferrable</code>).</li>
1826:    * </ol>
1827:    *
1828:    * @param primCatalog The catalog to retrieve information from, or the empty string
1829:    *        to return entities not associated with a catalog, or <code>null</code>
1830:    *        to return information from all catalogs, on the exporting side.
1831:    * @param primSchema The schema to retrieve information from, or the empty string
1832:    *        to return entities not associated with a schema, on the exporting side.
1833:    * @param primTable The table name to return information for, on the exporting
1834:    *        side.
1835:    * @param forCatalog The catalog to retrieve information from, or the empty string
1836:    *        to return entities not associated with a catalog, or <code>null</code>
1837:    *        to return information from all catalogs, on the importing side.
1838:    * @param forSchema The schema to retrieve information from, or the empty string
1839:    *        to return entities not associated with a schema on the importing side.
1840:    * @param forTable The table name to return information for on the importing
1841:    *        side.
1842:    * @return A <code>ResultSet</code> with the requested information
1843:    * @exception SQLException If an error occurs.
1844:    */
1845:   ResultSet getCrossReference(String primaryCatalog, String
1846:     primarySchema, String primaryTable, String foreignCatalog, String
1847:     foreignSchema, String foreignTable) throws SQLException;
1848: 
1849:   /**
1850:    * This method returns a list of the SQL types supported by this
1851:    * database.  The information is returned as a <code>ResultSet</code>
1852:    * with the following columns:
1853:    *
1854:    * <ol>
1855:    * <li>TYPE_NAME - The name of the data type.</li>
1856:    * <li>DATA_TYPE - A data type constant from <code>Types</code> for this
1857:    * type.</li>
1858:    * <li>PRECISION - The maximum precision of this type.</li>
1859:    * <li>LITERAL_PREFIX - Prefix value used to quote a literal, which may be
1860:    * <code>null</code>.</li>
1861:    * <li>LITERAL_SUFFIX - Suffix value used to quote a literal, which may be
1862:    * <code>null</code>.</li>
1863:    * <li>CREATE_PARAMS - The parameters used to create the type, which may be
1864:    * <code>null</code>.</li>
1865:    * <li>NULLABLE - Whether or not this type supports NULL values.  This will
1866:    * be one of the constants defined in this interface 
1867:    * (<code>typeNoNulls</code>, <code>typeNullable</code>, or
1868:    * <code>typeNullableUnknown</code>).</li>
1869:    * <li>CASE_SENSITIVE - Whether or not the value is case sensitive.</li>
1870:    * <li>SEARCHABLE - Whether or not "LIKE" expressions are supported in
1871:    * WHERE clauses for this type.  This will be one of the constants defined
1872:    * in this interface (<code>typePredNone</code>, <code>typePredChar</code>,
1873:    * <code>typePredBasic</code>, or <code>typeSearchable</code>).</li>
1874:    * <li>UNSIGNED_ATTRIBUTE - Is the value of this type unsigned.</li>
1875:    * <li>FIXED_PREC_SCALE - Whether or not this type can be used for money.</li>
1876:    * <li>AUTO_INCREMENT - Whether or not this type supports auto-incrementing.</li>
1877:    * <li>LOCAL_TYPE_NAME - A localized name for this data type.</li>
1878:    * <li>MINIMUM_SCALE - The minimum scale supported by this type.</li>
1879:    * <li>MAXIMUM_SCALE - The maximum scale supported by this type.</li>
1880:    * <li>SQL_DATA_TYPE - Unused.</li>
1881:    * <li>SQL_DATETIME_SUB - Unused.</li>
1882:    * <li>NUM_PREC_RADIX - The radix of this data type.</li>
1883:    * </ol>
1884:    * 
1885:    * @return A <code>ResultSet</code> with the list of available data types.
1886:    * @exception SQLException If an error occurs.
1887:    */
1888:   ResultSet getTypeInfo() throws SQLException;
1889: 
1890:   /**
1891:    * This method returns information about a tables indices and statistics.
1892:    * It is returned as a <code>ResultSet</code> with the following columns:
1893:    *
1894:    * <ol>
1895:    * <li>TABLE_CAT - The catalog of the table, which may be <code>null</code>.</li>
1896:    * <li>TABLE_SCHEM - The schema of the table, which may be <code>null</code>.</li>
1897:    * <li>TABLE_NAME - The name of the table.</li>
1898:    * <li>NON_UNIQUE - Are index values non-unique?</li>
1899:    * <li>INDEX_QUALIFIER The index catalog, which may be <code>null</code></li>
1900:    * <li>INDEX_NAME - The name of the index.</li>
1901:    * <li>TYPE - The type of index, which will be one of the constants defined
1902:    * in this interface (<code>tableIndexStatistic</code>,
1903:    * <code>tableIndexClustered</code>, <code>tableIndexHashed</code>, or
1904:    * <code>tableIndexOther</code>).</li>
1905:    * <li>ORDINAL_POSITION - The sequence number of this column in the index.
1906:    * This will be 0 when the index type is <code>tableIndexStatistic</code>.</li>
1907:    * <li>COLUMN_NAME - The name of this column in the index.</li>
1908:    * <li>ASC_OR_DESC - "A" for an ascending sort sequence, "D" for a
1909:    * descending sort sequence or <code>null</code> if a sort sequence is not
1910:    * supported.</li>
1911:    * <li>CARDINALITY - The number of unique rows in the index, or the number
1912:    * of rows in the table if the index type is <code>tableIndexStatistic</code>.</li>
1913:    * <li>PAGES - The number of pages used for the index, or the number of pages
1914:    * in the table if the index type is <code>tableIndexStatistic</code>.</li>
1915:    * <li>FILTER_CONDITION - The filter condition for this index, which may be
1916:    * <code>null</code>.</li>
1917:    * </ol>
1918:    *
1919:    * @param catalog The catalog to retrieve information from, or the empty string
1920:    *        to return entities not associated with a catalog, or 
1921:    *        <code>null</code> to return information from all catalogs.
1922:    * @param schema The schema to retrieve information from, or the empty string
1923:    *        to return entities not associated with a schema.
1924:    * @param table The table name to return information for.
1925:    * @param unique <code>true</code> to return only unique indexes, 
1926:    *        <code>false</code> otherwise.
1927:    * @param approx <code>true</code> if data values can be approximations,
1928:    *        <code>false</code> otherwise.
1929:    * @return A <code>ResultSet</code> with the requested index information
1930:    * @exception SQLException If an error occurs.
1931:    */
1932:   ResultSet getIndexInfo(String catalog, String schema, String table,
1933:     boolean unique, boolean approximate) throws SQLException;
1934: 
1935:   /**
1936:    * This method tests whether or not the datbase supports the specified
1937:    * result type.
1938:    *
1939:    * @param type The desired result type, which is one of the constants
1940:    * defined in <code>ResultSet</code>.
1941:    *
1942:    * @return <code>true</code> if the result set type is supported,
1943:    * <code>false</code> otherwise.
1944:    *
1945:    * @exception SQLException If an error occurs.
1946:    *
1947:    * @see ResultSet
1948:    */
1949:   boolean supportsResultSetType(int type) throws SQLException;
1950: 
1951:   /**
1952:    * This method tests whether the specified result set type and result set
1953:    * concurrency type are supported by the database.
1954:    *
1955:    * @param type The desired result type, which is one of the constants
1956:    *        defined in <code>ResultSet</code>.
1957:    * @param concur The desired concurrency type, which is one of the constants
1958:    *        defined in <code>ResultSet</code>.
1959:    * @return <code>true</code> if the result set type is supported,
1960:    *         <code>false</code> otherwise.
1961:    * @exception SQLException If an error occurs.
1962:    * @see ResultSet
1963:    */
1964:   boolean supportsResultSetConcurrency(int type, int concurrency)
1965:       throws SQLException;
1966: 
1967:   /**
1968:    * This method tests whether or not the specified result set type sees its
1969:    * own updates.
1970:    *
1971:    * @param type The desired result type, which is one of the constants
1972:    *        defined in <code>ResultSet</code>.
1973:    * @return <code>true</code> if the result set type sees its own updates,
1974:    *         <code>false</code> otherwise.
1975:    * @exception SQLException If an error occurs.
1976:    * @see ResultSet
1977:    */
1978:   boolean ownUpdatesAreVisible(int type) throws SQLException;
1979: 
1980:  /**
1981:    * This method tests whether or not the specified result set type sees its
1982:    * own deletes.
1983:    *
1984:    * @param type The desired result type, which is one of the constants
1985:    *        defined in <code>ResultSet</code>.
1986:    * @return <code>true</code> if the result set type sees its own deletes,
1987:    *         <code>false</code> otherwise.
1988:    * @exception SQLException If an error occurs.
1989:    * @see ResultSet
1990:    */
1991:   boolean ownDeletesAreVisible(int type) throws SQLException;
1992: 
1993:   /**
1994:    * This method tests whether or not the specified result set type sees its
1995:    * own inserts.
1996:    *
1997:    * @param type The desired result type, which is one of the constants
1998:    *        defined in <code>ResultSet</code>.
1999:    * @return <code>true</code> if the result set type sees its own inserts,
2000:    *         <code>false</code> otherwise.
2001:    * @exception SQLException If an error occurs.
2002:    * @see ResultSet
2003:    */
2004:   boolean ownInsertsAreVisible(int type) throws SQLException;
2005: 
2006:   /**
2007:    * This method tests whether or not the specified result set type sees 
2008:    * updates committed by others.
2009:    *
2010:    * @param type The desired result type, which is one of the constants
2011:    *        defined in <code>ResultSet</code>.
2012:    * @return <code>true</code> if the result set type sees other updates,
2013:    *         <code>false</code> otherwise.
2014:    * @exception SQLException If an error occurs.
2015:    * @see ResultSet
2016:    */
2017:   boolean othersUpdatesAreVisible(int type) throws SQLException;
2018: 
2019:   /**
2020:    * This method tests whether or not the specified result set type sees 
2021:    * deletes committed by others.
2022:    *
2023:    * @param type The desired result type, which is one of the constants
2024:    *        defined in <code>ResultSet</code>.
2025:    * @return <code>true</code> if the result set type sees other deletes,
2026:    *         <code>false</code> otherwise.
2027:    * @exception SQLException If an error occurs.
2028:    * @see ResultSet
2029:    */
2030:   boolean othersDeletesAreVisible(int type) throws SQLException;
2031: 
2032:   /**
2033:    * This method tests whether or not the specified result set type sees 
2034:    * inserts committed by others.
2035:    *
2036:    * @param type The desired result type, which is one of the constants
2037:    *        defined in <code>ResultSet</code>.
2038:    * @return <code>true</code> if the result set type sees other inserts,
2039:    *         <code>false</code> otherwise.
2040:    * @exception SQLException If an error occurs.
2041:    * @see ResultSet
2042:    */
2043:   boolean othersInsertsAreVisible(int type) throws SQLException;
2044: 
2045:   /**
2046:    * This method tests whether or not the specified result set type can detect
2047:    * a visible update by calling the <code>rowUpdated</code> method.
2048:    *
2049:    * @param type The desired result type, which is one of the constants
2050:    *        defined in <code>ResultSet</code>.
2051:    * @return <code>true</code> if the result set type can detect visible updates
2052:    *         using <code>rowUpdated</code>, <code>false</code> otherwise.
2053:    * @exception SQLException If an error occurs.
2054:    * @see ResultSet
2055:    */
2056:   boolean updatesAreDetected(int type) throws SQLException;
2057: 
2058:   /**
2059:    * This method tests whether or not the specified result set type can detect
2060:    * a visible delete by calling the <code>rowUpdated</code> method.
2061:    *
2062:    * @param type The desired result type, which is one of the constants
2063:    *        defined in <code>ResultSet</code>.
2064:    * @return <code>true</code> if the result set type can detect visible deletes
2065:    *         using <code>rowUpdated</code>, <code>false</code> otherwise.
2066:    * @exception SQLException If an error occurs.
2067:    * @see ResultSet
2068:    */
2069:   boolean deletesAreDetected(int type) throws SQLException;
2070:   
2071:   /**
2072:    * This method tests whether or not the specified result set type can detect
2073:    * a visible insert by calling the <code>rowUpdated</code> method.
2074:    *
2075:    * @param type The desired result type, which is one of the constants
2076:    *        defined in <code>ResultSet</code>.
2077:    * @return <code>true</code> if the result set type can detect visible inserts
2078:    *         using <code>rowUpdated</code>, <code>false</code> otherwise.
2079:    * @exception SQLException If an error occurs.
2080:    * @see ResultSet
2081:    */
2082:   boolean insertsAreDetected(int type) throws SQLException;
2083: 
2084:   /**
2085:    * This method tests whether or not the database supports batch updates.
2086:    *
2087:    * @return <code>true</code> if batch updates are supported,
2088:    *         <code>false</code> otherwise.
2089:    * @exception SQLException If an error occurs.
2090:    */
2091:   boolean supportsBatchUpdates() throws SQLException;
2092: 
2093:   /**
2094:    * This method returns the list of user defined data types in use.  These
2095:    * are returned as a <code>ResultSet</code> with the following columns:
2096:    *
2097:    * <ol>
2098:    * <li>TYPE_CAT - The catalog name, which may be <code>null</code>.</li>
2099:    * <li>TYPE_SCEHM - The schema name, which may be <code>null</code>.</li>
2100:    * <li>TYPE_NAME - The user defined data type name.</li>
2101:    * <li>CLASS_NAME - The Java class name this type maps to.</li>
2102:    * <li>DATA_TYPE - A type identifier from <code>Types</code> for this type.
2103:    * This will be one of <code>JAVA_OBJECT</code>, <code>STRUCT</code>, or
2104:    * <code>DISTINCT</code>.</li>
2105:    * <li>REMARKS - Comments about this data type.</li>
2106:    * </ol>
2107:    *
2108:    * @param catalog The catalog to retrieve information from, or the empty string
2109:    *        to return entities not associated with a catalog, or <code>null</code>
2110:    *        to return information from all catalogs.
2111:    * @param schema The schema to retrieve information from, or the empty string
2112:    *        to return entities not associated with a schema.
2113:    * @param typePattern The type name pattern to match.
2114:    * @param types The type identifier patterns (from <code>Types</code>) to
2115:    *        match.
2116:    * @return A <code>ResultSet</code> with the requested type information
2117:    * @exception SQLException If an error occurs.
2118:    */
2119:   ResultSet getUDTs(String catalog, String schemaPattern, String
2120:       typeNamePattern, int[] types) throws SQLException;
2121: 
2122:   /**
2123:    * This method returns the <code>Connection</code> object that was used
2124:    * to generate the metadata in this object.
2125:    *
2126:    * @return The connection for this object.
2127:    * @exception SQLException If an error occurs.
2128:    */
2129:   Connection getConnection() throws SQLException;
2130: 
2131:   /**
2132:    * @since 1.4
2133:    */
2134:   boolean supportsSavepoints() throws SQLException;
2135: 
2136:   /**
2137:    * @since 1.4
2138:    */
2139:   boolean supportsNamedParameters() throws SQLException;
2140: 
2141:   /**
2142:    * @since 1.4
2143:    */
2144:   boolean supportsMultipleOpenResults() throws SQLException;
2145: 
2146:   /**
2147:    * @since 1.4
2148:    */
2149:   boolean supportsGetGeneratedKeys() throws SQLException;
2150: 
2151:   /**
2152:    * @since 1.4
2153:    */
2154:   ResultSet getSuperTypes(String catalog, String schemaPattern,
2155:     String typeNamePattern) throws SQLException;
2156: 
2157:   /**
2158:    * @since 1.4
2159:    */
2160:   ResultSet getSuperTables(String catalog, String schemaPattern,
2161:     String tableNamePattern) throws SQLException;
2162: 
2163:   /**
2164:    * @since 1.4
2165:    */
2166:   ResultSet getAttributes(String catalog, String schemaPattern, String
2167:     typeNamePattern, String attributeNamePattern) throws SQLException;
2168: 
2169:   /**
2170:    * @since 1.4
2171:    */
2172:   boolean supportsResultSetHoldability(int holdability)
2173:     throws SQLException;
2174: 
2175:   /**
2176:    * @since 1.4
2177:    */
2178:   int getResultSetHoldability() throws SQLException;
2179: 
2180:   /**
2181:    * @since 1.4
2182:    */
2183:   int getDatabaseMajorVersion() throws SQLException;
2184: 
2185:   /**
2186:    * @since 1.4
2187:    */
2188:   int getDatabaseMinorVersion() throws SQLException;
2189: 
2190:   /**
2191:    * @since 1.4
2192:    */
2193:   int getJDBCMajorVersion() throws SQLException;
2194: 
2195:   /**
2196:    * @since 1.4
2197:    */
2198:   int getJDBCMinorVersion() throws SQLException;
2199: 
2200:   /**
2201:    * @since 1.4
2202:    */
2203:   int getSQLStateType() throws SQLException;
2204: 
2205:   /**
2206:    * @since 1.4
2207:    */
2208:   boolean locatorsUpdateCopy() throws SQLException;
2209: 
2210:   /**
2211:    * @since 1.4
2212:    */
2213:   boolean supportsStatementPooling() throws SQLException;
2214: }