假设我有一个名为“MyCustomObject”的customObject类,它有两个字段:“field_a”和“field_b”。
等效(使用QBRequest构建器)的内容是什么:
Select * From MyCustomObject Where (field_a = val1 AND field_b = val2) OR (field_a = val2 AND field_b = val1)
答案 0 :(得分:0)
它应该是这样的:
QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();
requestBuilder.or("field_a", "val1", "val2")
QBCustomObjects.getObjects("MyCustomObject", requestBuilder, new QBEntityCallback<ArrayList<QBCustomObject>>() {
@Override
public void onSuccess(ArrayList<QBCustomObject> customObjects, Bundle params) {
}
@Override
public void onError(QBResponseException errors) {
}
});
更多信息在这里是可能的 https://quickblox.com/developers/SimpleSample-customObjects-android#With_filters