(labels: string[])
| 104 | } |
| 105 | |
| 106 | public *getVertices(labels: string[]): Iterable<StoredVertex> { |
| 107 | if (labels.length === 0) { |
| 108 | labels = Object.keys(this.#config.schema.vertices) as string[]; |
| 109 | } |
| 110 | for (const label of labels) { |
| 111 | for (const [uuid, data] of this.getVertexCollectionMap(label)) { |
| 112 | const id = `${label}:${uuid}` as ElementId; |
| 113 | const existing = this.#vertexIdentities.get(data); |
| 114 | if (existing != null) { |
| 115 | yield existing; |
| 116 | } else { |
| 117 | const vertex: StoredVertex = { |
| 118 | "@type": "Vertex", |
| 119 | id, |
| 120 | properties: this.getVertexProperties(label, uuid, data), |
| 121 | }; |
| 122 | this.#vertexIdentities.set(data, vertex); |
| 123 | yield vertex; |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | public getEdgeById(id: ElementId): StoredEdge | undefined { |
| 130 | const [label, uuid] = parseElementId(id); |
nothing calls this directly
no test coverage detected