use of org.nutz.dao.sql.Criteria in project nutz by nutzam.
the class CndTest method test_not_in_by_criteria_string_list.
/**
* Criteria 接口测试List<String>
*/
@Test
public void test_not_in_by_criteria_string_list() {
List<String> ids = new ArrayList<String>();
ids.add("bj");
ids.add("sh");
ids.add("gz");
ids.add("sz");
Criteria cri = Cnd.cri();
cri.where().andNotInStrList("nm", ids);
assertEquals(" WHERE nm NOT IN ('bj','sh','gz','sz')", cri.toString());
}
use of org.nutz.dao.sql.Criteria in project nutz by nutzam.
the class CndTest method test_not_in_by_criteria_long_array.
/**
* Criteria 接口测试int[]数组
*/
@Test
public void test_not_in_by_criteria_long_array() {
int[] ids = { 1, 2, 3 };
Criteria cri = Cnd.cri();
cri.where().andNotInArray("nm", ids);
assertEquals(" WHERE nm NOT IN (1,2,3)", cri.toString());
}
use of org.nutz.dao.sql.Criteria in project nutz by nutzam.
the class CndTest method test_not_in_by_criteria_long_list.
/**
* Criteria 接口测试List<Integer>
*/
@Test
public void test_not_in_by_criteria_long_list() {
List<Integer> ids = new ArrayList<Integer>();
ids.add(1);
ids.add(2);
ids.add(3);
Criteria cri = Cnd.cri();
cri.where().andNotInIntList("nm", ids);
assertEquals(" WHERE nm NOT IN (1,2,3)", cri.toString());
}
use of org.nutz.dao.sql.Criteria in project nutz by nutzam.
the class CndTest method test_in_by_criteria_long_array.
/**
* Criteria 接口测试long[]数组
*/
@Test
public void test_in_by_criteria_long_array() {
long[] ids = { 1L, 2L, 3L };
Criteria cri = Cnd.cri();
cri.where().andInArray("nm", ids);
assertEquals(" WHERE nm IN (1,2,3)", cri.toString());
}
use of org.nutz.dao.sql.Criteria in project nutz by nutzam.
the class CndTest method test_not_in_by_criteria_string_array.
/**
* Criteria 接口测试String[]数组
*/
@Test
public void test_not_in_by_criteria_string_array() {
String[] ids = { "bj", "sh", "gz", "sz" };
Criteria cri = Cnd.cri();
cri.where().andNotInArray("nm", ids);
assertEquals(" WHERE nm NOT IN ('bj','sh','gz','sz')", cri.toString());
}
Aggregations