Azure-Samples / azure-cosmos-java-sql-api-samples

Sample code for Azure Cosmos DB Java SDK for SQL API
MIT License
40 stars 72 forks source link

Sql parameter list not working #26

Open viswa-optimusprime opened 3 years ago

viswa-optimusprime commented 3 years ago

Hi , The below query not working . Its not accepting the list . No results returned.

private SqlQuerySpec getQuery(List namesList) { ArrayList paramList = new ArrayList(); paramList.add(new SqlParameter("@names", namesList)); SqlQuerySpec querySpec = new SqlQuerySpec( "SELECT * FROM Test t WHERE t.name in(@names)", paramList); return querySpec; }