| 1 7 package com.nilostep.xlsql.jdbc; 8 9 import java.sql.*; 10 11 public class xlDatabaseMetaData implements DatabaseMetaData, Constants { 12 14 private xlConnection xlCon; 15 private DatabaseMetaData dbMeta; 16 17 public static final int NOT_SUPPORTED = -1; 18 19 21 22 protected xlDatabaseMetaData(xlConnection con, DatabaseMetaData meta) { 23 xlCon = con; 24 dbMeta = meta; 25 } 26 27 29 33 public boolean allProceduresAreCallable() throws SQLException { 34 return dbMeta.allProceduresAreCallable(); 35 } 36 37 41 public boolean allTablesAreSelectable() throws SQLException { 42 return dbMeta.allTablesAreSelectable(); 43 } 44 45 49 public boolean dataDefinitionCausesTransactionCommit() 50 throws SQLException { 51 return dbMeta.dataDefinitionCausesTransactionCommit(); 52 } 53 54 58 public boolean dataDefinitionIgnoredInTransactions() 59 throws SQLException { 60 return dbMeta.dataDefinitionIgnoredInTransactions(); 61 } 62 63 67 public boolean deletesAreDetected(int type) throws SQLException { 68 return dbMeta.deletesAreDetected(type); 69 } 70 71 75 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { 76 return dbMeta.doesMaxRowSizeIncludeBlobs(); 77 } 78 79 83 public ResultSet getAttributes(String catalog, String schemaPattern, 84 String typeNamePattern, 85 String attributeNamePattern) 86 throws SQLException { 87 return dbMeta.getAttributes(catalog, schemaPattern, 88 typeNamePattern, attributeNamePattern); 89 } 90 91 95 public ResultSet getBestRowIdentifier(String catalog, String schema, 96 String table, int scope, 97 boolean nullable) 98 throws SQLException { 99 return dbMeta.getBestRowIdentifier(catalog, schema, 100 table, scope, nullable); 101 } 102 103 107 public String getCatalogSeparator() throws SQLException { 108 return dbMeta.getCatalogSeparator(); 111 } 113 114 118 public String getCatalogTerm() throws SQLException { 119 return dbMeta.getCatalogTerm(); 122 } 124 125 129 public ResultSet getCatalogs() throws SQLException { 130 return dbMeta.getCatalogs(); 133 } 135 136 140 public ResultSet getColumnPrivileges(String catalog, String schema, 141 String table, String columnNamePattern) 142 throws SQLException { 143 return dbMeta.getColumnPrivileges(catalog, schema, 144 table, columnNamePattern); 145 } 146 147 151 public ResultSet getColumns(String catalog, String schemaPattern, 152 String tableNamePattern, 153 String columnNamePattern) 154 throws SQLException { 155 return dbMeta.getColumns(catalog, schemaPattern, 156 tableNamePattern, columnNamePattern); 157 } 158 159 163 public Connection getConnection() throws SQLException { 164 return xlCon; 165 } 166 167 171 public ResultSet getCrossReference(String primaryCatalog, 172 String primarySchema, 173 String primaryTable, 174 String foreignCatalog, 175 String foreignSchema, 176 String foreignTable) 177 throws SQLException { 178 return dbMeta.getCrossReference(primaryCatalog, primarySchema, 179 primaryTable, foreignCatalog, foreignSchema, foreignTable); 180 } 181 182 186 public int getDatabaseMajorVersion() throws SQLException { 187 return MAJOR_XLSQL_VERSION; 188 } 189 190 194 public int getDatabaseMinorVersion() throws SQLException { 195 return MINOR_XLSQL_VERSION; 196 } 197 198 202 public String getDatabaseProductName() throws SQLException { 203 return XLSQL; 204 } 205 206 210 public String getDatabaseProductVersion() throws SQLException { 211 return XLSQL_RELEASE; 212 } 213 214 218 public int getDefaultTransactionIsolation() throws SQLException { 219 return dbMeta.getDefaultTransactionIsolation(); 220 } 221 222 226 public int getDriverMajorVersion() { 227 return MAJOR_VERSION; 228 } 229 230 234 public int getDriverMinorVersion() { 235 return MINOR_VERSION; 236 } 237 238 242 public String getDriverName() throws SQLException { 243 return DRIVER_NAME; 244 } 245 246 250 public String getDriverVersion() throws SQLException { 251 return DRIVER_RELEASE; 252 } 253 254 258 public ResultSet getExportedKeys(String catalog, String schema, 259 String table) throws SQLException { 260 return dbMeta.getExportedKeys(catalog, schema, table); 261 } 262 263 267 public String getExtraNameCharacters() throws SQLException { 268 return dbMeta.getExtraNameCharacters(); 269 } 270 271 275 public String getIdentifierQuoteString() throws SQLException { 276 return dbMeta.getIdentifierQuoteString(); 277 } 278 279 283 public ResultSet getImportedKeys(String catalog, String schema, 284 String table) throws SQLException { 285 return dbMeta.getImportedKeys(catalog, schema, table); 286 } 287 288 292 public ResultSet getIndexInfo(String catalog, String schema, String table, 293 boolean unique, boolean approximate) 294 throws SQLException { 295 return dbMeta.getIndexInfo(catalog, schema, table, unique, approximate); 296 } 297 298 302 public int getJDBCMajorVersion() throws SQLException { 303 return JDBC_MAJOR_VERSION; 304 } 305 306 310 public int getJDBCMinorVersion() throws SQLException { 311 return JDBC_MINOR_VERSION; 312 } 313 314 318 public int getMaxBinaryLiteralLength() throws SQLException { 319 return dbMeta.getMaxBinaryLiteralLength(); 320 } 321 322 326 public int getMaxCatalogNameLength() throws SQLException { 327 return dbMeta.getMaxCatalogNameLength(); 330 } 332 333 337 public int getMaxCharLiteralLength() throws SQLException { 338 return dbMeta.getMaxCharLiteralLength(); 339 } 340 341 345 public int getMaxColumnNameLength() throws SQLException { 346 return dbMeta.getMaxColumnNameLength(); 347 } 348 349 353 public int getMaxColumnsInGroupBy() throws SQLException { 354 return dbMeta.getMaxColumnsInGroupBy(); 355 } 356 357 361 public int getMaxColumnsInIndex() throws SQLException { 362 return dbMeta.getMaxColumnsInIndex(); 363 } 364 365 369 public int getMaxColumnsInOrderBy() throws SQLException { 370 return dbMeta.getMaxColumnsInOrderBy(); 371 } 372 373 377 public int getMaxColumnsInSelect() throws SQLException { 378 return dbMeta.getMaxColumnsInSelect(); 379 } 380 381 385 public int getMaxColumnsInTable() throws SQLException { 386 return 255; 389 } 391 392 396 public int getMaxConnections() throws SQLException { 397 return 1; 400 } 402 403 407 public int getMaxCursorNameLength() throws SQLException { 408 return dbMeta.getMaxCursorNameLength(); 409 } 410 411 415 public int getMaxIndexLength() throws SQLException { 416 return dbMeta.getMaxIndexLength(); 417 } 418 419 423 public int getMaxProcedureNameLength() throws SQLException { 424 return dbMeta.getMaxProcedureNameLength(); 425 } 426 427 431 public int getMaxRowSize() throws SQLException { 432 return dbMeta.getMaxRowSize(); 433 } 434 435 439 public int getMaxSchemaNameLength() throws SQLException { 440 return dbMeta.getMaxSchemaNameLength(); 441 } 442 443 447 public int getMaxStatementLength() throws SQLException { 448 return dbMeta.getMaxStatementLength(); 449 } 450 451 455 public int getMaxStatements() throws SQLException { 456 return dbMeta.getMaxStatements(); 457 } 458 459 463 public int getMaxTableNameLength() throws SQLException { 464 return dbMeta.getMaxTableNameLength(); 465 } 466 467 471 public int getMaxTablesInSelect() throws SQLException { 472 return dbMeta.getMaxTablesInSelect(); 473 } 474 475 479 public int getMaxUserNameLength() throws SQLException { 480 return dbMeta.getMaxUserNameLength(); 481 } 482 483 487 public String getNumericFunctions() throws SQLException { 488 return dbMeta.getNumericFunctions(); 489 } 490 491 495 public ResultSet getPrimaryKeys(String catalog, String schema, String table) 496 throws SQLException { 497 return dbMeta.getPrimaryKeys(catalog, schema, table); 498 } 499 500 504 public ResultSet getProcedureColumns(String catalog, String schemaPattern, 505 String procedureNamePattern, 506 String columnNamePattern) 507 throws SQLException { 508 return dbMeta.getProcedureColumns(catalog, schemaPattern, 509 procedureNamePattern, columnNamePattern); 510 } 511 512 516 public String getProcedureTerm() throws SQLException { 517 return dbMeta.getProcedureTerm(); 518 } 519 520 524 public ResultSet getProcedures(String catalog, String schemaPattern, 525 String procedureNamePattern) 526 throws SQLException { 527 return dbMeta.getProcedures(catalog, schemaPattern, 528 procedureNamePattern); 529 } 530 531 535 public int getResultSetHoldability() throws SQLException { 536 return dbMeta.getResultSetHoldability(); 537 } 538 539 543 public String getSQLKeywords() throws SQLException { 544 return dbMeta.getSQLKeywords(); 545 } 546 547 551 public int getSQLStateType() throws SQLException { 552 return dbMeta.getSQLStateType(); 553 } 554 555 559 public String getSchemaTerm() throws SQLException { 560 return dbMeta.getSchemaTerm(); 561 } 562 563 567 public ResultSet getSchemas() throws SQLException { 568 return dbMeta.getSchemas(); 572 } 573 574 578 public String getSearchStringEscape() throws SQLException { 579 return dbMeta.getSearchStringEscape(); 580 } 581 582 586 public String getStringFunctions() throws SQLException { 587 return dbMeta.getStringFunctions(); 588 } 589 590 594 public ResultSet getSuperTables(String catalog, String schemaPattern, 595 String tableNamePattern) 596 throws SQLException { 597 return dbMeta.getSuperTables(catalog, schemaPattern, tableNamePattern); 598 } 599 600 604 public ResultSet getSuperTypes(String catalog, String schemaPattern, 605 String typeNamePattern) 606 throws SQLException { 607 608 return dbMeta.getSuperTypes(catalog, schemaPattern, typeNamePattern); 609 } 610 611 615 public String getSystemFunctions() throws SQLException { 616 return dbMeta.getSystemFunctions(); 617 } 618 619 623 public ResultSet getTablePrivileges(String catalog, String schemaPattern, 624 String tableNamePattern) 625 throws SQLException { 626 return dbMeta.getTablePrivileges(catalog, schemaPattern, 627 tableNamePattern); 628 } 629 630 634 public ResultSet getTableTypes() throws SQLException { 635 return dbMeta.getTableTypes(); 636 } 637 638 642 public ResultSet getTables(String catalog, String schemaPattern, 643 String tableNamePattern, String [] types) 644 throws SQLException { 645 return dbMeta.getTables(catalog, schemaPattern, tableNamePattern, types); 646 } 647 648 652 public String getTimeDateFunctions() throws SQLException { 653 return dbMeta.getTimeDateFunctions(); 654 } 655 656 660 public ResultSet getTypeInfo() throws SQLException { 661 return dbMeta.getTypeInfo(); 662 } 663 664 668 public ResultSet getUDTs(String catalog, String schemaPattern, 669 String typeNamePattern, int[] types) 670 throws SQLException { 671 return dbMeta.getUDTs(catalog, schemaPattern, typeNamePattern, types); 672 } 673 674 678 public String getURL() throws SQLException { 679 return xlCon.URL; 680 } 681 682 686 public String getUserName() throws SQLException { 687 return null; 691 } 692 693 697 public ResultSet getVersionColumns(String catalog, String schema, 698 String table) throws SQLException { 699 return dbMeta.getVersionColumns(catalog, schema, table); 700 } 701 702 706 public boolean insertsAreDetected(int type) throws SQLException { 707 return dbMeta.insertsAreDetected(type); 708 } 709 710 714 public boolean isCatalogAtStart() throws SQLException { 715 return dbMeta.isCatalogAtStart(); 716 } 717 718 722 public boolean isReadOnly() throws SQLException { 723 return dbMeta.isReadOnly(); 724 } 725 726 730 public boolean locatorsUpdateCopy() throws SQLException { 731 return dbMeta.locatorsUpdateCopy(); 732 } 733 734 738 public boolean nullPlusNonNullIsNull() throws SQLException { 739 return dbMeta.nullPlusNonNullIsNull(); 740 } 741 742 746 public boolean nullsAreSortedAtEnd() throws SQLException { 747 return dbMeta.nullsAreSortedAtEnd(); 748 } 749 750 754 public boolean nullsAreSortedAtStart() throws SQLException { 755 return dbMeta.nullsAreSortedAtStart(); 756 } 757 758 762 public boolean nullsAreSortedHigh() throws SQLException { 763 return dbMeta.nullsAreSortedHigh(); 764 } 765 766 770 public boolean nullsAreSortedLow() throws SQLException { 771 return dbMeta.nullsAreSortedLow(); 772 } 773 774 778 public boolean othersDeletesAreVisible(int type) throws SQLException { 779 return dbMeta.othersDeletesAreVisible(type); 780 } 781 782 786 public boolean othersInsertsAreVisible(int type) throws SQLException { 787 return dbMeta.othersInsertsAreVisible(type); 788 } 789 790 794 public boolean othersUpdatesAreVisible(int type) throws SQLException { 795 return dbMeta.othersUpdatesAreVisible(type); 796 } 797 798 802 public boolean ownDeletesAreVisible(int type) throws SQLException { 803 return dbMeta.ownDeletesAreVisible(type); 804 } 805 806 810 public boolean ownInsertsAreVisible(int type) throws SQLException { 811 return dbMeta.ownInsertsAreVisible(type); 812 } 813 814 818 public boolean ownUpdatesAreVisible(int type) throws SQLException { 819 return dbMeta.ownUpdatesAreVisible(type); 820 } 821 822 826 public boolean storesLowerCaseIdentifiers() throws SQLException { 827 return dbMeta.storesLowerCaseIdentifiers(); 828 } 829 830 834 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { 835 return dbMeta.storesLowerCaseQuotedIdentifiers(); 836 } 837 838 842 public boolean storesMixedCaseIdentifiers() throws SQLException { 843 return dbMeta.storesMixedCaseIdentifiers(); 844 } 845 846 850 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { 851 return dbMeta.storesMixedCaseQuotedIdentifiers(); 852 } 853 854 858 public boolean storesUpperCaseIdentifiers() throws SQLException { 859 return dbMeta.storesUpperCaseIdentifiers(); 860 } 861 862 866 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { 867 return dbMeta.storesUpperCaseQuotedIdentifiers(); 868 } 869 870 874 public boolean supportsANSI92EntryLevelSQL() throws SQLException { 875 return dbMeta.supportsANSI92EntryLevelSQL(); 876 } 877 878 882 public boolean supportsANSI92FullSQL() throws SQLException { 883 return dbMeta.supportsANSI92FullSQL(); 884 } 885 886 890 public boolean supportsANSI92IntermediateSQL() throws SQLException { 891 return dbMeta.supportsANSI92IntermediateSQL(); 892 } 893 894 898 public boolean supportsAlterTableWithAddColumn() throws SQLException { 899 return dbMeta.supportsAlterTableWithAddColumn(); 900 } 901 902 906 public boolean supportsAlterTableWithDropColumn() throws SQLException { 907 return dbMeta.supportsAlterTableWithDropColumn(); 908 } 909 910 914 public boolean supportsBatchUpdates() throws SQLException { 915 return dbMeta.supportsBatchUpdates(); 916 } 917 918 922 public boolean supportsCatalogsInDataManipulation() 923 throws SQLException { 924 return dbMeta.supportsCatalogsInDataManipulation(); 925 } 926 927 931 public boolean supportsCatalogsInIndexDefinitions() 932 throws SQLException { 933 return dbMeta.supportsCatalogsInIndexDefinitions(); 934 } 935 936 940 public boolean supportsCatalogsInPrivilegeDefinitions() 941 throws SQLException { 942 return dbMeta.supportsCatalogsInPrivilegeDefinitions(); 943 } 944 945 949 public boolean supportsCatalogsI
|