@@ -1195,15 +1195,16 @@ def simple_upsert_txn(
1195
1195
) -> bool :
1196
1196
"""
1197
1197
Pick the UPSERT method which works best on the platform. Either the
1198
- native one (Pg9.5+, recent SQLites ), or fall back to an emulated method.
1198
+ native one (Pg9.5+, SQLite >= 3.24 ), or fall back to an emulated method.
1199
1199
1200
1200
Args:
1201
1201
txn: The transaction to use.
1202
1202
table: The table to upsert into
1203
1203
keyvalues: The unique key tables and their new values
1204
1204
values: The nonunique columns and their new values
1205
1205
insertion_values: additional key/values to use only when inserting
1206
- lock: True to lock the table when doing the upsert.
1206
+ lock: True to lock the table when doing the upsert. Unused when performing
1207
+ a native upsert.
1207
1208
Returns:
1208
1209
Returns True if a row was inserted or updated (i.e. if `values` is
1209
1210
not empty then this always returns True)
@@ -1361,8 +1362,8 @@ async def simple_upsert_many(
1361
1362
value_names: The value column names
1362
1363
value_values: A list of each row's value column values.
1363
1364
Ignored if value_names is empty.
1364
- lock: True to lock the table when doing the upsert. Unused if the database engine
1365
- supports native upserts .
1365
+ lock: True to lock the table when doing the upsert. Unused when performing
1366
+ a native upsert .
1366
1367
"""
1367
1368
1368
1369
# We can autocommit if it safe to upsert
@@ -1400,8 +1401,8 @@ def simple_upsert_many_txn(
1400
1401
value_names: The value column names
1401
1402
value_values: A list of each row's value column values.
1402
1403
Ignored if value_names is empty.
1403
- lock: True to lock the table when doing the upsert. Unused if the database engine
1404
- supports native upserts .
1404
+ lock: True to lock the table when doing the upsert. Unused when performing
1405
+ a native upsert .
1405
1406
"""
1406
1407
if table not in self ._unsafe_to_upsert_tables :
1407
1408
return self .simple_upsert_many_txn_native_upsert (
0 commit comments