You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2022. It is now read-only.
Add documentation for insert: It does what is currently documented for store. Namely it stores a document and errors if the ID already exists.
Correct documentation for store: It's actually what's currently documented for upsert. It inserts a document if it doesn't exist, or replaces the document if it already exists.
Correct documentation for upsert: The current documentation says that it replaces the document if it exists. But actually it "updates" the document if it exists (leaving unspecified fields in the existing document untouched).
Add documentation for update: Like replace, but leaves unspecified fields in the existing document untouched.
It turns out that we actually have an
update
andinsert
function on collections in Horizon (I didn't know about this until a moment ago): https://github.com/rethinkdb/horizon/blob/next/client/src/ast.js#L316We need to change the following things in http://horizon.io/api/collection/#store :
insert
: It does what is currently documented forstore
. Namely it stores a document and errors if the ID already exists.store
: It's actually what's currently documented forupsert
. It inserts a document if it doesn't exist, or replaces the document if it already exists.upsert
: The current documentation says that it replaces the document if it exists. But actually it "updates" the document if it exists (leaving unspecified fields in the existing document untouched).update
: Likereplace
, but leaves unspecified fields in the existing document untouched.The full specification of all write commands is here: https://github.com/rethinkdb/horizon/blob/next/protocol.md#insert-store-upsert-replace-update-remove
The text was updated successfully, but these errors were encountered: