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
|
|
@ -23,10 +23,11 @@ import (
|
|||
"labix.org/v2/mgo/bson"
|
||||
|
||||
"github.com/google/cayley/graph"
|
||||
"github.com/google/cayley/graph/iterator"
|
||||
)
|
||||
|
||||
type Iterator struct {
|
||||
graph.BaseIterator
|
||||
iterator.Base
|
||||
ts *TripleStore
|
||||
dir graph.Direction
|
||||
iter *mgo.Iter
|
||||
|
|
@ -40,7 +41,7 @@ type Iterator struct {
|
|||
|
||||
func NewIterator(ts *TripleStore, collection string, d graph.Direction, val graph.TSVal) *Iterator {
|
||||
var m Iterator
|
||||
graph.BaseIteratorInit(&m.BaseIterator)
|
||||
iterator.BaseInit(&m.Base)
|
||||
|
||||
m.name = ts.GetNameFor(val)
|
||||
m.collection = collection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue