MCPcopy
hub / github.com/witheve/Eve / index

Method index

src/db.ts:114–131  ·  view source on GitHub ↗
(attribute:string)

Source from the content-addressed store, hash-verified

112 }
113
114 index(attribute:string):IndexList<UUID> {
115 let index = this._indexes[attribute];
116 if(index) return index;
117
118 index = new IndexList<UUID>();
119 this._indexes[attribute] = index;
120
121 for(let entity in this._records.index) {
122 let record = this._records.index[entity];
123 let values = record[attribute];
124 if(!values) continue;
125 for(let value of values) {
126 index.insert(value, entity);
127 }
128 }
129
130 return index;
131 }
132
133
134}

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected