optional index strategies

This commit is contained in:
Barak Michener 2015-07-14 21:43:09 -04:00
parent 3f391a782c
commit da391c3db7
2 changed files with 27 additions and 7 deletions

View file

@ -95,12 +95,11 @@ func NewIterator(qs *QuadStore, d quad.Direction, val graph.Value) *Iterator {
}
func NewAllIterator(qs *QuadStore, table string) *Iterator {
var size int64
it := &Iterator{
uid: iterator.NextUID(),
qs: qs,
dir: quad.Any,
size: size,
size: qs.Size(),
table: table,
isAll: true,
}
@ -255,7 +254,7 @@ func (it *Iterator) Describe() graph.Description {
func (it *Iterator) Stats() graph.IteratorStats {
size, _ := it.Size()
if it.table == "nodes" {
if it.table == "nodes" || it.isAll {
return graph.IteratorStats{
ContainsCost: 1,
NextCost: 9999,