Reduce TripleStore interface names
This commit is contained in:
parent
8576f66d20
commit
b89d4f392c
29 changed files with 156 additions and 156 deletions
|
|
@ -188,7 +188,7 @@ func buildIteratorTree(tree *peg.ExpressionTree, ts graph.TripleStore) graph.Ite
|
|||
var out graph.Iterator
|
||||
nodeID := getIdentString(tree)
|
||||
if tree.Children[0].Name == "Variable" {
|
||||
allIt := ts.GetNodesAllIterator()
|
||||
allIt := ts.NodesAllIterator()
|
||||
allIt.AddTag(nodeID)
|
||||
out = allIt
|
||||
} else {
|
||||
|
|
@ -197,7 +197,7 @@ func buildIteratorTree(tree *peg.ExpressionTree, ts graph.TripleStore) graph.Ite
|
|||
n = nodeID[1:]
|
||||
}
|
||||
fixed := ts.FixedIterator()
|
||||
fixed.AddValue(ts.GetIdFor(n))
|
||||
fixed.AddValue(ts.ValueOf(n))
|
||||
out = fixed
|
||||
}
|
||||
return out
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func TestParseSexpWithMemstore(t *testing.T) {
|
|||
So(it.Type(), ShouldEqual, "and")
|
||||
out, ok := it.Next()
|
||||
So(ok, ShouldBeTrue)
|
||||
So(out, ShouldEqual, ts.GetIdFor("i"))
|
||||
So(out, ShouldEqual, ts.ValueOf("i"))
|
||||
})
|
||||
|
||||
Convey("It can get an internal linkage", func() {
|
||||
|
|
@ -57,7 +57,7 @@ func TestParseSexpWithMemstore(t *testing.T) {
|
|||
So(it.Type(), ShouldEqual, "and")
|
||||
out, ok := it.Next()
|
||||
So(ok, ShouldBeTrue)
|
||||
So(out, ShouldEqual, ts.GetIdFor("i"))
|
||||
So(out, ShouldEqual, ts.ValueOf("i"))
|
||||
})
|
||||
|
||||
})
|
||||
|
|
@ -78,8 +78,8 @@ func TestTreeConstraintParse(t *testing.T) {
|
|||
if !ok {
|
||||
t.Error("Got no results")
|
||||
}
|
||||
if out != ts.GetIdFor("i") {
|
||||
t.Errorf("Got %d, expected %d", out, ts.GetIdFor("i"))
|
||||
if out != ts.ValueOf("i") {
|
||||
t.Errorf("Got %d, expected %d", out, ts.ValueOf("i"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,8 +97,8 @@ func TestTreeConstraintTagParse(t *testing.T) {
|
|||
}
|
||||
tags := make(map[string]graph.TSVal)
|
||||
it.TagResults(&tags)
|
||||
if ts.GetNameFor(tags["$a"]) != "food" {
|
||||
t.Errorf("Got %s, expected food", ts.GetNameFor(tags["$a"]))
|
||||
if ts.NameOf(tags["$a"]) != "food" {
|
||||
t.Errorf("Got %s, expected food", ts.NameOf(tags["$a"]))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -119,8 +119,8 @@ func TestMultipleConstraintParse(t *testing.T) {
|
|||
if !ok {
|
||||
t.Error("Got no results")
|
||||
}
|
||||
if out != ts.GetIdFor("i") {
|
||||
t.Errorf("Got %d, expected %d", out, ts.GetIdFor("i"))
|
||||
if out != ts.ValueOf("i") {
|
||||
t.Errorf("Got %d, expected %d", out, ts.ValueOf("i"))
|
||||
}
|
||||
_, ok = it.Next()
|
||||
if ok {
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ func (s *Session) ToText(result interface{}) string {
|
|||
if k == "$_" {
|
||||
continue
|
||||
}
|
||||
out += fmt.Sprintf("%s : %s\n", k, s.ts.GetNameFor((*tags)[k]))
|
||||
out += fmt.Sprintf("%s : %s\n", k, s.ts.NameOf((*tags)[k]))
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue