Find a single document by its id in collection.
const model = data.model('foo', {score: Number});
// Update first document
await data.updateOne(model, {}, {score: 100});
// Update nth document
await data.updateOne(model, {}, {score: 100}, 50);
// Use a setter (view below for list of updaters)
await data.updateOne(model, {}, {score: data.sum(100)});
- string
Promise<DataDocument>
## Update by id
View Ids for more information.