use of com.querydsl.core.testutil.ExcludeIn in project querydsl by querydsl.
the class InsertBase method insert_with_keys_listener.
@Test
@ExcludeIn({ CUBRID, SQLSERVER })
public void insert_with_keys_listener() throws SQLException {
final AtomicBoolean result = new AtomicBoolean();
SQLListener listener = new SQLBaseListener() {
@Override
public void end(SQLListenerContext context) {
result.set(true);
}
};
SQLInsertClause clause = insert(survey).set(survey.name, "Hello World");
clause.addListener(listener);
ResultSet rs = clause.executeWithKeys();
assertFalse(result.get());
assertTrue(rs.next());
assertTrue(rs.getObject(1) != null);
rs.close();
assertTrue(result.get());
}
use of com.querydsl.core.testutil.ExcludeIn in project querydsl by querydsl.
the class InsertBase method insert_with_subQuery_Via_Constructor.
@Test
// too slow
@ExcludeIn(FIREBIRD)
public void insert_with_subQuery_Via_Constructor() {
int count = (int) query().from(survey).fetchCount();
SQLInsertClause insert = insert(survey, query().from(survey2));
insert.set(survey.id, survey2.id.add(20));
insert.set(survey.name, survey2.name);
assertEquals(count, insert.execute());
}
use of com.querydsl.core.testutil.ExcludeIn in project querydsl by querydsl.
the class SubqueriesBase method keys.
@Test
@ExcludeIn({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, SQLITE, SQLSERVER })
public void keys() {
QEmployee employee2 = new QEmployee("employee2");
ForeignKey<Employee> nameKey1 = new ForeignKey<Employee>(employee, ImmutableList.of(employee.firstname, employee.lastname), ImmutableList.of("a", "b"));
ForeignKey<Employee> nameKey2 = new ForeignKey<Employee>(employee, ImmutableList.of(employee.firstname, employee.lastname), ImmutableList.of("a", "b"));
query().from(employee).where(nameKey1.in(query().from(employee2).select(nameKey2.getProjection()))).select(employee.id).fetch();
}
use of com.querydsl.core.testutil.ExcludeIn in project querydsl by querydsl.
the class SubqueriesBase method list_in_query.
@Test
@ExcludeIn({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, SQLITE, SQLSERVER })
public void list_in_query() {
QEmployee employee2 = new QEmployee("employee2");
query().from(employee).where(Expressions.list(employee.id, employee.lastname).in(query().from(employee2).select(employee2.id, employee2.lastname))).select(employee.id).fetch();
}
use of com.querydsl.core.testutil.ExcludeIn in project querydsl by querydsl.
the class SubqueriesBase method subQuery_rightJoin.
@Test
@ExcludeIn(SQLITE)
public void subQuery_rightJoin() {
SubQueryExpression<Integer> sq = query().from(employee2).select(employee2.id);
QEmployee sqEmp = new QEmployee("sq");
query().from(employee).rightJoin(sq, sqEmp).on(sqEmp.id.eq(employee.id)).select(employee.id).fetch();
}
Aggregations