mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 01:44:31 +02:00
Use ON CONFLICT for upsert, refs #652
* New upsert implementation, refs #652 * supports_strict now caches on self._supports_strict PR: https://github.com/simonw/sqlite-utils/pull/653
This commit is contained in:
parent
72f6c820f6
commit
8e7d018fa2
7 changed files with 209 additions and 110 deletions
|
|
@ -1098,7 +1098,9 @@ def insert_upsert_implementation(
|
|||
if (
|
||||
isinstance(e, OperationalError)
|
||||
and e.args
|
||||
and "has no column named" in e.args[0]
|
||||
and (
|
||||
"has no column named" in e.args[0] or "no such column" in e.args[0]
|
||||
)
|
||||
):
|
||||
raise click.ClickException(
|
||||
"{}\n\nTry using --alter to add additional columns".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue