(attribute:string)
| 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 | } |