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
This package could support upserts. Starting an issue thread to collect information.
As per my remarks here, if we're willing to represent an upsert in the history as either an insert or an update, then it's pretty straightforward to emulate the upsert by checking for an existing document and deciding whether to insert or update. The only tricky part is constructing the document to insert from the selector and the modifier. Meteor has two implementations of this (1, 2) that we can copy.
If we want to represent an upsert in the history as its own action type so it can be redone as an upsert, then it becomes more complicated to decide on and implement the undo and redo behavior.
The text was updated successfully, but these errors were encountered:
This package could support upserts. Starting an issue thread to collect information.
As per my remarks here, if we're willing to represent an upsert in the history as either an insert or an update, then it's pretty straightforward to emulate the upsert by checking for an existing document and deciding whether to insert or update. The only tricky part is constructing the document to insert from the selector and the modifier. Meteor has two implementations of this (1, 2) that we can copy.
If we want to represent an upsert in the history as its own action type so it can be redone as an upsert, then it becomes more complicated to decide on and implement the undo and redo behavior.
The text was updated successfully, but these errors were encountered: