MongoDB
 sql >> Database >  >> NoSQL >> MongoDB

Come usare Meteor Upsert

Capito attraverso tentativi ed errori:

Values.upsert({
    // Selector
    source: "SourceOne",
    currency: "USD"
}, {
    // Modifier
    $set: {
        value: res.data['data']['last']['value'],
        time: Date.now() // no comma needed here
    }
});