We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba80e5a commit 4910f59Copy full SHA for 4910f59
1 file changed
samples/samples/pg_snippets.py
@@ -1376,9 +1376,10 @@ def update_data_with_jsonb(instance_id, database_id):
1376
database = instance.database(database_id)
1377
"""
1378
PG JSONB takes the last value in the case of duplicate keys.
1379
- PG JSONB sorts first by key length and then lexicographically with
+ PG JSONB sorts first by key length and then lexicographically with
1380
equivalent key length.
1381
1382
+
1383
with database.batch() as batch:
1384
batch.update(
1385
table="Venues",
@@ -1390,7 +1391,7 @@ def update_data_with_jsonb(instance_id, database_id):
1390
1391
[
1392
JsonObject({"name": None, "open": True}),
1393
JsonObject(
- {"name": "room 2", "open": False, "name": "room 3"}
1394
+ {"name": "room 2", "open": False}
1395
),
1396
]
1397
0 commit comments