ignore and replace options for bulk inserts, refs #1873

Also removed the rule that you cannot include primary keys in the rows you insert.

And added validation that catches invalid parameters in the incoming JSON.

And renamed "inserted" to "rows" in the returned JSON for return_rows: true
This commit is contained in:
Simon Willison 2022-11-01 11:07:59 -07:00
commit 9bec7c38eb
3 changed files with 111 additions and 17 deletions

View file

@ -489,7 +489,7 @@ If successful, this will return a ``201`` status code and the newly inserted row
.. code-block:: json
{
"inserted": [
"rows": [
{
"id": 1,
"column1": "value1",
@ -538,7 +538,7 @@ To return the newly inserted rows, add the ``"return_rows": true`` key to the re
"return_rows": true
}
This will return the same ``"inserted"`` key as the single row example above. There is a small performance penalty for using this option.
This will return the same ``"rows"`` key as the single row example above. There is a small performance penalty for using this option.
.. _RowDeleteView: