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:
Simon Willison 2025-05-08 20:37:49 -07:00 • committed by GitHub
commit 8e7d018fa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 209 additions and 110 deletions

View file

@ -18,7 +18,7 @@ def test_tracer():
("select name from sqlite_master where type = 'view'", None),
("CREATE TABLE [dogs] (\n [name] TEXT\n);\n ", None),
("select name from sqlite_master where type = 'view'", None),
("INSERT INTO [dogs] ([name]) VALUES (?);", ["Cleopaws"]),
("INSERT INTO [dogs] ([name]) VALUES (?)", ["Cleopaws"]),
("select name from sqlite_master where type = 'view'", None),
(
"CREATE VIRTUAL TABLE [dogs_fts] USING FTS5 (\n [name],\n content=[dogs]\n)",