@Test public void Where_4() throws Exception { query().from(an).where(an.bodyWeight.sqrt().divide(2d).gt(10.0)).parse(); }
@Test @NoOpenJPA public void OrderBy_2() throws Exception { query().from(an).orderBy(an.bodyWeight.sqrt().divide(2.0).asc()).parse(); }
@Test @ExcludeIn(MYSQL) // doesn't work in Eclipselink public void Case4() { NumberExpression<Float> numExpression = cat.bodyWeight.floatValue().divide(otherCat.bodyWeight.floatValue()).multiply(100); NumberExpression<Float> numExpression2 = cat.id.when(0).then(0.0F).otherwise(numExpression); assertEquals(ImmutableList.of(200, 150, 133, 125, 120), query().from(cat, otherCat) .where(cat.id.eq(otherCat.id.add(1))) .orderBy(cat.id.asc(), otherCat.id.asc()) .list(numExpression2.intValue())); }