|
|
@ -138,6 +138,7 @@ func (s *server) SetSync(ctx context.Context, in *protodb.Entity) (*protodb.Noth |
|
|
|
|
|
|
|
func (s *server) Iterator(query *protodb.Entity, dis protodb.DB_IteratorServer) error { |
|
|
|
it := s.db.Iterator(query.Start, query.End) |
|
|
|
defer it.Close() |
|
|
|
return s.handleIterator(it, dis.Send) |
|
|
|
} |
|
|
|
|
|
|
@ -162,6 +163,7 @@ func (s *server) handleIterator(it db.Iterator, sendFunc func(*protodb.Iterator) |
|
|
|
|
|
|
|
func (s *server) ReverseIterator(query *protodb.Entity, dis protodb.DB_ReverseIteratorServer) error { |
|
|
|
it := s.db.ReverseIterator(query.Start, query.End) |
|
|
|
defer it.Close() |
|
|
|
return s.handleIterator(it, dis.Send) |
|
|
|
} |
|
|
|
|
|
|
|