collapse 2 iterations into 1 in memstore
This commit is contained in:
parent
7c0d8b28b0
commit
138fbbe7ce
1 changed files with 1 additions and 7 deletions
|
|
@ -187,13 +187,7 @@ func (qs *QuadStore) AddDelta(d graph.Delta) error {
|
||||||
qs.revIDMap[qs.nextID] = sid
|
qs.revIDMap[qs.nextID] = sid
|
||||||
qs.nextID++
|
qs.nextID++
|
||||||
}
|
}
|
||||||
}
|
id := qs.idMap[sid]
|
||||||
|
|
||||||
for dir := quad.Subject; dir <= quad.Label; dir++ {
|
|
||||||
if dir == quad.Label && d.Quad.Get(dir) == "" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
id := qs.idMap[d.Quad.Get(dir)]
|
|
||||||
tree := qs.index.Tree(dir, id)
|
tree := qs.index.Tree(dir, id)
|
||||||
tree.Set(qid, struct{}{})
|
tree.Set(qid, struct{}{})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue