@Test void union() { Database database = testDatabase(new AnsiDialect()); database.select(TypedExpression.value(1), "one") .union(database.select(TypedExpression.literal(2), "two")) .unionAll(database.select(TypedExpression.value(3), "three")) .orderBy(1) .list(transaction); verify(transaction).query(sql.capture(), args.capture(), rowMapper.capture()); assertThat(sql.getValue(), is("select ? as one from DUAL union select 2 as two from DUAL union all select ? as three from DUAL order by 1 asc")); assertThat(args.getValue(), is(toArray(1, 3))); }
public ExpectingUnion<RT> union(ExpectingUnion<RT> next) { statement.addUnion(next.statement, UnionType.UNION); return this; }
ExpectingUnion extends ExpectingOrderBy<RT> { public ExpectingUnion<RT> union(ExpectingUnion<RT> next) { statement.addUnion(next.statement, UnionType.UNION); return this; } }
ExpectingUnion extends ExpectingOrderBy<RT> { public ExpectingUnion<RT> union(ExpectingUnion<RT> next) { statement.addUnion(next.statement, UnionType.UNION); return this; } ExpectingUnion(SelectStatement<RT> statement); }
ExpectingUnion extends ExpectingOrderBy<RT> { public ExpectingUnion<RT> union(ExpectingUnion<RT> next) { statement.addUnion(next.statement, UnionType.UNION); return this; } ExpectingUnion(SelectStatement<RT> statement); ExpectingUnion<RT> union(ExpectingUnion<RT> next); ExpectingUnion<RT> unionAll(ExpectingUnion<RT> next); }
ExpectingUnion extends ExpectingOrderBy<RT> { public ExpectingUnion<RT> union(ExpectingUnion<RT> next) { statement.addUnion(next.statement, UnionType.UNION); return this; } ExpectingUnion(SelectStatement<RT> statement); ExpectingUnion<RT> union(ExpectingUnion<RT> next); ExpectingUnion<RT> unionAll(ExpectingUnion<RT> next);  }