Skip to content

Commit 033110b

Browse files
andrewmathew1Andrew Mathew
andauthored
added brackets for sql query keyword value (Azure#43525)
Co-authored-by: Andrew Mathew <[email protected]>
1 parent ed2067a commit 033110b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

sdk/cosmos/azure-cosmos/tests/test_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def test_query_pagination_with_max_item_count(self):
617617

618618
# Test pagination with max_item_count limiting items per page
619619
max_items_per_page = 7
620-
query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c.value"
620+
query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c['value']"
621621
query_iterable = created_collection.query_items(
622622
query=query,
623623
parameters=[{"name": "@pk", "value": partition_key_value}],

sdk/cosmos/azure-cosmos/tests/test_query_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ async def test_query_pagination_with_max_item_count_async(self):
664664

665665
# Test pagination with max_item_count limiting items per page
666666
max_items_per_page = 7
667-
query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c.value"
667+
query = "SELECT * FROM c WHERE c.pk = @pk ORDER BY c['value']"
668668
query_iterable = created_collection.query_items(
669669
query=query,
670670
parameters=[{"name": "@pk", "value": partition_key_value}],

sdk/cosmos/azure-cosmos/tests/test_query_cross_partition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def test_cross_partition_query_pagination_with_max_item_count(self):
528528

529529
# Test cross-partition query with max_item_count
530530
max_items_per_page = 8
531-
query = "SELECT * FROM c ORDER BY c.value"
531+
query = "SELECT * FROM c ORDER BY c['value']"
532532
query_iterable = created_collection.query_items(
533533
query=query,
534534
enable_cross_partition_query=True,

sdk/cosmos/azure-cosmos/tests/test_query_cross_partition_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ async def test_cross_partition_query_pagination_with_max_item_count_async(self):
585585

586586
# Test cross-partition query with max_item_count
587587
max_items_per_page = 8
588-
query = "SELECT * FROM c ORDER BY c.value"
588+
query = "SELECT * FROM c ORDER BY c['value']"
589589
query_iterable = created_collection.query_items(
590590
query=query,
591591
max_item_count=max_items_per_page

0 commit comments

Comments
 (0)