1 package net.jaekl.squelch.sql;
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;
10 public class DatabaseMetaDataMock implements DatabaseMetaData {
13 public boolean isWrapperFor(Class<?> iface) throws SQLException {
14 // TODO Auto-generated method stub
19 public <T> T unwrap(Class<T> iface) throws SQLException {
20 // TODO Auto-generated method stub
25 public boolean allProceduresAreCallable() throws SQLException {
26 // TODO Auto-generated method stub
31 public boolean allTablesAreSelectable() throws SQLException {
32 // TODO Auto-generated method stub
37 public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
38 // TODO Auto-generated method stub
43 public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
44 // TODO Auto-generated method stub
49 public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
50 // TODO Auto-generated method stub
55 public boolean deletesAreDetected(int type) throws SQLException {
56 // TODO Auto-generated method stub
61 public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
62 // TODO Auto-generated method stub
67 public boolean generatedKeyAlwaysReturned() throws SQLException {
68 // TODO Auto-generated method stub
73 public ResultSet getAttributes(String catalog, String schemaPattern,
74 String typeNamePattern, String attributeNamePattern)
76 // TODO Auto-generated method stub
81 public ResultSet getBestRowIdentifier(String catalog, String schema,
82 String table, int scope, boolean nullable) throws SQLException {
83 // TODO Auto-generated method stub
88 public String getCatalogSeparator() throws SQLException {
89 // TODO Auto-generated method stub
94 public String getCatalogTerm() throws SQLException {
95 // TODO Auto-generated method stub
100 public ResultSet getCatalogs() throws SQLException {
101 // TODO Auto-generated method stub
106 public ResultSet getClientInfoProperties() throws SQLException {
107 // TODO Auto-generated method stub
112 public ResultSet getColumnPrivileges(String catalog, String schema,
113 String table, String columnNamePattern) throws SQLException {
114 // TODO Auto-generated method stub
119 public ResultSet getColumns(String catalog, String schemaPattern,
120 String tableNamePattern, String columnNamePattern)
121 throws SQLException {
122 // TODO Auto-generated method stub
127 public Connection getConnection() throws SQLException {
128 // TODO Auto-generated method stub
133 public ResultSet getCrossReference(String parentCatalog,
134 String parentSchema, String parentTable, String foreignCatalog,
135 String foreignSchema, String foreignTable) throws SQLException {
136 // TODO Auto-generated method stub
141 public int getDatabaseMajorVersion() throws SQLException {
142 // TODO Auto-generated method stub
147 public int getDatabaseMinorVersion() throws SQLException {
148 // TODO Auto-generated method stub
153 public String getDatabaseProductName() throws SQLException {
154 // TODO Auto-generated method stub
159 public String getDatabaseProductVersion() throws SQLException {
160 // TODO Auto-generated method stub
165 public int getDefaultTransactionIsolation() throws SQLException {
166 // TODO Auto-generated method stub
171 public int getDriverMajorVersion() {
172 // TODO Auto-generated method stub
177 public int getDriverMinorVersion() {
178 // TODO Auto-generated method stub
183 public String getDriverName() throws SQLException {
184 // TODO Auto-generated method stub
189 public String getDriverVersion() throws SQLException {
190 // TODO Auto-generated method stub
195 public ResultSet getExportedKeys(String catalog, String schema, String table)
196 throws SQLException {
197 // TODO Auto-generated method stub
202 public String getExtraNameCharacters() throws SQLException {
203 // TODO Auto-generated method stub
208 public ResultSet getFunctionColumns(String catalog, String schemaPattern,
209 String functionNamePattern, String columnNamePattern)
210 throws SQLException {
211 // TODO Auto-generated method stub
216 public ResultSet getFunctions(String catalog, String schemaPattern,
217 String functionNamePattern) throws SQLException {
218 // TODO Auto-generated method stub
223 public String getIdentifierQuoteString() throws SQLException {
224 // TODO Auto-generated method stub
229 public ResultSet getImportedKeys(String catalog, String schema, String table)
230 throws SQLException {
231 // TODO Auto-generated method stub
236 public ResultSet getIndexInfo(String catalog, String schema, String table,
237 boolean unique, boolean approximate) throws SQLException {
238 // TODO Auto-generated method stub
243 public int getJDBCMajorVersion() throws SQLException {
244 // TODO Auto-generated method stub
249 public int getJDBCMinorVersion() throws SQLException {
250 // TODO Auto-generated method stub
255 public int getMaxBinaryLiteralLength() throws SQLException {
256 // TODO Auto-generated method stub
261 public int getMaxCatalogNameLength() throws SQLException {
262 // TODO Auto-generated method stub
267 public int getMaxCharLiteralLength() throws SQLException {
268 // TODO Auto-generated method stub
273 public int getMaxColumnNameLength() throws SQLException {
274 // TODO Auto-generated method stub
279 public int getMaxColumnsInGroupBy() throws SQLException {
280 // TODO Auto-generated method stub
285 public int getMaxColumnsInIndex() throws SQLException {
286 // TODO Auto-generated method stub
291 public int getMaxColumnsInOrderBy() throws SQLException {
292 // TODO Auto-generated method stub
297 public int getMaxColumnsInSelect() throws SQLException {
298 // TODO Auto-generated method stub
303 public int getMaxColumnsInTable() throws SQLException {
304 // TODO Auto-generated method stub
309 public int getMaxConnections() throws SQLException {
310 // TODO Auto-generated method stub
315 public int getMaxCursorNameLength() throws SQLException {
316 // TODO Auto-generated method stub
321 public int getMaxIndexLength() throws SQLException {
322 // TODO Auto-generated method stub
327 public int getMaxProcedureNameLength() throws SQLException {
328 // TODO Auto-generated method stub
333 public int getMaxRowSize() throws SQLException {
334 // TODO Auto-generated method stub
339 public int getMaxSchemaNameLength() throws SQLException {
340 // TODO Auto-generated method stub
345 public int getMaxStatementLength() throws SQLException {
346 // TODO Auto-generated method stub
351 public int getMaxStatements() throws SQLException {
352 // TODO Auto-generated method stub
357 public int getMaxTableNameLength() throws SQLException {
358 // TODO Auto-generated method stub
363 public int getMaxTablesInSelect() throws SQLException {
364 // TODO Auto-generated method stub
369 public int getMaxUserNameLength() throws SQLException {
370 // TODO Auto-generated method stub
375 public String getNumericFunctions() throws SQLException {
376 // TODO Auto-generated method stub
381 public ResultSet getPrimaryKeys(String catalog, String schema, String table)
382 throws SQLException {
383 // TODO Auto-generated method stub
388 public ResultSet getProcedureColumns(String catalog, String schemaPattern,
389 String procedureNamePattern, String columnNamePattern)
390 throws SQLException {
391 // TODO Auto-generated method stub
396 public String getProcedureTerm() throws SQLException {
397 // TODO Auto-generated method stub
402 public ResultSet getProcedures(String catalog, String schemaPattern,
403 String procedureNamePattern) throws SQLException {
404 // TODO Auto-generated method stub
409 public ResultSet getPseudoColumns(String catalog, String schemaPattern,
410 String tableNamePattern, String columnNamePattern)
411 throws SQLException {
412 // TODO Auto-generated method stub
417 public int getResultSetHoldability() throws SQLException {
418 // TODO Auto-generated method stub
423 public RowIdLifetime getRowIdLifetime() throws SQLException {
424 // TODO Auto-generated method stub
429 public String getSQLKeywords() throws SQLException {
430 // TODO Auto-generated method stub
435 public int getSQLStateType() throws SQLException {
436 // TODO Auto-generated method stub
441 public String getSchemaTerm() throws SQLException {
442 // TODO Auto-generated method stub
447 public ResultSet getSchemas() throws SQLException {
448 // TODO Auto-generated method stub
453 public ResultSet getSchemas(String catalog, String schemaPattern)
454 throws SQLException {
455 // TODO Auto-generated method stub
460 public String getSearchStringEscape() throws SQLException {
461 // TODO Auto-generated method stub
466 public String getStringFunctions() throws SQLException {
467 // TODO Auto-generated method stub
472 public ResultSet getSuperTables(String catalog, String schemaPattern,
473 String tableNamePattern) throws SQLException {
474 // TODO Auto-generated method stub
479 public ResultSet getSuperTypes(String catalog, String schemaPattern,
480 String typeNamePattern) throws SQLException {
481 // TODO Auto-generated method stub
486 public String getSystemFunctions() throws SQLException {
487 // TODO Auto-generated method stub
492 public ResultSet getTablePrivileges(String catalog, String schemaPattern,
493 String tableNamePattern) throws SQLException {
494 // TODO Auto-generated method stub
499 public ResultSet getTableTypes() throws SQLException {
500 // TODO Auto-generated method stub
505 public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
508 ResultSetMock result = new ResultSetMock();
513 public String getTimeDateFunctions() throws SQLException {
514 // TODO Auto-generated method stub
519 public ResultSet getTypeInfo() throws SQLException {
520 // TODO Auto-generated method stub
525 public ResultSet getUDTs(String catalog, String schemaPattern,
526 String typeNamePattern, int[] types) throws SQLException {
527 // TODO Auto-generated method stub
532 public String getURL() throws SQLException {
533 // TODO Auto-generated method stub
538 public String getUserName() throws SQLException {
539 // TODO Auto-generated method stub
544 public ResultSet getVersionColumns(String catalog, String schema,
545 String table) throws SQLException {
546 // TODO Auto-generated method stub
551 public boolean insertsAreDetected(int type) throws SQLException {
552 // TODO Auto-generated method stub
557 public boolean isCatalogAtStart() throws SQLException {
558 // TODO Auto-generated method stub
563 public boolean isReadOnly() throws SQLException {
564 // TODO Auto-generated method stub
569 public boolean locatorsUpdateCopy() throws SQLException {
570 // TODO Auto-generated method stub
575 public boolean nullPlusNonNullIsNull() throws SQLException {
576 // TODO Auto-generated method stub
581 public boolean nullsAreSortedAtEnd() throws SQLException {
582 // TODO Auto-generated method stub
587 public boolean nullsAreSortedAtStart() throws SQLException {
588 // TODO Auto-generated method stub
593 public boolean nullsAreSortedHigh() throws SQLException {
594 // TODO Auto-generated method stub
599 public boolean nullsAreSortedLow() throws SQLException {
600 // TODO Auto-generated method stub
605 public boolean othersDeletesAreVisible(int type) throws SQLException {
606 // TODO Auto-generated method stub
611 public boolean othersInsertsAreVisible(int type) throws SQLException {
612 // TODO Auto-generated method stub
617 public boolean othersUpdatesAreVisible(int type) throws SQLException {
618 // TODO Auto-generated method stub
623 public boolean ownDeletesAreVisible(int type) throws SQLException {
624 // TODO Auto-generated method stub
629 public boolean ownInsertsAreVisible(int type) throws SQLException {
630 // TODO Auto-generated method stub
635 public boolean ownUpdatesAreVisible(int type) throws SQLException {
636 // TODO Auto-generated method stub
641 public boolean storesLowerCaseIdentifiers() throws SQLException {
642 // TODO Auto-generated method stub
647 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
648 // TODO Auto-generated method stub
653 public boolean storesMixedCaseIdentifiers() throws SQLException {
654 // TODO Auto-generated method stub
659 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
660 // TODO Auto-generated method stub
665 public boolean storesUpperCaseIdentifiers() throws SQLException {
666 // TODO Auto-generated method stub
671 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
672 // TODO Auto-generated method stub
677 public boolean supportsANSI92EntryLevelSQL() throws SQLException {
678 // TODO Auto-generated method stub
683 public boolean supportsANSI92FullSQL() throws SQLException {
684 // TODO Auto-generated method stub
689 public boolean supportsANSI92IntermediateSQL() throws SQLException {
690 // TODO Auto-generated method stub
695 public boolean supportsAlterTableWithAddColumn() throws SQLException {
696 // TODO Auto-generated method stub
701 public boolean supportsAlterTableWithDropColumn() throws SQLException {
702 // TODO Auto-generated method stub
707 public boolean supportsBatchUpdates() throws SQLException {
708 // TODO Auto-generated method stub
713 public boolean supportsCatalogsInDataManipulation() throws SQLException {
714 // TODO Auto-generated method stub
719 public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
720 // TODO Auto-generated method stub
725 public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
726 // TODO Auto-generated method stub
731 public boolean supportsCatalogsInProcedureCalls() throws SQLException {
732 // TODO Auto-generated method stub
737 public boolean supportsCatalogsInTableDefinitions() throws SQLException {
738 // TODO Auto-generated method stub
743 public boolean supportsColumnAliasing() throws SQLException {
744 // TODO Auto-generated method stub
749 public boolean supportsConvert() throws SQLException {
750 // TODO Auto-generated method stub
755 public boolean supportsConvert(int fromType, int toType)
756 throws SQLException {
757 // TODO Auto-generated method stub
762 public boolean supportsCoreSQLGrammar() throws SQLException {
763 // TODO Auto-generated method stub
768 public boolean supportsCorrelatedSubqueries() throws SQLException {
769 // TODO Auto-generated method stub
774 public boolean supportsDataDefinitionAndDataManipulationTransactions()
775 throws SQLException {
776 // TODO Auto-generated method stub
781 public boolean supportsDataManipulationTransactionsOnly()
782 throws SQLException {
783 // TODO Auto-generated method stub
788 public boolean supportsDifferentTableCorrelationNames() throws SQLException {
789 // TODO Auto-generated method stub
794 public boolean supportsExpressionsInOrderBy() throws SQLException {
795 // TODO Auto-generated method stub
800 public boolean supportsExtendedSQLGrammar() throws SQLException {
801 // TODO Auto-generated method stub
806 public boolean supportsFullOuterJoins() throws SQLException {
807 // TODO Auto-generated method stub
812 public boolean supportsGetGeneratedKeys() throws SQLException {
813 // TODO Auto-generated method stub
818 public boolean supportsGroupBy() throws SQLException {
819 // TODO Auto-generated method stub
824 public boolean supportsGroupByBeyondSelect() throws SQLException {
825 // TODO Auto-generated method stub
830 public boolean supportsGroupByUnrelated() throws SQLException {
831 // TODO Auto-generated method stub
836 public boolean supportsIntegrityEnhancementFacility() throws SQLException {
837 // TODO Auto-generated method stub
842 public boolean supportsLikeEscapeClause() throws SQLException {
843 // TODO Auto-generated method stub
848 public boolean supportsLimitedOuterJoins() throws SQLException {
849 // TODO Auto-generated method stub
854 public boolean supportsMinimumSQLGrammar() throws SQLException {
855 // TODO Auto-generated method stub
860 public boolean supportsMixedCaseIdentifiers() throws SQLException {
861 // TODO Auto-generated method stub
866 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
867 // TODO Auto-generated method stub
872 public boolean supportsMultipleOpenResults() throws SQLException {
873 // TODO Auto-generated method stub
878 public boolean supportsMultipleResultSets() throws SQLException {
879 // TODO Auto-generated method stub
884 public boolean supportsMultipleTransactions() throws SQLException {
885 // TODO Auto-generated method stub
890 public boolean supportsNamedParameters() throws SQLException {
891 // TODO Auto-generated method stub
896 public boolean supportsNonNullableColumns() throws SQLException {
897 // TODO Auto-generated method stub
902 public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
903 // TODO Auto-generated method stub
908 public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
909 // TODO Auto-generated method stub
914 public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
915 // TODO Auto-generated method stub
920 public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
921 // TODO Auto-generated method stub
926 public boolean supportsOrderByUnrelated() throws SQLException {
927 // TODO Auto-generated method stub
932 public boolean supportsOuterJoins() throws SQLException {
933 // TODO Auto-generated method stub
938 public boolean supportsPositionedDelete() throws SQLException {
939 // TODO Auto-generated method stub
944 public boolean supportsPositionedUpdate() throws SQLException {
945 // TODO Auto-generated method stub
950 public boolean supportsResultSetConcurrency(int type, int concurrency)
951 throws SQLException {
952 // TODO Auto-generated method stub
957 public boolean supportsResultSetHoldability(int holdability)
958 throws SQLException {
959 // TODO Auto-generated method stub
964 public boolean supportsResultSetType(int type) throws SQLException {
965 // TODO Auto-generated method stub
970 public boolean supportsSavepoints() throws SQLException {
971 // TODO Auto-generated method stub
976 public boolean supportsSchemasInDataManipulation() throws SQLException {
977 // TODO Auto-generated method stub
982 public boolean supportsSchemasInIndexDefinitions() throws SQLException {
983 // TODO Auto-generated method stub
988 public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
989 // TODO Auto-generated method stub
994 public boolean supportsSchemasInProcedureCalls() throws SQLException {
995 // TODO Auto-generated method stub
1000 public boolean supportsSchemasInTableDefinitions() throws SQLException {
1001 // TODO Auto-generated method stub
1006 public boolean supportsSelectForUpdate() throws SQLException {
1007 // TODO Auto-generated method stub
1012 public boolean supportsStatementPooling() throws SQLException {
1013 // TODO Auto-generated method stub
1018 public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
1019 // TODO Auto-generated method stub
1024 public boolean supportsStoredProcedures() throws SQLException {
1025 // TODO Auto-generated method stub
1030 public boolean supportsSubqueriesInComparisons() throws SQLException {
1031 // TODO Auto-generated method stub
1036 public boolean supportsSubqueriesInExists() throws SQLException {
1037 // TODO Auto-generated method stub
1042 public boolean supportsSubqueriesInIns() throws SQLException {
1043 // TODO Auto-generated method stub
1048 public boolean supportsSubqueriesInQuantifieds() throws SQLException {
1049 // TODO Auto-generated method stub
1054 public boolean supportsTableCorrelationNames() throws SQLException {
1055 // TODO Auto-generated method stub
1060 public boolean supportsTransactionIsolationLevel(int level)
1061 throws SQLException {
1062 // TODO Auto-generated method stub
1067 public boolean supportsTransactions() throws SQLException {
1068 // TODO Auto-generated method stub
1073 public boolean supportsUnion() throws SQLException {
1074 // TODO Auto-generated method stub
1079 public boolean supportsUnionAll() throws SQLException {
1080 // TODO Auto-generated method stub
1085 public boolean updatesAreDetected(int type) throws SQLException {
1086 // TODO Auto-generated method stub
1091 public boolean usesLocalFilePerTable() throws SQLException {
1092 // TODO Auto-generated method stub
1097 public boolean usesLocalFiles() throws SQLException {
1098 // TODO Auto-generated method stub