Is it possible to use subject$insert() but in an "upsert" fashion?
I have a need to constantly update document entries that look like:
'{"id": "some_id", "date": "some_date", "value": "some_value"}
These documents are stored in a data.frame R object, and they may have different IDs (for example) and different values. I could just use subject$insert() but then I would ignore duplicates. I think it would also be possible to use subject$update, however if I go this way I would need to do one query at a time, wouldn't I?
Is it possible to use
subject$insert()
but in an "upsert" fashion?I have a need to constantly update document entries that look like: '{"id": "some_id", "date": "some_date", "value": "some_value"}
These documents are stored in a data.frame R object, and they may have different IDs (for example) and different values. I could just use
subject$insert()
but then I would ignore duplicates. I think it would also be possible to usesubject$update
, however if I go this way I would need to do one query at a time, wouldn't I?