Replace string type with graph.Direction
This conversion is not complete as there are still uses of string directions via the Direction.String method in leveldb.
This commit is contained in:
parent
cd11053c98
commit
0a03cec497
21 changed files with 340 additions and 298 deletions
|
|
@ -207,7 +207,7 @@ func buildIteratorTree(tree *peg.ExpressionTree, ts graph.TripleStore) graph.Ite
|
|||
i++
|
||||
}
|
||||
it := buildIteratorTree(tree.Children[i], ts)
|
||||
lto := graph.NewLinksToIterator(ts, it, "p")
|
||||
lto := graph.NewLinksToIterator(ts, it, graph.Predicate)
|
||||
return lto
|
||||
case "RootConstraint":
|
||||
constraintCount := 0
|
||||
|
|
@ -228,16 +228,16 @@ func buildIteratorTree(tree *peg.ExpressionTree, ts graph.TripleStore) graph.Ite
|
|||
return and
|
||||
case "Constraint":
|
||||
var hasa *graph.HasaIterator
|
||||
topLevelDir := "s"
|
||||
subItDir := "o"
|
||||
topLevelDir := graph.Subject
|
||||
subItDir := graph.Object
|
||||
subAnd := graph.NewAndIterator()
|
||||
isOptional := false
|
||||
for _, c := range tree.Children {
|
||||
switch c.Name {
|
||||
case "PredIdentifier":
|
||||
if c.Children[0].Name == "Reverse" {
|
||||
topLevelDir = "o"
|
||||
subItDir = "s"
|
||||
topLevelDir = graph.Object
|
||||
subItDir = graph.Subject
|
||||
}
|
||||
it := buildIteratorTree(c, ts)
|
||||
subAnd.AddSubIterator(it)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue