* Delete a single item by primary key. * * Uses `this.deleteMany` under the hood.
(key: PrimaryKey, opts?: MutationOptions)
| 1097 | * Uses `this.deleteMany` under the hood. |
| 1098 | */ |
| 1099 | async deleteOne(key: PrimaryKey, opts?: MutationOptions): Promise<PrimaryKey> { |
| 1100 | const primaryKeyField = this.schema.collections[this.collection]!.primary; |
| 1101 | validateKeys(this.schema, this.collection, primaryKeyField, key); |
| 1102 | |
| 1103 | await this.deleteMany([key], opts); |
| 1104 | return key; |
| 1105 | } |
| 1106 | |
| 1107 | /** |
| 1108 | * Delete multiple items by primary key. |
no test coverage detected