1 package net.jaekl.cfb.db.driver;
3 import java.sql.Connection;
4 import java.sql.DatabaseMetaData;
5 import java.sql.ResultSet;
6 import java.sql.RowIdLifetime;
7 import java.sql.SQLException;
9 import net.jaekl.cfb.db.ResultSetMock;
11 public class DatabaseMetaDataMock implements DatabaseMetaData {
14 public boolean isWrapperFor(Class<?> iface) throws SQLException {
15 // TODO Auto-generated method stub
20 public <T> T unwrap(Class<T> iface) throws SQLException {
21 // TODO Auto-generated method stub
26 public boolean allProceduresAreCallable() throws SQLException {
27 // TODO Auto-generated method stub
32 public boolean allTablesAreSelectable() throws SQLException {
33 // TODO Auto-generated method stub
38 public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
39 // TODO Auto-generated method stub
44 public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
45 // TODO Auto-generated method stub
50 public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
51 // TODO Auto-generated method stub
56 public boolean deletesAreDetected(int type) throws SQLException {
57 // TODO Auto-generated method stub
62 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
63 // TODO Auto-generated method stub
68 public boolean generatedKeyAlwaysReturned() throws SQLException {
69 // TODO Auto-generated method stub
74 public ResultSet getAttributes(String catalog, String schemaPattern,
75 String typeNamePattern, String attributeNamePattern)
77 // TODO Auto-generated method stub
82 public ResultSet getBestRowIdentifier(String catalog, String schema,
83 String table, int scope, boolean nullable) throws SQLException {
84 // TODO Auto-generated method stub
89 public String getCatalogSeparator() throws SQLException {
90 // TODO Auto-generated method stub
95 public String getCatalogTerm() throws SQLException {
96 // TODO Auto-generated method stub
101 public ResultSet getCatalogs() throws SQLException {
102 // TODO Auto-generated method stub
107 public ResultSet getClientInfoProperties() throws SQLException {
108 // TODO Auto-generated method stub
113 public ResultSet getColumnPrivileges(String catalog, String schema,
114 String table, String columnNamePattern) throws SQLException {
115 // TODO Auto-generated method stub
120 public ResultSet getColumns(String catalog, String schemaPattern,
121 String tableNamePattern, String columnNamePattern)
122 throws SQLException {
123 // TODO Auto-generated method stub
128 public Connection getConnection() throws SQLException {
129 // TODO Auto-generated method stub
134 public ResultSet getCrossReference(String parentCatalog,
135 String parentSchema, String parentTable, String foreignCatalog,
136 String foreignSchema, String foreignTable) throws SQLException {
137 // TODO Auto-generated method stub
142 public int getDatabaseMajorVersion() throws SQLException {
143 // TODO Auto-generated method stub
148 public int getDatabaseMinorVersion() throws SQLException {
149 // TODO Auto-generated method stub
154 public String getDatabaseProductName() throws SQLException {
155 // TODO Auto-generated method stub
160 public String getDatabaseProductVersion() throws SQLException {
161 // TODO Auto-generated method stub
166 public int getDefaultTransactionIsolation() throws SQLException {
167 // TODO Auto-generated method stub
172 public int getDriverMajorVersion() {
173 // TODO Auto-generated method stub
178 public int getDriverMinorVersion() {
179 // TODO Auto-generated method stub
184 public String getDriverName() throws SQLException {
185 // TODO Auto-generated method stub
190 public String getDriverVersion() throws SQLException {
191 // TODO Auto-generated method stub
196 public ResultSet getExportedKeys(String catalog, String schema, String table)
197 throws SQLException {
198 // TODO Auto-generated method stub
203 public String getExtraNameCharacters() throws SQLException {
204 // TODO Auto-generated method stub
209 public ResultSet getFunctionColumns(String catalog, String schemaPattern,
210 String functionNamePattern, String columnNamePattern)
211 throws SQLException {
212 // TODO Auto-generated method stub
217 public ResultSet getFunctions(String catalog, String schemaPattern,
218 String functionNamePattern) throws SQLException {
219 // TODO Auto-generated method stub
224 public String getIdentifierQuoteString() throws SQLException {
225 // TODO Auto-generated method stub
230 public ResultSet getImportedKeys(String catalog, String schema, String table)
231 throws SQLException {
232 // TODO Auto-generated method stub
237 public ResultSet getIndexInfo(String catalog, String schema, String table,
238 boolean unique, boolean approximate) throws SQLException {
239 // TODO Auto-generated method stub
244 public int getJDBCMajorVersion() throws SQLException {
245 // TODO Auto-generated method stub
250 public int getJDBCMinorVersion() throws SQLException {
251 // TODO Auto-generated method stub
256 public int getMaxBinaryLiteralLength() throws SQLException {
257 // TODO Auto-generated method stub
262 public int getMaxCatalogNameLength() throws SQLException {
263 // TODO Auto-generated method stub
268 public int getMaxCharLiteralLength() throws SQLException {
269 // TODO Auto-generated method stub
274 public int getMaxColumnNameLength() throws SQLException {
275 // TODO Auto-generated method stub
280 public int getMaxColumnsInGroupBy() throws SQLException {
281 // TODO Auto-generated method stub
286 public int getMaxColumnsInIndex() throws SQLException {
287 // TODO Auto-generated method stub
292 public int getMaxColumnsInOrderBy() throws SQLException {
293 // TODO Auto-generated method stub
298 public int getMaxColumnsInSelect() throws SQLException {
299 // TODO Auto-generated method stub
304 public int getMaxColumnsInTable() throws SQLException {
305 // TODO Auto-generated method stub
310 public int getMaxConnections() throws SQLException {
311 // TODO Auto-generated method stub
316 public int getMaxCursorNameLength() throws SQLException {
317 // TODO Auto-generated method stub
322 public int getMaxIndexLength() throws SQLException {
323 // TODO Auto-generated method stub
328 public int getMaxProcedureNameLength() throws SQLException {
329 // TODO Auto-generated method stub
334 public int getMaxRowSize() throws SQLException {
335 // TODO Auto-generated method stub
340 public int getMaxSchemaNameLength() throws SQLException {
341 // TODO Auto-generated method stub
346 public int getMaxStatementLength() throws SQLException {
347 // TODO Auto-generated method stub
352 public int getMaxStatements() throws SQLException {
353 // TODO Auto-generated method stub
358 public int getMaxTableNameLength() throws SQLException {
359 // TODO Auto-generated method stub
364 public int getMaxTablesInSelect() throws SQLException {
365 // TODO Auto-generated method stub
370 public int getMaxUserNameLength() throws SQLException {
371 // TODO Auto-generated method stub
376 public String getNumericFunctions() throws SQLException {
377 // TODO Auto-generated method stub
382 public ResultSet getPrimaryKeys(String catalog, String schema, String table)
383 throws SQLException {
384 // TODO Auto-generated method stub
389 public ResultSet getProcedureColumns(String catalog, String schemaPattern,
390 String procedureNamePattern, String columnNamePattern)
391 throws SQLException {
392 // TODO Auto-generated method stub
397 public String getProcedureTerm() throws SQLException {
398 // TODO Auto-generated method stub
403 public ResultSet getProcedures(String catalog, String schemaPattern,
404 String procedureNamePattern) throws SQLException {
405 // TODO Auto-generated method stub
410 public ResultSet getPseudoColumns(String catalog, String schemaPattern,
411 String tableNamePattern, String columnNamePattern)
412 throws SQLException {
413 // TODO Auto-generated method stub
418 public int getResultSetHoldability() throws SQLException {
419 // TODO Auto-generated method stub
424 public RowIdLifetime getRowIdLifetime() throws SQLException {
425 // TODO Auto-generated method stub
430 public String getSQLKeywords() throws SQLException {
431 // TODO Auto-generated method stub
436 public int getSQLStateType() throws SQLException {
437 // TODO Auto-generated method stub
442 public String getSchemaTerm() throws SQLException {
443 // TODO Auto-generated method stub
448 public ResultSet getSchemas() throws SQLException {
449 // TODO Auto-generated method stub
454 public ResultSet getSchemas(String catalog, String schemaPattern)
455 throws SQLException {
456 // TODO Auto-generated method stub
461 public String getSearchStringEscape() throws SQLException {
462 // TODO Auto-generated method stub
467 public String getStringFunctions() throws SQLException {
468 // TODO Auto-generated method stub
473 public ResultSet getSuperTables(String catalog, String schemaPattern,
474 String tableNamePattern) throws SQLException {
475 // TODO Auto-generated method stub
480 public ResultSet getSuperTypes(String catalog, String schemaPattern,
481 String typeNamePattern) throws SQLException {
482 // TODO Auto-generated method stub
487 public String getSystemFunctions() throws SQLException {
488 // TODO Auto-generated method stub
493 public ResultSet getTablePrivileges(String catalog, String schemaPattern,
494 String tableNamePattern) throws SQLException {
495 // TODO Auto-generated method stub
500 public ResultSet getTableTypes() throws SQLException {
501 // TODO Auto-generated method stub
506 public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
509 ResultSetMock result = new ResultSetMock();
514 public String getTimeDateFunctions() throws SQLException {
515 // TODO Auto-generated method stub
520 public ResultSet getTypeInfo() throws SQLException {
521 // TODO Auto-generated method stub
526 public ResultSet getUDTs(String catalog, String schemaPattern,
527 String typeNamePattern, int[] types) throws SQLException {
528 // TODO Auto-generated method stub
533 public String getURL() throws SQLException {
534 // TODO Auto-generated method stub
539 public String getUserName() throws SQLException {
540 // TODO Auto-generated method stub
545 public ResultSet getVersionColumns(String catalog, String schema,
546 String table) throws SQLException {
547 // TODO Auto-generated method stub
552 public boolean insertsAreDetected(int type) throws SQLException {
553 // TODO Auto-generated method stub
558 public boolean isCatalogAtStart() throws SQLException {
559 // TODO Auto-generated method stub
564 public boolean isReadOnly() throws SQLException {
565 // TODO Auto-generated method stub
570 public boolean locatorsUpdateCopy() throws SQLException {
571 // TODO Auto-generated method stub
576 public boolean nullPlusNonNullIsNull() throws SQLException {
577 // TODO Auto-generated method stub
582 public boolean nullsAreSortedAtEnd() throws SQLException {
583 // TODO Auto-generated method stub
588 public boolean nullsAreSortedAtStart() throws SQLException {
589 // TODO Auto-generated method stub
594 public boolean nullsAreSortedHigh() throws SQLException {
595 // TODO Auto-generated method stub
600 public boolean nullsAreSortedLow() throws SQLException {
601 // TODO Auto-generated method stub
606 public boolean othersDeletesAreVisible(int type) throws SQLException {
607 // TODO Auto-generated method stub
612 public boolean othersInsertsAreVisible(int type) throws SQLException {
613 // TODO Auto-generated method stub
618 public boolean othersUpdatesAreVisible(int type) throws SQLException {
619 // TODO Auto-generated method stub
624 public boolean ownDeletesAreVisible(int type) throws SQLException {
625 // TODO Auto-generated method stub
630 public boolean ownInsertsAreVisible(int type) throws SQLException {
631 // TODO Auto-generated method stub
636 public boolean ownUpdatesAreVisible(int type) throws SQLException {
637 // TODO Auto-generated method stub
642 public boolean storesLowerCaseIdentifiers() throws SQLException {
643 // TODO Auto-generated method stub
648 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
649 // TODO Auto-generated method stub
654 public boolean storesMixedCaseIdentifiers() throws SQLException {
655 // TODO Auto-generated method stub
660 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
661 // TODO Auto-generated method stub
666 public boolean storesUpperCaseIdentifiers() throws SQLException {
667 // TODO Auto-generated method stub
672 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
673 // TODO Auto-generated method stub
678 public boolean supportsANSI92EntryLevelSQL() throws SQLException {
679 // TODO Auto-generated method stub
684 public boolean supportsANSI92FullSQL() throws SQLException {
685 // TODO Auto-generated method stub
690 public boolean supportsANSI92IntermediateSQL() throws SQLException {
691 // TODO Auto-generated method stub
696 public boolean supportsAlterTableWithAddColumn() throws SQLException {
697 // TODO Auto-generated method stub
702 public boolean supportsAlterTableWithDropColumn() throws SQLException {
703 // TODO Auto-generated method stub
708 public boolean supportsBatchUpdates() throws SQLException {
709 // TODO Auto-generated method stub
714 public boolean supportsCatalogsInDataManipulation() throws SQLException {
715 // TODO Auto-generated method stub
720 public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
721 // TODO Auto-generated method stub
726 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
727 // TODO Auto-generated method stub
732 public boolean supportsCatalogsInProcedureCalls() throws SQLException {
733 // TODO Auto-generated method stub
738 public boolean supportsCatalogsInTableDefinitions() throws SQLException {
739 // TODO Auto-generated method stub
744 public boolean supportsColumnAliasing() throws SQLException {
745 // TODO Auto-generated method stub
750 public boolean supportsConvert() throws SQLException {
751 // TODO Auto-generated method stub
756 public boolean supportsConvert(int fromType, int toType)
757 throws SQLException {
758 // TODO Auto-generated method stub
763 public boolean supportsCoreSQLGrammar() throws SQLException {
764 // TODO Auto-generated method stub
769 public boolean supportsCorrelatedSubqueries() throws SQLException {
770 // TODO Auto-generated method stub
775 public boolean supportsDataDefinitionAndDataManipulationTransactions()
776 throws SQLException {
777 // TODO Auto-generated method stub
782 public boolean supportsDataManipulationTransactionsOnly()
783 throws SQLException {
784 // TODO Auto-generated method stub
789 public boolean supportsDifferentTableCorrelationNames() throws SQLException {
790 // TODO Auto-generated method stub
795 public boolean supportsExpressionsInOrderBy() throws SQLException {
796 // TODO Auto-generated method stub
801 public boolean supportsExtendedSQLGrammar() throws SQLException {
802 // TODO Auto-generated method stub
807 public boolean supportsFullOuterJoins() throws SQLException {
808 // TODO Auto-generated method stub
813 public boolean supportsGetGeneratedKeys() throws SQLException {
814 // TODO Auto-generated method stub
819 public boolean supportsGroupBy() throws SQLException {
820 // TODO Auto-generated method stub
825 public boolean supportsGroupByBeyondSelect() throws SQLException {
826 // TODO Auto-generated method stub
831 public boolean supportsGroupByUnrelated() throws SQLException {
832 // TODO Auto-generated method stub
837 public boolean supportsIntegrityEnhancementFacility() throws SQLException {
838 // TODO Auto-generated method stub
843 public boolean supportsLikeEscapeClause() throws SQLException {
844 // TODO Auto-generated method stub
849 public boolean supportsLimitedOuterJoins() throws SQLException {
850 // TODO Auto-generated method stub
855 public boolean supportsMinimumSQLGrammar() throws SQLException {
856 // TODO Auto-generated method stub
861 public boolean supportsMixedCaseIdentifiers() throws SQLException {
862 // TODO Auto-generated method stub
867 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
868 // TODO Auto-generated method stub
873 public boolean supportsMultipleOpenResults() throws SQLException {
874 // TODO Auto-generated method stub
879 public boolean supportsMultipleResultSets() throws SQLException {
880 // TODO Auto-generated method stub
885 public boolean supportsMultipleTransactions() throws SQLException {
886 // TODO Auto-generated method stub
891 public boolean supportsNamedParameters() throws SQLException {
892 // TODO Auto-generated method stub
897 public boolean supportsNonNullableColumns() throws SQLException {
898 // TODO Auto-generated method stub
903 public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
904 // TODO Auto-generated method stub
909 public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
910 // TODO Auto-generated method stub
915 public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
916 // TODO Auto-generated method stub
921 public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
922 // TODO Auto-generated method stub
927 public boolean supportsOrderByUnrelated() throws SQLException {
928 // TODO Auto-generated method stub
933 public boolean supportsOuterJoins() throws SQLException {
934 // TODO Auto-generated method stub
939 public boolean supportsPositionedDelete() throws SQLException {
940 // TODO Auto-generated method stub
945 public boolean supportsPositionedUpdate() throws SQLException {
946 // TODO Auto-generated method stub
951 public boolean supportsResultSetConcurrency(int type, int concurrency)
952 throws SQLException {
953 // TODO Auto-generated method stub
958 public boolean supportsResultSetHoldability(int holdability)
959 throws SQLException {
960 // TODO Auto-generated method stub
965 public boolean supportsResultSetType(int type) throws SQLException {
966 // TODO Auto-generated method stub
971 public boolean supportsSavepoints() throws SQLException {
972 // TODO Auto-generated method stub
977 public boolean supportsSchemasInDataManipulation() throws SQLException {
978 // TODO Auto-generated method stub
983 public boolean supportsSchemasInIndexDefinitions() throws SQLException {
984 // TODO Auto-generated method stub
989 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
990 // TODO Auto-generated method stub
995 public boolean supportsSchemasInProcedureCalls() throws SQLException {
996 // TODO Auto-generated method stub
1001 public boolean supportsSchemasInTableDefinitions() throws SQLException {
1002 // TODO Auto-generated method stub
1007 public boolean supportsSelectForUpdate() throws SQLException {
1008 // TODO Auto-generated method stub
1013 public boolean supportsStatementPooling() throws SQLException {
1014 // TODO Auto-generated method stub
1019 public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
1020 // TODO Auto-generated method stub
1025 public boolean supportsStoredProcedures() throws SQLException {
1026 // TODO Auto-generated method stub
1031 public boolean supportsSubqueriesInComparisons() throws SQLException {
1032 // TODO Auto-generated method stub
1037 public boolean supportsSubqueriesInExists() throws SQLException {
1038 // TODO Auto-generated method stub
1043 public boolean supportsSubqueriesInIns() throws SQLException {
1044 // TODO Auto-generated method stub
1049 public boolean supportsSubqueriesInQuantifieds() throws SQLException {
1050 // TODO Auto-generated method stub
1055 public boolean supportsTableCorrelationNames() throws SQLException {
1056 // TODO Auto-generated method stub
1061 public boolean supportsTransactionIsolationLevel(int level)
1062 throws SQLException {
1063 // TODO Auto-generated method stub
1068 public boolean supportsTransactions() throws SQLException {
1069 // TODO Auto-generated method stub
1074 public boolean supportsUnion() throws SQLException {
1075 // TODO Auto-generated method stub
1080 public boolean supportsUnionAll() throws SQLException {
1081 // TODO Auto-generated method stub
1086 public boolean updatesAreDetected(int type) throws SQLException {
1087 // TODO Auto-generated method stub
1092 public boolean usesLocalFilePerTable() throws SQLException {
1093 // TODO Auto-generated method stub
1098 public boolean usesLocalFiles() throws SQLException {
1099 // TODO Auto-generated method stub