From 959c2dc1ba8569d8bdad30c76c0fad2ff3074289 Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Fri, 17 Jul 2020 12:26:38 -0700 Subject: [PATCH 1/2] [Cosmos] Fix type comment --- sdk/cosmos/azure-cosmos/azure/cosmos/container.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index f5883c860091..9e1d86f24dca 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -282,7 +282,7 @@ def query_items_change_feed( def query_items( self, query, # type: str - parameters=None, # type: Optional[List[str]] + parameters=None, # type: Optional[List[Dict[str, object]]] partition_key=None, # type: Optional[Any] enable_cross_partition_query=None, # type: Optional[bool] max_item_count=None, # type: Optional[int] @@ -299,7 +299,9 @@ def query_items( the WHERE clause. :param query: The Azure Cosmos DB SQL query to execute. - :param parameters: Optional array of parameters to the query. Ignored if no query is provided. + :param parameters: Optional array of parameters to the query. + Each parameter is a dict() with 'name' and 'value' keys. + Ignored if no query is provided. :param partition_key: Specifies the partition key value for the item. :param enable_cross_partition_query: Allows sending of more than one request to execute the query in the Azure Cosmos DB service. From 01e6cdfb4d3fd794e906e8accd87d1a4fc93a283 Mon Sep 17 00:00:00 2001 From: Jordi Bunster Date: Mon, 20 Jul 2020 10:50:34 -0700 Subject: [PATCH 2/2] Amend CHANGELOG --- sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index 090a2f07f8a0..e2cdbc414439 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -3,6 +3,7 @@ - Added deprecation warning for "lazy" indexing mode. The backend no longer allows creating containers with this mode and will set them to consistent instead. - Fix for bug where options headers were not added to upsert_item function. Issue #11791 - thank you @aalapatirvbd. - Fixed error raised when a non string ID is used in an item. It now raises TypeError rather than AttributeError. Issue #11793 - thank you @Rabbit994. +- Fixed #12570 - Thanks @sl-sandy. ** Bug fixes ** - Fixed support for dicts as inputs for get_client APIs.