@Test public void testGetDatabaseMajorVersionWhenImplemented() throws Exception { DatabaseConnection connection = createNiceMock(DatabaseConnection.class); expect(connection.getDatabaseMajorVersion()).andReturn(15); replay(connection); SybaseDatabase database = new SybaseDatabase(); database.setConnection(connection); assertEquals(15, database.getDatabaseMajorVersion()); }
@Override public int getDatabaseMajorVersion() throws DatabaseException { try { return getConnection().getDatabaseMajorVersion(); } catch (UnsupportedOperationException e) { LogFactory.getLogger() .warning("Your JDBC driver does not support getDatabaseMajorVersion(). Consider upgrading it."); return -1; } }
SybaseDatabase extends AbstractDatabase { @Override public int getDatabaseMajorVersion() throws DatabaseException { try { return getConnection().getDatabaseMajorVersion(); } catch (UnsupportedOperationException e) { LogFactory.getLogger() .warning("Your JDBC driver does not support getDatabaseMajorVersion(). Consider upgrading it."); return -1; } } }
SybaseDatabase extends AbstractDatabase { @Override public int getDatabaseMajorVersion() throws DatabaseException { try { return getConnection().getDatabaseMajorVersion(); } catch (UnsupportedOperationException e) { LogFactory.getLogger() .warning("Your JDBC driver does not support getDatabaseMajorVersion(). Consider upgrading it."); return -1; } } SybaseDatabase(); }
SybaseDatabase extends AbstractDatabase { @Override public int getDatabaseMajorVersion() throws DatabaseException { try { return getConnection().getDatabaseMajorVersion(); } catch (UnsupportedOperationException e) { LogFactory.getLogger() .warning("Your JDBC driver does not support getDatabaseMajorVersion(). Consider upgrading it."); return -1; } } SybaseDatabase(); String getProductName(); String getTypeName(); int getPriority(); @Override boolean supportsDDLInTransaction(); @Override Set<String> getSystemTablesAndViews(); boolean supportsInitiallyDeferrableColumns(); @Override boolean supportsSequences(); boolean isCorrectDatabaseImplementation(DatabaseConnection conn); String getDefaultDriver(String url); String getCurrentDateTimeFunction(); @Override String getDefaultCatalogName(); @Override String getConcatSql(String... values); boolean supportsTablespaces(); @Override boolean isSystemTable(String catalogName, String schemaName, String tableName); @Override boolean isSystemView(String catalogName, String schemaName, String viewName); String generateDefaultConstraintName(String tableName, String columnName); @Override String convertRequestedSchemaToCatalog(String requestedSchema); @Override String convertRequestedSchemaToSchema(String requestedSchema); @Override boolean supportsRestrictForeignKeys(); @Override String escapeDatabaseObject(String objectName); @Override String getViewDefinition(String schemaName, String viewName); @Override int getDatabaseMajorVersion(); @Override int getDatabaseMinorVersion(); @Override String escapeIndexName(String schemaName, String indexName); }
SybaseDatabase extends AbstractDatabase { @Override public int getDatabaseMajorVersion() throws DatabaseException { try { return getConnection().getDatabaseMajorVersion(); } catch (UnsupportedOperationException e) { LogFactory.getLogger() .warning("Your JDBC driver does not support getDatabaseMajorVersion(). Consider upgrading it."); return -1; } } SybaseDatabase(); String getProductName(); String getTypeName(); int getPriority(); @Override boolean supportsDDLInTransaction(); @Override Set<String> getSystemTablesAndViews(); boolean supportsInitiallyDeferrableColumns(); @Override boolean supportsSequences(); boolean isCorrectDatabaseImplementation(DatabaseConnection conn); String getDefaultDriver(String url); String getCurrentDateTimeFunction(); @Override String getDefaultCatalogName(); @Override String getConcatSql(String... values); boolean supportsTablespaces(); @Override boolean isSystemTable(String catalogName, String schemaName, String tableName); @Override boolean isSystemView(String catalogName, String schemaName, String viewName); String generateDefaultConstraintName(String tableName, String columnName); @Override String convertRequestedSchemaToCatalog(String requestedSchema); @Override String convertRequestedSchemaToSchema(String requestedSchema); @Override boolean supportsRestrictForeignKeys(); @Override String escapeDatabaseObject(String objectName); @Override String getViewDefinition(String schemaName, String viewName); @Override int getDatabaseMajorVersion(); @Override int getDatabaseMinorVersion(); @Override String escapeIndexName(String schemaName, String indexName); static final String PRODUCT_NAME; }