Move iterators into separate package
Also reduce API exposure and use standard library more - and fix bugs I previously introduces in mongo.
This commit is contained in:
parent
88be6bee37
commit
1768e593a8
62 changed files with 3240 additions and 3130 deletions
|
|
@ -22,10 +22,11 @@ import (
|
|||
"github.com/petar/GoLLRB/llrb"
|
||||
|
||||
"github.com/google/cayley/graph"
|
||||
"github.com/google/cayley/graph/iterator"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
graph.BaseIterator
|
||||
iterator.Base
|
||||
tree *llrb.LLRB
|
||||
data string
|
||||
isRunning bool
|
||||
|
|
@ -53,7 +54,7 @@ func IterateOne(tree *llrb.LLRB, last Int64) Int64 {
|
|||
|
||||
func NewLlrbIterator(tree *llrb.LLRB, data string) *Iterator {
|
||||
var it Iterator
|
||||
graph.BaseIteratorInit(&it.BaseIterator)
|
||||
iterator.BaseInit(&it.Base)
|
||||
it.tree = tree
|
||||
it.iterLast = Int64(-1)
|
||||
it.data = data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue