(id: ElementId, key: string, value: any)
| 401 | } |
| 402 | |
| 403 | public updateProperty(id: ElementId, key: string, value: any): void { |
| 404 | const [label, uuid] = parseElementId(id); |
| 405 | const isVertex = label in this.#config.schema.vertices; |
| 406 | const collection = isVertex |
| 407 | ? this.getVertexCollectionMap(label) |
| 408 | : this.getEdgeCollectionMap(label); |
| 409 | const data = collection.get(uuid); |
| 410 | if (data == null) { |
| 411 | throw new ElementNotFoundError(id); |
| 412 | } |
| 413 | data.set(key, value); |
| 414 | } |
| 415 | |
| 416 | protected transact(callback: (tx: Y.Transaction) => void): void { |
| 417 | this.#doc.transact(callback); |
nothing calls this directly
no test coverage detected