smileBeda
09/13/2024, 2:21 AMcreate
requires an id
since it will in any case create a new document or abort, if it already exists
• upsert
does not require an id
but if it has one, and it exists, it replaces the existing record
• update
requires an id
and only can update existing records
Is that correct? So actually I can use upsert
for all cases, and dynamically pass in id
if I know it exists (eg update) or leave empty if I know its a new document (eg create).