$http({
params: {
cql: "select * from Car where Brand in (?) and CreatedBy.obje ctId in (?) order by updateAt desc",
pvalues: [["1", "2"], ["test"]]
},
method: "GET",
url : URL.CLOUD_QUERY
});
但是当我检查铬检查员时,它会转换到下面。
cql:select * from Car where Brand in (?) and CreatedBy.objectId in (?) order by updateAt desc
pvalues:["1", "2"]
pvalues:["test"]
我不想得到两个pvalues。我有一个workaroud写这样的pvalues {0:[],1:[]},但我不喜欢这样。
答案 0 :(得分:1)
将其作为字符串传递,并在服务器端将其转换回数组对象。
$http({
params: {
cql: "select * from Car where Brand in (?) and CreatedBy.obje ctId in (?) order by updateAt desc",
pvalues: JSON.stringify([["1", "2"], ["test"]])
},
method: "GET",
url : URL.CLOUD_QUERY
});