We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ab894d commit ac9f820Copy full SHA for ac9f820
1 file changed
sqlite_utils/db.py
@@ -3316,6 +3316,9 @@ def insert_all(
3316
if hash_id_columns and hash_id is None:
3317
hash_id = "id"
3318
3319
+ if upsert and (not pk and not hash_id):
3320
+ raise PrimaryKeyRequired("upsert() requires a pk")
3321
+
3322
assert not (hash_id and pk), "Use either pk= or hash_id="
3323
if hash_id_columns and (hash_id is None):
3324
0 commit comments