mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Documentation and test for UNIQUE constraint failed, refs #1924
This commit is contained in:
parent
9a1536b52a
commit
7fde34cfcb
2 changed files with 20 additions and 1 deletions
|
|
@ -549,6 +549,17 @@ To return the newly inserted rows, add the ``"return": true`` key to the request
|
|||
|
||||
This will return the same ``"rows"`` key as the single row example above. There is a small performance penalty for using this option.
|
||||
|
||||
If any of your rows have a primary key that is already in use, you will get an error and none of the rows will be inserted:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"ok": false,
|
||||
"errors": [
|
||||
"UNIQUE constraint failed: new_table.id"
|
||||
]
|
||||
}
|
||||
|
||||
.. _RowUpdateView:
|
||||
|
||||
Updating a row
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue