use of liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement in project liquibase by liquibase.
the class SelectFromDatabaseChangeLogLockExecutorTest method generateSql_multicolumn.
@Test
public void generateSql_multicolumn() throws Exception {
this.statementUnderTest = new SelectFromDatabaseChangeLogLockStatement("LOCKED", "LOCKEDBY");
assertCorrect("select [locked],[lockedby] from [databasechangeloglock] where [id]=1", MSSQLDatabase.class, SybaseDatabase.class);
assertCorrect("select [locked],[lockedby] from [databasechangeloglock] where [id]=1", MSSQLDatabase.class, SybaseASADatabase.class);
assertCorrect("select [locked],[lockedby] from [databasechangeloglock] where [id]=1 for update", OracleDatabase.class);
assertCorrectOnRest("select [locked],[lockedby] from [databasechangeloglock] where [id]=1");
}
use of liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement in project liquibase by liquibase.
the class SelectFromDatabaseChangeLogLockExecutorTest method generateSql.
@Test
public void generateSql() throws Exception {
this.statementUnderTest = new SelectFromDatabaseChangeLogLockStatement("LOCKED");
assertCorrect("select [locked] from [databasechangeloglock] where [id]=1", MSSQLDatabase.class, SybaseDatabase.class);
assertCorrect("select [locked] from [databasechangeloglock] where [id]=1", SybaseASADatabase.class);
assertCorrect("select [locked] from [databasechangeloglock] where [id]=1 for update", OracleDatabase.class);
assertCorrectOnRest("select [locked] from [databasechangeloglock] where [id]=1");
}
use of liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement in project liquibase by liquibase.
the class SelectFromDatabaseChangeLogLockExecutorTest method generateSql_count.
@Test
public void generateSql_count() throws Exception {
this.statementUnderTest = new SelectFromDatabaseChangeLogLockStatement(new ColumnConfig().setName("COUNT(*)", true));
assertCorrect("select count(*) from [databasechangeloglock] where [id]=1", MSSQLDatabase.class, SybaseDatabase.class);
assertCorrect("select count(*) from [databasechangeloglock] where [id]=1", MSSQLDatabase.class, SybaseASADatabase.class);
assertCorrect("select count(*) from [databasechangeloglock] where [id]=1 for update", OracleDatabase.class);
assertCorrectOnRest("select count(*) from [databasechangeloglock] where [id]=1");
}
Aggregations