0
List<String> spotIdList = new ArrayList<>();
list.add("spot-1");
String historyQry = "SELECT refId ,deviceId as senseId, lastLogAt as lastSeenTime,spotId, META(`beacon-core`).cas as _CAS, "
+ "META(`beacon-core`).id as _ID from `beacon-core` WHERE _class='LiveState' "
+ "and deploymentId=$deploymentId and (spotId in $spotIds) and live='true' ORDER BY refId ";
JsonObject params = JsonObject.create().put("deploymentId", deploymentId).put("spotId", spotIdList);
List<SpotTagView> tags = coreTemplate.findByN1QL(N1qlQuery.parameterized(historyQry, params), SpotTagView.class);
上記のコードは私が試したものです。 私はこのリストを反復して文字列を作成することでこれを行うことができると思います。より良い方法はありますか?javaのcouchbase n1qlで "in"条件のリストを渡すには?