use of org.apache.cayenne.exp.parser.ASTBitwiseOr in project cayenne by apache.
the class SelectQueryReturnTypesIT method testSelectBitwiseOr.
@Test
public void testSelectBitwiseOr() throws Exception {
if (!accessStackAdapter.supportsBitwiseOps()) {
return;
}
createNumericsDataSet();
// to simplify result checking, do double NOT
Expression left = new ASTBitwiseOr(new Object[] { new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName()), new ASTScalar(1) });
Expression right = new ASTScalar(1);
Expression equal = new ASTEqual();
equal.setOperand(0, left);
equal.setOperand(1, right);
List<ReturnTypesMap1> objects = ObjectSelect.query(ReturnTypesMap1.class, equal).select(context);
assertEquals(2, objects.size());
}
Aggregations