Passing a String which has a multiple values to queryItems in cosmos db query
public List<User> findSupplierSubAcc(Set<String> uids) { String query = “select * from c where UPPER(c.miD) IN (@UIDs) and ARRAY_CONTAINS(c.com,@com1,true)”; try { CosmosPagedIterable iterable = userContainer.queryItems(new SqlQuerySpec(query, List.of(new SqlParameter(“@com1”, “SUP”), new SqlParameter(“@UIDs”, uids.stream().collect(Collectors.joining(“‘,’”, “‘”, “‘”)).split(“,”)))), new CosmosQueryRequestOptions(), User.class); return iterable.stream().collect(Collectors.toList()); } catch (Exception e) { log.error(MARKER_UNEXPECTED, “data could not be fetched because of unknown reasons”, e); throw […]