0

我需要复杂的 WHERE 子句。

final Where where1 = new Where("col_1", Is.IN, "1, 2, 3");
final Where where2 = new Where("col_2", Is.IN, "a, b, c");
final Where where = where1.and(where2);

但结果我得到了

SELECT on table 'table', selection: 'col_1 IN (?) AND (col_2 IN (?))',
selectionArgs: '[1, 2, 3, a, b, c]', columns: 'null', orderBy: 'null',
groupBy: 'null', having: 'null', distinct: 'false', limit: 'null'.

如您所见,所有参数都放在一起,结果失败。

4

1 回答 1

0

应该

final Where where1 = new Where("col_1", Is.IN, 1, 2, 3);
final Where where2 = new Where("col_2", Is.IN, "a", "b", "c");
于 2016-11-30T23:47:35.107 回答