MCPcopy
hub / github.com/directus/directus / updateOne

Method updateOne

api/src/services/items.ts:666–669  ·  view source on GitHub ↗

* Update a single item by primary key. * * Uses `this.updateMany` under the hood.

(key: PrimaryKey, data: Partial<Item>, opts?: MutationOptions)

Source from the content-addressed store, hash-verified

664 * Uses `this.updateMany` under the hood.
665 */
666 async updateOne(key: PrimaryKey, data: Partial<Item>, opts?: MutationOptions): Promise<PrimaryKey> {
667 await this.updateMany([key], data, opts);
668 return key;
669 }
670
671 /**
672 * Update multiple items in a single transaction.

Callers 14

handleVersionFunction · 0.95
updateOneMethod · 0.95
upsertOneMethod · 0.95
upsertSingletonMethod · 0.95
uploadOneMethod · 0.95
updateOneMethod · 0.95
saveMethod · 0.95
promoteMethod · 0.95
revertMethod · 0.95
createMethod · 0.95
writeMethod · 0.95

Calls 1

updateManyMethod · 0.95

Tested by

no test coverage detected