Search in sources :

Example 16 with Condition

use of org.nutz.dao.Condition in project nutz by nutzam.

the class CndTest method test_in_by_str_array.

@Test
public void test_in_by_str_array() {
    Condition c = Cnd.where("nm", "iN", Lang.array("'A'", "B"));
    String exp = "WHERE nm IN ('''A''','B')";
    assertEquals(exp, c.toSql(null).trim());
}
Also used : Condition(org.nutz.dao.Condition) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)16 Condition (org.nutz.dao.Condition)16 SqlExpression (org.nutz.dao.util.cri.SqlExpression)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)1 Cnd (org.nutz.dao.Cnd)1