VALUES ([document1]), ([document2]), ([document3]), ...
represent the documents being inserted.[ ON ID CONFLICT [DO FAIL | DO NOTHING | DO MERGE ([policy])]]
is an optional clause that allows for defining a policy if the ID already exists in the local data store. The default is to throw an error (FAIL
).tombstone
that field. (See UPDATE)deserialize_json()
function. This allows you to directly insert string-encoded JSON data into your collections without manually parsing it first.
DO NOTHING
) or updating existing documents (DO MERGE
) when a conflict occurs during an INSERT operation:
DO FAIL
(default) will cause an error to be thrown if a document with the same _id
currently exists in the local data store.DO NOTHING
will make the statement succeed with no action takenDO MERGE
will perform a value update on every field in the provided document, even if the value is the same. (This will result in all fields provided being replicated).your_collection_name
is the name of the collection from which you want to retrieve the data.[document]
represents the document.