use of liquibase.database.Database in project liquibase by liquibase.
the class MySQLDatabaseTest method escapeTableName_withSchema.
@Override
@Test
public void escapeTableName_withSchema() {
Database database = getDatabase();
assertEquals("catalogName.tableName", database.escapeTableName("catalogName", "schemaName", "tableName"));
}
use of liquibase.database.Database in project liquibase by liquibase.
the class MySQLDatabaseTest method testGetDefaultDriver.
public void testGetDefaultDriver() {
Database database = new MySQLDatabase();
assertEquals("com.mysql.jdbc.Driver", database.getDefaultDriver("jdbc:mysql://localhost/liquibase"));
assertNull(database.getDefaultDriver("jdbc:db2://localhost;databaseName=liquibase"));
}
use of liquibase.database.Database in project liquibase by liquibase.
the class DB2DatabaseTest method testGetDefaultDriver.
public void testGetDefaultDriver() {
Database database = new DB2Database();
assertEquals("com.ibm.db2.jcc.DB2Driver", database.getDefaultDriver("jdbc:db2://localhost:50000/liquibas"));
assertNull(database.getDefaultDriver("jdbc:oracle://localhost;databaseName=liquibase"));
}
use of liquibase.database.Database in project liquibase by liquibase.
the class PostgresDatabaseTest method escapeTableName_withSchema.
@Override
@Test
public void escapeTableName_withSchema() {
Database database = getDatabase();
assertEquals("\"schemaName\".\"tableName\"", database.escapeTableName("catalogName", "schemaName", "tableName"));
}
use of liquibase.database.Database in project liquibase by liquibase.
the class PostgresDatabaseTest method escapeTableName_all.
@Test
public void escapeTableName_all() {
Database database = getDatabase();
database.setObjectQuotingStrategy(ObjectQuotingStrategy.QUOTE_ALL_OBJECTS);
assertEquals("\"tbl\"", database.escapeTableName(null, null, "tbl"));
assertEquals("\"user\"", database.escapeTableName(null, null, "user"));
}
Aggregations