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
|
|
@ -28,21 +28,21 @@ import (
|
|||
type AllIterator struct {
|
||||
graph.BaseIterator
|
||||
prefix []byte
|
||||
dir string
|
||||
dir graph.Direction
|
||||
open bool
|
||||
it iterator.Iterator
|
||||
ts *TripleStore
|
||||
ro *opt.ReadOptions
|
||||
}
|
||||
|
||||
func NewAllIterator(prefix, dir string, ts *TripleStore) *AllIterator {
|
||||
func NewAllIterator(prefix string, d graph.Direction, ts *TripleStore) *AllIterator {
|
||||
var it AllIterator
|
||||
graph.BaseIteratorInit(&it.BaseIterator)
|
||||
it.ro = &opt.ReadOptions{}
|
||||
it.ro.DontFillCache = true
|
||||
it.it = ts.db.NewIterator(nil, it.ro)
|
||||
it.prefix = []byte(prefix)
|
||||
it.dir = dir
|
||||
it.dir = d
|
||||
it.open = true
|
||||
it.ts = ts
|
||||
it.it.Seek(it.prefix)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue