How to use Meteor Upsert

前端 未结 4 761
悲哀的现实
悲哀的现实 2021-02-02 07:57

Having a bit of trouble getting my Meteor upsert function working. I am fairly (200 lines of code) new, and I\'m having a bit of trouble.

The collection keeps on having

4条回答
  •  深忆病人
    2021-02-02 08:31

    Mongo.Collection#upsert(selector, modifier, [options], [callback])

    ARGUMENTS

    selector: Mongo Selector, Object ID, or String Specifies which documents to modify

    modifier: Mongo Modifier Specifies how to modify the documents

    callback: Function Optional. If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.

    OPTIONS: multi Boolean True to modify all matching documents; false to only modify one of the matching documents (the default).

    https://docs.meteor.com/api/collections.html#Mongo-Collection-upsert

提交回复
热议问题