1 30 package com.genimen.djeneric.jdbc; 31 32 import java.math.BigDecimal ; 33 import java.sql.Connection ; 34 import java.sql.DatabaseMetaData ; 35 import java.sql.ResultSet ; 36 import java.sql.SQLException ; 37 38 import com.genimen.djeneric.repository.DjDomain; 39 import com.genimen.djeneric.repository.DjExtent; 40 import com.genimen.djeneric.repository.DjProperty; 41 import com.genimen.djeneric.repository.DjPropertyType; 42 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException; 43 import com.genimen.djeneric.repository.rdbms.RdbmsPersistenceManager; 44 import com.genimen.djeneric.util.DjLogger; 45 46 50 51 public class DjDatabaseMetaData implements DatabaseMetaData 52 { 53 private DjConnection _connection = null; 54 private static final DjResultSet EMPTY_RESULTSET = new DjResultSet(); 55 56 private final static boolean REQUIRED = true; 57 private final static boolean OPTIONAL = false; 58 private final static DjPropertyType STRING = new DjDomain("String", DjDomain.STRING_TYPE, 10, 0, "", "", 59 false); 60 61 private static DjProperty GT_TCAT; 63 private static DjProperty GT_TSCHEM; 64 private static DjProperty GT_TNAME; 65 private static DjProperty GT_TTYPE; 66 private static DjProperty GT_TREMARKS; 67 static 68 { 69 try 70 { 71 77 GT_TCAT = new DjProperty("TABLE_CAT", "", "", "", STRING, OPTIONAL, 1, null, ""); 78 GT_TSCHEM = new DjProperty("TABLE_SCHEM", "", "", "", STRING, OPTIONAL, 2, null, ""); 79 GT_TNAME = new DjProperty("TABLE_NAME", "", "", "", STRING, REQUIRED, 3, null, ""); 80 GT_TTYPE = new DjProperty("TABLE_TYPE", "", "", "", STRING, REQUIRED, 4, null, ""); 81 GT_TREMARKS = new DjProperty("REMARKS", "", "", "", STRING, OPTIONAL, 5, null, ""); 82 } 83 catch (Exception ee) 84 { 85 DjLogger.log(ee); 86 } 87 } 88 89 private static DjProperty GTT_TTYPE; 91 static 92 { 93 try 94 { 95 GTT_TTYPE = new DjProperty("TABLE_TYPE", "", "", "", STRING, REQUIRED, 1, null, ""); 96 } 97 catch (Exception ee) 98 { 99 DjLogger.log(ee); 100 } 101 } 102 103 private static DjProperty GC_TABLE_CAT; 105 private static DjProperty GC_TABLE_SCHEM; 106 private static DjProperty GC_TABLE_NAME; 107 private static DjProperty GC_COLUMN_NAME; 108 private static DjProperty GC_DATA_TYPE; 109 private static DjProperty GC_TYPE_NAME; 110 private static DjProperty GC_COLUMN_SIZE; 111 private static DjProperty GC_BUFFER_LENGTH; 112 private static DjProperty GC_DECIMAL_DIGITS; 113 private static DjProperty GC_NUM_PREC_RADIX; 114 private static DjProperty GC_NULLABLE; 115 private static DjProperty GC_REMARKS; 116 private static DjProperty GC_COLUMN_DEF; 117 private static DjProperty GC_SQL_DATA_TYPE; 118 private static DjProperty GC_SQL_DATATIME_SUB; 119 private static DjProperty GC_CHAR_OCTET_LENGTH; 120 private static DjProperty GC_ORDINAL_POSITION; 121 private static DjProperty GC_IS_NULLABLE = null; 122 123 static 124 { 125 try 126 { 127 GC_TABLE_CAT = new DjProperty("TABLE_CAT", "", "", "", STRING, OPTIONAL, 1, null, ""); 128 GC_TABLE_SCHEM = new DjProperty("TABLE_SCHEM", "", "", "", STRING, OPTIONAL, 1, null, ""); 129 GC_TABLE_NAME = new DjProperty("TABLE_NAME", "", "", "", STRING, OPTIONAL, 1, null, ""); 130 GC_COLUMN_NAME = new DjProperty("COLUMN_NAME", "", "", "", STRING, OPTIONAL, 1, null, ""); 131 GC_DATA_TYPE = new DjProperty("DATA_TYPE", "", "", "", STRING, OPTIONAL, 1, null, ""); 132 GC_TYPE_NAME = new DjProperty("TYPE_NAME", "", "", "", STRING, OPTIONAL, 1, null, ""); 133 GC_COLUMN_SIZE = new DjProperty("COLUMN_SIZE", "", "", "", STRING, OPTIONAL, 1, null, ""); 134 GC_BUFFER_LENGTH = new DjProperty("BUFFER_LENGTH", "", "", "", STRING, OPTIONAL, 1, null, ""); 135 GC_DECIMAL_DIGITS = new DjProperty("DECIMAL_DIGITS", "", "", "", STRING, OPTIONAL, 1, null, ""); 136 GC_NUM_PREC_RADIX = new DjProperty("NUM_PREC_RADIX", "", "", "", STRING, OPTIONAL, 1, null, ""); 137 GC_NULLABLE = new DjProperty("NULLABLE", "", "", "", STRING, OPTIONAL, 1, null, ""); 138 GC_REMARKS = new DjProperty("REMARKS", "", "", "", STRING, OPTIONAL, 1, null, ""); 139 GC_COLUMN_DEF = new DjProperty("COLUMN_DEF", "", "", "", STRING, OPTIONAL, 1, null, ""); 140 GC_SQL_DATA_TYPE = new DjProperty("SQL_DATA_TYPE", "", "", "", STRING, OPTIONAL, 1, null, ""); 141 GC_SQL_DATATIME_SUB = new DjProperty("SQL_DATATIME_SUB", "", "", "", STRING, OPTIONAL, 1, null, ""); 142 GC_CHAR_OCTET_LENGTH = new DjProperty("CHAR_OCTET_LENGTH", "", "", "", STRING, OPTIONAL, 1, null, ""); 143 GC_ORDINAL_POSITION = new DjProperty("ORDINAL_POSITION", "", "", "", STRING, OPTIONAL, 1, null, ""); 144 GC_IS_NULLABLE = new DjProperty("IS_NULLABLE", "", "", "", STRING, OPTIONAL, 1, null, ""); 145 } 146 catch (Exception ee) 147 { 148 DjLogger.log(ee); 149 } 150 } 151 152 153 DjDatabaseMetaData(DjConnection p_con) throws SQLException 154 { 155 _connection = p_con; 156 } 157 158 public boolean allProceduresAreCallable() throws SQLException 159 { 160 return false; 161 } 162 163 public boolean allTablesAreSelectable() throws SQLException 164 { 165 return true; 166 } 167 168 public String getURL() throws SQLException 169 { 170 return null; 171 } 172 173 public String getUserName() throws SQLException 174 { 175 return ""; 176 } 177 178 public boolean isReadOnly() throws SQLException 179 { 180 return true; 181 } 182 183 public boolean nullsAreSortedHigh() throws SQLException 184 { 185 return false; 186 } 187 188 public boolean nullsAreSortedLow() throws SQLException 189 { 190 return true; 191 } 192 193 public boolean nullsAreSortedAtStart() throws SQLException 194 { 195 return false; 196 } 197 198 public boolean nullsAreSortedAtEnd() throws SQLException 199 { 200 return false; 201 } 202 203 public String getDatabaseProductName() throws SQLException 204 { 205 return "djeneric"; 206 } 207 208 public String getDatabaseProductVersion() throws SQLException 209 { 210 return "1/0"; 211 } 212 213 public String getDriverName() throws SQLException 214 { 215 return DjDriver.CLASSNAME; 216 } 217 218 public String getDriverVersion() throws SQLException 219 { 220 return DjDriver.MAJOR_VERSION + "." + DjDriver.MINOR_VERSION; 221 } 222 223 public int getDriverMajorVersion() 224 { 225 return DjDriver.MAJOR_VERSION; 226 } 227 228 public int getDriverMinorVersion() 229 { 230 return DjDriver.MINOR_VERSION; 231 } 232 233 public boolean usesLocalFiles() throws SQLException 234 { 235 return false; 237 } 238 239 public boolean usesLocalFilePerTable() throws SQLException 240 { 241 return false; 242 } 243 244 public boolean supportsMixedCaseIdentifiers() throws SQLException 245 { 246 return false; 247 } 248 249 public boolean storesUpperCaseIdentifiers() throws SQLException 250 { 251 return true; 252 } 253 254 public boolean storesLowerCaseIdentifiers() throws SQLException 255 { 256 return false; 257 } 258 259 public boolean storesMixedCaseIdentifiers() throws SQLException 260 { 261 return false; 262 } 263 264 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException 265 { 266 return false; 267 } 268 269 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException 270 { 271 return false; 272 } 273 274 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException 275 { 276 return false; 277 } 278 279 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException 280 { 281 return false; 282 } 283 284 public String getIdentifierQuoteString() throws SQLException 285 { 286 return "\""; 287 } 288 289 public String getSQLKeywords() throws SQLException 290 { 291 return ""; 292 } 293 294 public String getNumericFunctions() throws SQLException 295 { 296 return ""; 297 } 298 299 public String getStringFunctions() throws SQLException 300 { 301 return ""; 302 } 303 304 public String getSystemFunctions() throws SQLException 305 { 306 return ""; 307 } 308 309 public String getTimeDateFunctions() throws SQLException 310 { 311 return ""; 312 } 313 314 public String getSearchStringEscape() throws SQLException 315 { 316 return ""; 317 } 318 319 public String getExtraNameCharacters() throws SQLException 320 { 321 return ""; 322 } 323 324 public boolean supportsAlterTableWithAddColumn() throws SQLException 325 { 326 return false; 327 } 328 329 public boolean supportsAlterTableWithDropColumn() throws SQLException 330 { 331 return false; 332 } 333 334 public boolean supportsColumnAliasing() throws SQLException 335 { 336 return true; 337 } 338 339 public boolean nullPlusNonNullIsNull() throws SQLException 340 { 341 return true; 342 } 343 344 public boolean supportsConvert() throws SQLException 345 { 346 return false; 347 } 348 349 public boolean supportsConvert(int fromType, int toType) throws SQLException 350 { 351 return false; 352 } 353 354 public boolean supportsTableCorrelationNames() throws SQLException 355 { 356 return true; 357 } 358 359 public boolean supportsDifferentTableCorrelationNames() throws SQLException 360 { 361 return true; 362 } 363 364 public boolean supportsExpressionsInOrderBy() throws SQLException 365 { 366 return false; 367 } 368 369 public boolean supportsOrderByUnrelated() throws SQLException 370 { 371 return false; 372 } 373 374 public boolean supportsGroupBy() throws SQLException 375 { 376 return true; 377 } 378 379 public boolean supportsGroupByUnrelated() throws SQLException 380 { 381 return false; 382 } 383 384 public boolean supportsGroupByBeyondSelect() throws SQLException 385 { 386 return false; 387 } 388 389 public boolean supportsLikeEscapeClause() throws SQLException 390 { 391 return true; 392 } 393 394 public boolean supportsMultipleResultSets() throws SQLException 395 { 396 return true; 397 } 398 399 public boolean supportsMultipleTransactions() throws SQLException 400 { 401 return false; 402 } 403 404 public boolean supportsNonNullableColumns() throws SQLException 405 { 406 return true; 407 } 408 409 public boolean supportsMinimumSQLGrammar() throws SQLException 410 { 411 return true; 412 } 413 414 public boolean supportsCoreSQLGrammar() throws SQLException 415 { 416 return true; 417 } 418 419 public boolean supportsExtendedSQLGrammar() throws SQLException 420 { 421 return false; 422 } 423 424 public boolean supportsANSI92EntryLevelSQL() throws SQLException 425 { 426 return false; 427 } 428 429 public boolean supportsANSI92IntermediateSQL() throws SQLException 430 { 431 return false; 432 } 433 434 public boolean supportsANSI92FullSQL() throws SQLException 435 { 436 return false; 437 } 438 439 public boolean supportsIntegrityEnhancementFacility() throws SQLException 440 { 441 return false; 442 } 443 444 public boolean supportsOuterJoins() throws SQLException 445 { 446 return false; 447 } 448 449 public boolean supportsFullOuterJoins() throws SQLException 450 { 451 return false; 452 } 453 454 public boolean supportsLimitedOuterJoins() throws SQLException 455 { 456 return false; 457 } 458 459 public String getSchemaTerm() throws SQLException 460 { 461 return ""; 462 } 463 464 public String getProcedureTerm() throws SQLException 465 { 466 return ""; 467 } 468 469 public String getCatalogTerm() throws SQLException 470 { 471 return ""; 472 } 473 474 public boolean isCatalogAtStart() throws SQLException 475 { 476 return false; 477 } 478 479 public String getCatalogSeparator() throws SQLException 480 { 481 return ""; 482 } 483 484 public boolean supportsSchemasInDataManipulation() throws SQLException 485 { 486 return false; 487 } 488 489 public boolean supportsSchemasInProcedureCalls() throws SQLException 490 { 491 return false; 492 } 493 494 public boolean supportsSchemasInTableDefinitions() throws SQLException 495 { 496 return false; 497 } 498 499 public boolean supportsSchemasInIndexDefinitions() throws SQLException 500 { 501 return false; 502 } 503 504 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException 505 { 506 return false; 507 } 508 509 public boolean supportsCatalogsInDataManipulation() throws SQLException 510 { 511 return false; 512 } 513 514 public boolean supportsCatalogsInProcedureCalls() throws SQLException 515 { 516 return false; 517 } 518 519 public boolean supportsCatalogsInTableDefinitions() throws SQLException 520 { 521 return false; 522 } 523 524 public boolean supportsCatalogsInIndexDefinitions() throws SQLException 525 { 526 return false; 527 } 528 529 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException 530 { 531 return false; 532 } 533 534 public boolean supportsPositionedDelete() throws SQLException 535 { 536 return false; 537 } 538 539 public boolean supportsPositionedUpdate() throws SQLException 540 { 541 return false; 542 } 543 544 public boolean supportsSelectForUpdate() throws SQLException 545 { 546 return false; 547 } 548 549 public boolean supportsStoredProcedures() throws SQLException 550 { 551 return false; 552 } 553 554 public boolean supportsSubqueriesInComparisons() throws SQLException 555 { 556 return false; 557 } 558 559 public boolean supportsSubqueriesInExists() throws SQLException 560 { 561 return true; 562 } 563 564 public boolean supportsSubqueriesInIns() throws SQLException 565 { 566 return false; 567 } 568 569 public boolean supportsSubqueriesInQuantifieds() throws SQLException 570 { 571 return false; 572 } 573 574 public boolean supportsCorrelatedSubqueries() throws SQLException 575 { 576 return true; 577 } 578 579 public boolean supportsUnion() throws SQLException 580 { 581 return true; 582 } 583 584 public boolean supportsUnionAll() throws SQLException 585 { 586 return true; 587 } 588 589 public boolean supportsOpenCursorsAcrossCommit() throws SQLException 590 { 591 return false; 592 } 593 594 public boolean supportsOpenCursorsAcrossRollback() throws SQLException 595 { 596 return false; 597 } 598 599 public boolean supportsOpenStatementsAcrossCommit() throws SQLException 600 { 601 return false; 602 } 603 604 public boolean supportsOpenStatementsAcrossRollback() throws SQLException 605 { 606 return false; 607 } 608 609 public int getMaxBinaryLiteralLength() throws SQLException 610 { 611 return 10; 612 } 613 614 public int getMaxCharLiteralLength() throws SQLException 615 { 616 return 2000; 617 } 618 619 public int getMaxColumnNameLength() throws SQLException 620 { 621 return 30; 622 } 623 624 public int getMaxColumnsInGroupBy() throws SQLException 625 { 626 return 30; 627 } 628 629 public int getMaxColumnsInIndex() throws SQLException 630 { 631 return 30; 632 } 633 634 public int getMaxColumnsInOrderBy() throws SQLException 635 { 636 return 30; 637 } 638 639 public int getMaxColumnsInSelect() throws SQLException 640 { 641 return 300; 642 } 643 644 public int getMaxColumnsInTable() throws SQLException 645 { 646 return 300; 647 } 648 649 public int getMaxConnections() throws SQLException 650 { 651 return 300; 652 } 653 654 public int getMaxCursorNameLength() throws SQLException 655 { 656 return 0; 657 } 658 659 public int getMaxIndexLength() throws SQLException 660 { 661 return 30; 662 } 663 664 public int getMaxSchemaNameLength() throws SQLException 665 { 666 return 0; 667 } 668 669 public int getMaxProcedureNameLength() throws SQLException 670 { 671 return 0; 672 } 673 674 public int getMaxCatalogNameLength() throws SQLException 675 { 676 return 0; 677 } 678 679 public int getMaxRowSize() throws SQLException 680 { 681 return 300000; 682 } 683 684 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException 685 { 686 return false; 687 } 688 689 public int getMaxStatementLength() throws SQLException 690 { 691 return 30000; 692 } 693 694 public int getMaxStatements() throws SQLException 695 { 696 return 30; 697 } 698 699 public int getMaxTableNameLength() throws SQLException 700 { 701 return 30; 702 } 703 704 public int getMaxTablesInSelect() throws SQLException 705 { 706 return 30; 707 } 708 709 public int getMaxUserNameLength() throws SQLException 710 { 711 return 30; 712 } 713 714 public int getDefaultTransactionIsolation() throws SQLException 715 { 716 return 0; 717 } 718 719 public boolean supportsTransactions() throws SQLException 720 { 721 return true; 722 } 723 724 public boolean supportsTransactionIsolationLevel(int level) throws SQLException 725 { 726 return false; 727 } 728 729 public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException 730 { 731 return false; 732 } 733 734 public boolean supportsDataManipulationTransactionsOnly() throws SQLException 735 { 736 return false; 737 } 738 739 public boolean dataDefinitionCausesTransactionCommit() throws SQLException 740 { 741 return true; 742 } 743 744 public boolean dataDefinitionIgnoredInTransactions() throws SQLException 745 { 746 return false; 747 } 748 749 public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException 750 { 751 return EMPTY_RESULTSET; 752 } 753 754 public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, 755 String columnNamePattern) throws SQLException 756 { 757 return EMPTY_RESULTSET; 758 } 759 760 public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String [] types) 761 throws SQLException 762 { 763 DjResultSet result = new DjResultSet(); 764 RdbmsPersistenceManager pman = _connection.getPersistenceManager(); 765 DjExtent[] extents = pman.getExtents(); 766 result.defineColumn(GT_TCAT); 767 result.defineColumn(GT_TSCHEM); 768 result.defineColumn(GT_TNAME); 769 result.defineColumn(GT_TTYPE); 770 result.defineColumn(GT_TREMARKS); 771 for (int i = 0; i < extents.length; i++) 772 { 773 Object row = result.newRow(); 774 result.addColumn(row, GT_TCAT, null); 775 result.addColumn(row, GT_TSCHEM, null); 776 result.addColumn(row, GT_TNAME, extents[i].getName()); 777 result.addColumn(row, GT_TTYPE, "TABLE"); 778 if (extents[i].getDescription() != null) result.addColumn(row, GT_TREMARKS, extents[i].getDescription()); 779 else result.addColumn(row, GT_TREMARKS, extents[i].getTitle()); 780 } 781 return result; 782 } 783 784 public ResultSet getSchemas() throws SQLException 785 { 786 return EMPTY_RESULTSET; 787 } 788 789 public ResultSet getCatalogs() throws SQLException 790 { 791 return EMPTY_RESULTSET; 792 } 793 794 public ResultSet getTableTypes() throws SQLException 795 { 796 DjResultSet result = new DjResultSet(); 797 result.defineColumn(GTT_TTYPE); 798 result.addColumn(result.newRow(), GTT_TTYPE, "TABLE"); 799 return result; 800 } 801 802 public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) 803 throws SQLException 804 { 805 DjResultSet result = new DjResultSet(); 806 RdbmsPersistenceManager pman = _connection.getPersistenceManager(); 807 result.defineColumn(GC_TABLE_CAT); 808 result.defineColumn(GC_TABLE_SCHEM); 809 result.defineColumn(GC_TABLE_NAME); 810 result.defineColumn(GC_COLUMN_NAME); 811 result.defineColumn(GC_DATA_TYPE); 812 result.defineColumn(GC_TYPE_NAME); 813 result.defineColumn(GC_COLUMN_SIZE); 814 result.defineColumn(GC_BUFFER_LENGTH); 815 result.defineColumn(GC_DECIMAL_DIGITS); 816 result.defineColumn(GC_NUM_PREC_RADIX); 817 result.defineColumn(GC_NULLABLE); 818 result.defineColumn(GC_REMARKS); 819 result.defineColumn(GC_COLUMN_DEF); 820 result.defineColumn(GC_SQL_DATA_TYPE); 821 result.defineColumn(GC_SQL_DATATIME_SUB); 822 result.defineColumn(GC_CHAR_OCTET_LENGTH); 823 result.defineColumn(GC_ORDINAL_POSITION); 824 result.defineColumn(GC_IS_NULLABLE); 825 try 826 { 827 DjExtent tab = pman.getExtent(tableNamePattern); 828 DjProperty[] cols = tab.getProperties(); 829 for (int i = 0; i < cols.length; i++) 830 { 831 Object row = result.newRow(); 832 result.addColumn(row, GC_TABLE_CAT, null); 833 result.addColumn(row, GC_TABLE_SCHEM, null); 834 result.addColumn(row, GC_TABLE_NAME, tab.getName()); 835 result.addColumn(row, GC_COLUMN_NAME, cols[i].getName()); 836 result.addColumn(row, GC_DATA_TYPE, new BigDecimal (cols[i].getTypeCode())); 837 result.addColumn(row, GC_TYPE_NAME, cols[i].getTypeName()); 838 result.addColumn(row, GC_COLUMN_SIZE, new BigDecimal (cols[i].getLength())); 839 result.addColumn(row, GC_BUFFER_LENGTH, null); 840 result.addColumn(row, GC_DECIMAL_DIGITS, new BigDecimal (cols[i].getDecimals())); 841 result.addColumn(row, GC_NUM_PREC_RADIX, new BigDecimal (10)); 842 result.addColumn(row, GC_NULLABLE, new BigDecimal (cols[i].isRequired() ? columnNoNulls : columnNullable)); 843 result.addColumn(row, GC_REMARKS, cols[i].getDescription()); 844 result.addColumn(row, GC_COLUMN_DEF, null); 845 result.addColumn(row, GC_SQL_DATA_TYPE, null); 846 result.addColumn(row, GC_SQL_DATATIME_SUB, null); 847 result.addColumn(row, GC_CHAR_OCTET_LENGTH, new BigDecimal (cols[i].getLength())); 848 result.addColumn(row, GC_ORDINAL_POSITION, new BigDecimal (i + 1)); 849 result.addColumn(row, GC_IS_NULLABLE, cols[i].isRequired() ? "NO" : "YES"); 850 } 851 } 852 catch (ObjectNotDefinedException ond) 853 { 854 throw new SQLException ("Table " + tableNamePattern + " is not defined: " + ond); 855 } 856 return result; 857 } 858 859 public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) 860 throws SQLException 861 { 862 return 863 EMPTY_RESULTSET; 864 } 865 866 public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) 867 throws SQLException 868 { 869 return 870 EMPTY_RESULTSET; 871 } 872 873 public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) 874 throws SQLException 875 { 876 return 877 EMPTY_RESULTSET; 878 } 879 880 public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException 881 { 882 return 883 EMPTY_RESULTSET; 884 } 885 886 public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException 887 { 888 return 889 EMPTY_RESULTSET; 890 } 891 892 public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException 893 { 894 return 895 EMPTY_RESULTSET; 896 } 897 898 public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException 899 { 900 return 901 EMPTY_RESULTSET; 902 } 903 904 public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, 905 String foreignCatalog, String foreignSchema, String foreignTable) 906 throws SQLException 907 { 908 return 909 EMPTY_RESULTSET; 910 } 911 912 public ResultSet getTypeInfo() throws SQLException 913 { 914 return 915 EMPTY_RESULTSET; 916 } 917 918 public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) 919 throws SQLException 920 { 921 return 922 EMPTY_RESULTSET; 923 } 924 925 public boolean supportsResultSetType(int type) throws SQLException 926 { 927 return true; 928 } 929 930 public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException 931 { 932 return false; 933 } 934 935 public boolean ownUpdatesAreVisible(int type) throws SQLException 936 { 937 return true; 938 } 939 940 public boolean ownDeletesAreVisible(int type) throws SQLException 941 { 942 return true; 943 } 944 945 public boolean ownInsertsAreVisible(int type) throws SQLException 946 { 947 return true; 948 } 949 950 public boolean othersUpdatesAreVisible(int type) throws SQLException 951 { 952 return true; 953 } 954 955 public boolean othersDeletesAreVisible(int type) throws SQLException 956 { 957 return true; 958 } 959 960 public boolean othersInsertsAreVisible(int type) throws SQLException 961 { 962 return true; 963 } 964 965 public boolean updatesAreDetected(int type) throws SQLException 966 { 967 return true; 968 } 969 970 public boolean deletesAreDetected(int type) throws SQLException 971 { 972 return true; 973 } 974 975 public boolean insertsAreDetected(int type) throws SQLException 976 { 977 return true; 978 } 979 980 public boolean supportsBatchUpdates() throws SQLException 981 { 982 return false; 983 } 984 985 public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) 986 throws SQLException 987 { 988 return EMPTY_RESULTSET; 989 } 990 991 public Connection getConnection() throws SQLException 992 { 993 return _connection; 994 } 995 996 1002 public ResultSet getAttributes(String arg0, String arg1, String arg2, String arg3) throws SQLException 1003 { 1004 return EMPTY_RESULTSET; 1006 } 1007 1008 1013 public int getDatabaseMajorVersion() throws SQLException 1014 { 1015 return _connection.getDriver().getMajorVersion(); 1016 } 1017 1018 1023 public int getDatabaseMinorVersion() throws SQLException 1024 { 1025 return _connection.getDriver().getMinorVersion(); 1026 } 1027 1028 1033 public int getJDBCMajorVersion() throws SQLException 1034 { 1035 return _connection.getDriver().getMajorVersion(); 1036 } 1037 1038 1043 public int getJDBCMinorVersion() throws SQLException 1044 { 1045 return _connection.getDriver().getMinorVersion(); 1046 } 1047 1048 1053 public int getResultSetHoldability() throws SQLException 1054 { 1055 return ResultSet.CLOSE_CURSORS_AT_COMMIT; 1056 } 1057 1058 1063 public int getSQLStateType() throws SQLException 1064 { 1065 return sqlStateXOpen; 1066 } 1067 1068 1074 public ResultSet getSuperTables(String arg0, String arg1, String arg2) throws SQLException 1075 { 1076 return EMPTY_RESULTSET; 1077 } 1078 1079 1085 public ResultSet getSuperTypes(String arg0, String arg1, String arg2) throws SQLException 1086 { 1087 return EMPTY_RESULTSET; 1088 } 1089 1090 1095 public boolean locatorsUpdateCopy() throws SQLException 1096 { 1097 return false; 1098 } 1099 1100 1105 public boolean supportsGetGeneratedKeys() throws SQLException 1106 { 1107 return false; 1108 } 1109 1110 1115 public boolean supportsMultipleOpenResults() throws SQLException 1116 { 1117 return true; 1118 } 1119 1120 1125 public boolean supportsNamedParameters() throws SQLException 1126 { 1127 return false; 1128 } 1129 1130 1135 public boolean supportsResultSetHoldability(int arg0) throws SQLException 1136 { 1137 return false; 1138 } 1139 1140 1145 public boolean supportsSavepoints() throws SQLException 1146 { 1147 return false; 1148 } 1149 1150 1155 public boolean supportsStatementPooling() throws SQLException 1156 { 1157 return false; 1158 } 1159 1160} | Popular Tags |