00001
00025
package org.objectweb.cjdbc.driver;
00026
00027
import java.sql.SQLException;
00028
00029
import org.objectweb.cjdbc.common.sql.NotImplementedException;
00030
import org.objectweb.cjdbc.common.util.Constants;
00031
00043 public class DatabaseMetaData implements java.sql.
DatabaseMetaData
00044 {
00046 private Connection connection;
00047
00053 public DatabaseMetaData(
Connection conn)
00054 {
00055
this.connection = conn;
00056 }
00057
00065 public boolean allProceduresAreCallable() throws SQLException
00066 {
00067
return true;
00068 }
00069
00077 public boolean allTablesAreSelectable() throws SQLException
00078 {
00079
return true;
00080 }
00081
00097 public boolean dataDefinitionCausesTransactionCommit() throws SQLException
00098 {
00099
return false;
00100 }
00101
00109 public boolean dataDefinitionIgnoredInTransactions() throws SQLException
00110 {
00111
return true;
00112 }
00113
00121 public boolean deletesAreDetected(
int type)
throws SQLException
00122 {
00123
return false;
00124 }
00125
00133 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException
00134 {
00135
return false;
00136 }
00137
00151 public java.sql.ResultSet
getBestRowIdentifier(String catalog, String schema,
00152 String table,
int scope,
boolean nullable)
throws SQLException
00153 {
00154
return null;
00155 }
00156
00164 public java.sql.ResultSet
getCatalogs() throws SQLException
00165 {
00166
return connection.
getCatalogs();
00167 }
00168
00175 public String
getCatalogSeparator() throws SQLException
00176 {
00177
return ".";
00178 }
00179
00187 public String
getCatalogTerm() throws SQLException
00188 {
00189
return "catalog";
00190 }
00191
00202 public java.sql.ResultSet
getColumns(String catalog, String schemaPattern,
00203 String tableNamePattern, String columnNamePattern)
throws SQLException
00204 {
00205
return connection.
getColumns(catalog, schemaPattern, tableNamePattern,
00206 columnNamePattern);
00207 }
00208
00221 public java.sql.ResultSet
getColumnPrivileges(String catalog,
00222 String schemaPattern, String tableNamePattern, String columnNamePattern)
00223
throws SQLException
00224 {
00225
return null;
00226 }
00227
00235 public java.sql.Connection
getConnection() throws SQLException
00236 {
00237
return connection;
00238 }
00239
00253 public java.sql.ResultSet
getCrossReference(String primaryCatalog,
00254 String primarySchema, String primaryTable, String foreignCatalog,
00255 String foreignSchema, String foreignTable)
throws SQLException
00256 {
00257
return null;
00258 }
00259
00269 public String
getDatabaseProductName() throws SQLException
00270 {
00271
return connection.
getDatabaseProductName();
00272 }
00273
00280 public String
getDatabaseProductVersion() throws SQLException
00281 {
00282
return connection.
getControllerVersionNumber();
00283 }
00284
00293 public int getDefaultTransactionIsolation() throws SQLException
00294 {
00295
return Connection.TRANSACTION_READ_COMMITTED;
00296 }
00297
00303 public int getDriverMajorVersion()
00304 {
00305
return Driver.MAJOR_VERSION;
00306 }
00307
00313 public int getDriverMinorVersion()
00314 {
00315
return Driver.MINOR_VERSION;
00316 }
00317
00324 public String
getDriverName() throws SQLException
00325 {
00326
return "C-JDBC Generic Driver";
00327 }
00328
00335 public String
getDriverVersion() throws SQLException
00336 {
00337
return Constants.VERSION;
00338 }
00339
00350 public java.sql.ResultSet
getExportedKeys(String catalog, String schema,
00351 String table)
throws SQLException
00352 {
00353
return null;
00354 }
00355
00365 public String
getExtraNameCharacters() throws SQLException
00366 {
00367
return "";
00368 }
00369
00381 public String
getIdentifierQuoteString() throws SQLException
00382 {
00383
return " ";
00384 }
00385
00396 public java.sql.ResultSet
getImportedKeys(String catalog, String schema,
00397 String table)
throws SQLException
00398 {
00399
return null;
00400 }
00401
00417 public java.sql.ResultSet
getIndexInfo(String catalog, String schema,
00418 String table,
boolean unique,
boolean approximate)
throws SQLException
00419 {
00420
return null;
00421 }
00422
00430 public int getMaxBinaryLiteralLength() throws SQLException
00431 {
00432
return 0;
00433 }
00434
00442 public int getMaxCatalogNameLength() throws SQLException
00443 {
00444
return 0;
00445 }
00446
00454 public int getMaxCharLiteralLength() throws SQLException
00455 {
00456
return 0;
00457 }
00458
00466 public int getMaxColumnNameLength() throws SQLException
00467 {
00468
return 0;
00469 }
00470
00478 public int getMaxColumnsInGroupBy() throws SQLException
00479 {
00480
return 0;
00481 }
00482
00490 public int getMaxColumnsInIndex() throws SQLException
00491 {
00492
return 0;
00493 }
00494
00502 public int getMaxColumnsInOrderBy() throws SQLException
00503 {
00504
return 0;
00505 }
00506
00514 public int getMaxColumnsInSelect() throws SQLException
00515 {
00516
return 0;
00517 }
00518
00526 public int getMaxColumnsInTable() throws SQLException
00527 {
00528
return 0;
00529 }
00530
00539 public int getMaxConnections() throws SQLException
00540 {
00541
return 0;
00542 }
00543
00550 public int getMaxCursorNameLength() throws SQLException
00551 {
00552
return 0;
00553 }
00554
00562 public int getMaxIndexLength() throws SQLException
00563 {
00564
return 0;
00565 }
00566
00574 public int getMaxProcedureNameLength() throws SQLException
00575 {
00576
return 0;
00577 }
00578
00586 public int getMaxRowSize() throws SQLException
00587 {
00588
return 0;
00589 }
00590
00598 public int getMaxSchemaNameLength() throws SQLException
00599 {
00600
return 0;
00601 }
00602
00610 public int getMaxStatementLength() throws SQLException
00611 {
00612
return 0;
00613 }
00614
00624 public int getMaxStatements() throws SQLException
00625 {
00626
return 0;
00627 }
00628
00636 public int getMaxTableNameLength() throws SQLException
00637 {
00638
return 0;
00639 }
00640
00648 public int getMaxTablesInSelect() throws SQLException
00649 {
00650
return 0;
00651 }
00652
00660 public int getMaxUserNameLength() throws SQLException
00661 {
00662
return 0;
00663 }
00664
00671 public String
getNumericFunctions() throws SQLException
00672 {
00673
return null;
00674 }
00675
00683 public java.sql.ResultSet
getPrimaryKeys(String catalog, String schema,
00684 String table)
throws SQLException
00685 {
00686
return connection.
getPrimaryKeys(catalog, schema, table);
00687 }
00688
00700 public java.sql.ResultSet
getProcedureColumns(String catalog,
00701 String schemaPattern, String procedureNamePattern,
00702 String columnNamePattern)
throws SQLException
00703 {
00704
return connection.
getProcedureColumns(catalog, schemaPattern,
00705 procedureNamePattern, columnNamePattern);
00706 }
00707
00717 public java.sql.ResultSet
getProcedures(String catalog, String schemaPattern,
00718 String procedureNamePattern)
throws SQLException
00719 {
00720
return connection.
getProcedures(catalog, schemaPattern,
00721 procedureNamePattern);
00722 }
00723
00731 public String
getProcedureTerm() throws SQLException
00732 {
00733
return "procedure";
00734 }
00735
00739 public java.sql.ResultSet
getSchemas() throws SQLException
00740 {
00741
return connection.
getSchemas();
00742 }
00743
00751 public String
getSchemaTerm() throws SQLException
00752 {
00753
return "schema";
00754 }
00755
00764 public String
getSearchStringEscape() throws SQLException
00765 {
00766
return "\\";
00767 }
00768
00776 public String
getSQLKeywords() throws SQLException
00777 {
00778
return "";
00779 }
00780
00787 public String
getStringFunctions() throws SQLException
00788 {
00789
return null;
00790 }
00791
00798 public String
getSystemFunctions() throws SQLException
00799 {
00800
return null;
00801 }
00802
00817 public java.sql.ResultSet
getTables(String catalog, String schemaPattern,
00818 String tableNamePattern, String types[])
throws SQLException
00819 {
00820
return connection
00821 .
getTables(catalog, schemaPattern, tableNamePattern, types);
00822 }
00823
00840 public java.sql.ResultSet
getTablePrivileges(String catalog,
00841 String schemaPattern, String tableNamePattern)
throws SQLException
00842 {
00843
return connection.
getTablePrivileges(catalog, schemaPattern,
00844 tableNamePattern);
00845 }
00846
00855 public java.sql.ResultSet
getTableTypes() throws SQLException
00856 {
00857
return connection.
getTableTypes();
00858 }
00859
00866 public String
getTimeDateFunctions() throws SQLException
00867 {
00868
return null;
00869 }
00870
00877 public java.sql.ResultSet
getTypeInfo() throws SQLException
00878 {
00879
return null;
00880 }
00881
00892 public java.sql.ResultSet
getUDTs(String catalog, String schemaPattern,
00893 String typeNamePattern,
int[] types)
throws SQLException
00894 {
00895
return null;
00896 }
00897
00904 public String
getURL() throws SQLException
00905 {
00906
return connection.
getURL();
00907 }
00908
00915 public String
getUserName() throws SQLException
00916 {
00917
return connection.
getUserName();
00918 }
00919
00929 public java.sql.ResultSet
getVersionColumns(String catalog, String schema,
00930 String table)
throws SQLException
00931 {
00932
return null;
00933 }
00934
00942 public boolean insertsAreDetected(
int type)
throws SQLException
00943 {
00944
return false;
00945 }
00946
00954 public boolean isCatalogAtStart() throws SQLException
00955 {
00956
return false;
00957 }
00958
00965 public boolean isReadOnly() throws SQLException
00966 {
00967
return connection.
isReadOnly();
00968 }
00969
00977 public boolean nullPlusNonNullIsNull() throws SQLException
00978 {
00979
return true;
00980 }
00981
00988 public boolean nullsAreSortedAtEnd() throws SQLException
00989 {
00990
return true;
00991 }
00992
00999 public boolean nullsAreSortedAtStart() throws SQLException
01000 {
01001
return false;
01002 }
01003
01010 public boolean nullsAreSortedHigh() throws SQLException
01011 {
01012
return false;
01013 }
01014
01021 public boolean nullsAreSortedLow() throws SQLException
01022 {
01023
return false;
01024 }
01025
01033 public boolean othersDeletesAreVisible(
int type)
throws SQLException
01034 {
01035
return false;
01036 }
01037
01045 public boolean othersInsertsAreVisible(
int type)
throws SQLException
01046 {
01047
return false;
01048 }
01049
01057 public boolean othersUpdatesAreVisible(
int type)
throws SQLException
01058 {
01059
return false;
01060 }
01061
01069 public boolean ownDeletesAreVisible(
int type)
throws SQLException
01070 {
01071
return false;
01072 }
01073
01081 public boolean ownInsertsAreVisible(
int type)
throws SQLException
01082 {
01083
return false;
01084 }
01085
01093 public boolean ownUpdatesAreVisible(
int type)
throws SQLException
01094 {
01095
return false;
01096 }
01097
01105 public boolean storesLowerCaseIdentifiers() throws SQLException
01106 {
01107
return true;
01108 }
01109
01117 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException
01118 {
01119
return false;
01120 }
01121
01129 public boolean storesMixedCaseIdentifiers() throws SQLException
01130 {
01131
return false;
01132 }
01133
01141 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException
01142 {
01143
return false;
01144 }
01145
01153 public boolean storesUpperCaseIdentifiers() throws SQLException
01154 {
01155
return false;
01156 }
01157
01165 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException
01166 {
01167
return false;
01168 }
01169
01177 public boolean supportsAlterTableWithAddColumn() throws SQLException
01178 {
01179
return false;
01180 }
01181
01189 public boolean supportsAlterTableWithDropColumn() throws SQLException
01190 {
01191
return false;
01192 }
01193
01202 public boolean supportsANSI92EntryLevelSQL() throws SQLException
01203 {
01204
return false;
01205 }
01206
01213 public boolean supportsANSI92FullSQL() throws SQLException
01214 {
01215
return false;
01216 }
01217
01225 public boolean supportsANSI92IntermediateSQL() throws SQLException
01226 {
01227
return false;
01228 }
01229
01236 public boolean supportsBatchUpdates() throws SQLException
01237 {
01238
return true;
01239 }
01240
01247 public boolean supportsCatalogsInDataManipulation() throws SQLException
01248 {
01249
return false;
01250 }
01251
01258 public boolean supportsCatalogsInIndexDefinitions() throws SQLException
01259 {
01260
return false;
01261 }
01262
01269 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException
01270 {
01271
return false;
01272 }
01273
01280 public boolean supportsCatalogsInProcedureCalls() throws SQLException
01281 {
01282
return false;
01283 }
01284
01291 public boolean supportsCatalogsInTableDefinitions() throws SQLException
01292 {
01293
return false;
01294 }
01295
01314 public boolean supportsColumnAliasing() throws SQLException
01315 {
01316
return true;
01317 }
01318
01326 public boolean supportsConvert() throws SQLException
01327 {
01328
return false;
01329 }
01330
01340 public boolean supportsConvert(
int fromType,
int toType)
throws SQLException
01341 {
01342
return false;
01343 }
01344
01352 public boolean supportsCoreSQLGrammar() throws SQLException
01353 {
01354
return false;
01355 }
01356
01364 public boolean supportsCorrelatedSubqueries() throws SQLException
01365 {
01366
return false;
01367 }
01368
01377 public boolean supportsDataDefinitionAndDataManipulationTransactions()
01378 throws SQLException
01379 {
01380
return false;
01381 }
01382
01389 public boolean supportsDataManipulationTransactionsOnly() throws SQLException
01390 {
01391
return false;
01392 }
01393
01401 public boolean supportsDifferentTableCorrelationNames() throws SQLException
01402 {
01403
return false;
01404 }
01405
01413 public boolean supportsExpressionsInOrderBy() throws SQLException
01414 {
01415
return false;
01416 }
01417
01426 public boolean supportsExtendedSQLGrammar() throws SQLException
01427 {
01428
return false;
01429 }
01430
01438 public boolean supportsFullOuterJoins() throws SQLException
01439 {
01440
return false;
01441 }
01442
01449 public boolean supportsGroupBy() throws SQLException
01450 {
01451
return true;
01452 }
01453
01462 public boolean supportsGroupByBeyondSelect() throws SQLException
01463 {
01464
return true;
01465 }
01466
01474 public boolean supportsGroupByUnrelated() throws SQLException
01475 {
01476
return true;
01477 }
01478
01486 public boolean supportsIntegrityEnhancementFacility() throws SQLException
01487 {
01488
return false;
01489 }
01490
01498 public boolean supportsLikeEscapeClause() throws SQLException
01499 {
01500
return true;
01501 }
01502
01510 public boolean supportsLimitedOuterJoins() throws SQLException
01511 {
01512
return true;
01513 }
01514
01528 public boolean supportsMinimumSQLGrammar() throws SQLException
01529 {
01530
return true;
01531 }
01532
01545 public boolean supportsMixedCaseIdentifiers() throws SQLException
01546 {
01547
return false;
01548 }
01549
01562 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException
01563 {
01564
return true;
01565 }
01566
01575 public boolean supportsMultipleResultSets() throws SQLException
01576 {
01577
return false;
01578 }
01579
01587 public boolean supportsMultipleTransactions() throws SQLException
01588 {
01589
return true;
01590 }
01591
01599 public boolean supportsNonNullableColumns() throws SQLException
01600 {
01601
return true;
01602 }
01603
01613 public boolean supportsOpenCursorsAcrossCommit() throws SQLException
01614 {
01615
return false;
01616 }
01617
01624 public boolean supportsOpenCursorsAcrossRollback() throws SQLException
01625 {
01626
return false;
01627 }
01628
01638 public boolean supportsOpenStatementsAcrossCommit() throws SQLException
01639 {
01640
return true;
01641 }
01642
01653 public boolean supportsOpenStatementsAcrossRollback() throws SQLException
01654 {
01655
return true;
01656 }
01657
01664 public boolean supportsOrderByUnrelated() throws SQLException
01665 {
01666
return false;
01667 }
01668
01675 public boolean supportsOuterJoins() throws SQLException
01676 {
01677
return true;
01678 }
01679
01687 public boolean supportsPositionedDelete() throws SQLException
01688 {
01689
return false;
01690 }
01691
01698 public boolean supportsPositionedUpdate() throws SQLException
01699 {
01700
return false;
01701 }
01702
01712 public boolean supportsResultSetConcurrency(
int type,
int concurrency)
01713
throws SQLException
01714 {
01715
01716
if (type == java.sql.ResultSet.TYPE_SCROLL_SENSITIVE)
01717
return false;
01718
01719
01720
if (concurrency == java.sql.ResultSet.CONCUR_UPDATABLE)
01721
return false;
01722
01723
01724
return true;
01725 }
01726
01734 public boolean supportsResultSetType(
int type)
throws SQLException
01735 {
01736
01737
return type != java.sql.ResultSet.TYPE_SCROLL_SENSITIVE;
01738 }
01739
01746 public boolean supportsSchemasInDataManipulation() throws SQLException
01747 {
01748
return false;
01749 }
01750
01757 public boolean supportsSchemasInIndexDefinitions() throws SQLException
01758 {
01759
return false;
01760 }
01761
01768 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException
01769 {
01770
return false;
01771 }
01772
01779 public boolean supportsSchemasInProcedureCalls() throws SQLException
01780 {
01781
return false;
01782 }
01783
01790 public boolean supportsSchemasInTableDefinitions() throws SQLException
01791 {
01792
return false;
01793 }
01794
01802 public boolean supportsSelectForUpdate() throws SQLException
01803 {
01804
return false;
01805 }
01806
01813 public boolean supportsStoredProcedures() throws SQLException
01814 {
01815
return true;
01816 }
01817
01825 public boolean supportsSubqueriesInComparisons() throws SQLException
01826 {
01827
return false;
01828 }
01829
01837 public boolean supportsSubqueriesInExists() throws SQLException
01838 {
01839
return false;
01840 }
01841
01849 public boolean supportsSubqueriesInIns() throws SQLException
01850 {
01851
return false;
01852 }
01853
01861 public boolean supportsSubqueriesInQuantifieds() throws SQLException
01862 {
01863
return false;
01864 }
01865
01873 public boolean supportsTableCorrelationNames() throws SQLException
01874 {
01875
return false;
01876 }
01877
01887 public boolean supportsTransactionIsolationLevel(
int level)
01888
throws SQLException
01889 {
01890
return true;
01891 }
01892
01900 public boolean supportsTransactions() throws SQLException
01901 {
01902
return true;
01903 }
01904
01911 public boolean supportsUnion() throws SQLException
01912 {
01913
return true;
01914 }
01915
01922 public boolean supportsUnionAll() throws SQLException
01923 {
01924
return false;
01925 }
01926
01935 public boolean updatesAreDetected(
int type)
throws SQLException
01936 {
01937
return false;
01938 }
01939
01947 public boolean usesLocalFilePerTable() throws SQLException
01948 {
01949
return false;
01950 }
01951
01959 public boolean usesLocalFiles() throws SQLException
01960 {
01961
return false;
01962 }
01963
01964
01965
01976 public boolean supportsSavepoints() throws SQLException
01977 {
01978
return false;
01979 }
01980
01992 public boolean supportsNamedParameters() throws SQLException
01993 {
01994
return false;
01995 }
01996
02010 public boolean supportsMultipleOpenResults() throws SQLException
02011 {
02012
return false;
02013 }
02014
02024 public boolean supportsGetGeneratedKeys() throws SQLException
02025 {
02026
return true;
02027 }
02028
02067 public java.sql.ResultSet
getSuperTypes(String catalog, String schemaPattern,
02068 String typeNamePattern)
throws SQLException
02069 {
02070
throw new NotImplementedException(
"getSuperTypes");
02071 }
02072
02109 public java.sql.ResultSet
getSuperTables(String catalog,
02110 String schemaPattern, String tableNamePattern)
throws SQLException
02111 {
02112
throw new NotImplementedException(
"getSuperTables");
02113 }
02114
02186 public java.sql.ResultSet
getAttributes(String catalog, String schemaPattern,
02187 String typeNamePattern, String attributeNamePattern)
throws SQLException
02188 {
02189
throw new NotImplementedException(
"getAttributes");
02190 }
02191
02205 public boolean supportsResultSetHoldability(
int holdability)
02206
throws SQLException
02207 {
02208
return false;
02209 }
02210
02220 public int getResultSetHoldability() throws SQLException
02221 {
02222
throw new NotImplementedException(
"getResultSetHoldability");
02223 }
02224
02234 public int getDatabaseMajorVersion() throws SQLException
02235 {
02236
throw new NotImplementedException(
"getDatabaseMajorVersion");
02237 }
02238
02248 public int getDatabaseMinorVersion() throws SQLException
02249 {
02250
throw new NotImplementedException(
"getDatabaseMinorVersion");
02251 }
02252
02260 public int getJDBCMajorVersion() throws SQLException
02261 {
02262
return Driver.MAJOR_VERSION;
02263 }
02264
02272 public int getJDBCMinorVersion() throws SQLException
02273 {
02274
return Driver.MINOR_VERSION;
02275 }
02276
02286 public int getSQLStateType() throws SQLException
02287 {
02288
throw new NotImplementedException(
"getSQLStateType");
02289 }
02290
02300 public boolean locatorsUpdateCopy() throws SQLException
02301 {
02302
return true;
02303 }
02304
02314 public boolean supportsStatementPooling() throws SQLException
02315 {
02316
return false;
02317 }
02318 }