Rename triple entities were relevant

This commit is contained in:
kortschak 2014-08-27 21:27:01 +09:30
parent ddf8849e60
commit 443a091b72
62 changed files with 664 additions and 664 deletions

View file

@ -19,16 +19,16 @@ import (
"github.com/google/cayley/graph/iterator"
)
func (ts *TripleStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool) {
func (qs *QuadStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool) {
switch it.Type() {
case graph.LinksTo:
return ts.optimizeLinksTo(it.(*iterator.LinksTo))
return qs.optimizeLinksTo(it.(*iterator.LinksTo))
}
return it, false
}
func (ts *TripleStore) optimizeLinksTo(it *iterator.LinksTo) (graph.Iterator, bool) {
func (qs *QuadStore) optimizeLinksTo(it *iterator.LinksTo) (graph.Iterator, bool) {
subs := it.SubIterators()
if len(subs) != 1 {
return it, false
@ -41,7 +41,7 @@ func (ts *TripleStore) optimizeLinksTo(it *iterator.LinksTo) (graph.Iterator, bo
panic("unexpected size during optimize")
}
val := primary.Result()
newIt := ts.TripleIterator(it.Direction(), val)
newIt := qs.QuadIterator(it.Direction(), val)
nt := newIt.Tagger()
nt.CopyFrom(it)
for _, tag := range primary.Tagger().Tags() {