Azure / azure-cosmos-python

🚨🚨🚨This SDK is now maintained at https://github.com/Azure/azure-sdk-for-python 🚨🚨🚨
https://github.com/Azure/azure-sdk-for-python
MIT License
150 stars 141 forks source link

QueryDocuments list in Parameters #129

Closed Thijxx closed 4 years ago

Thijxx commented 6 years ago

The query with a single value (word) works fine. With the list (words) in Parameters it does not work. The query works in the Storage Explorer. Is there some way to provide a list of strings?

word = 'first'
words = ['first', 'second', 'third']

singlequery = c.client.QueryDocuments(c.collection_link, query={'query': "SELECT * FROM c as P WHERE P.ProductID = @word", "parameters" : [{ "name":"@word", "value": word}]})
multiquery = c.client.QueryDocuments(c.collection_link, query={'query': "SELECT * FROM c as P WHERE P.ProductID IN (@words)", "parameters" : [{ "name":"@words", "value": words}]})

singlequery = JSON list of docs multiquery = []

southpolesteve commented 4 years ago

Closing this issue due to age. Active development of our Python SDK has moved to https://github.com/Azure/azure-sdk-for-python. We have also released 4.0 which includes many updates and new features. If this issue still needs our attention, please reopen it in the new repository.