mirror of
https://github.com/simonw/datasette.git
synced 2026-11-07 18:58:29 +01:00
fix: return inserted rows from WITHOUT ROWID tables
Look up returned rows by explicit primary keys when SQLite tables have no rowid. Cover compound keys and STRICT table options. Refs #1873.
This commit is contained in:
parent
cec5e6b2ef
commit
35dc60041a
3 changed files with 65 additions and 0 deletions
|
|
@ -1827,6 +1827,9 @@ If successful, this will return a ``201`` status code and the newly inserted row
|
|||
]
|
||||
}
|
||||
|
||||
This also works for SQLite ``WITHOUT ROWID`` tables with explicit primary key
|
||||
values. The returned ``"rows"`` list is looked up using those primary keys.
|
||||
|
||||
To insert multiple rows at a time, use the same API method but send a list of dictionaries as the ``"rows"`` key:
|
||||
|
||||
::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue