Example #1
0
// Snarf down all the keys from the get go.
func (cdb *ComplaintDB) NewLongIter(q *datastore.Query) *LongIterator {
	ctx := cdb.Ctx()
	keys, err := q.KeysOnly().GetAll(ctx, nil)
	i := LongIterator{
		Ctx:  ctx,
		Keys: keys,
		err:  err,
	}

	return &i
}
// Snarf down all the keys from the get go.
func (cdb *ComplaintDB) NewLongBatchingIter(q *datastore.Query) *LongBatchingIterator {
	ctx := cdb.Ctx()
	keys, err := q.KeysOnly().GetAll(ctx, nil)
	i := LongBatchingIterator{
		Ctx:       ctx,
		BatchSize: 100,
		keys:      keys,
		vals:      []*types.Complaint{},
		err:       err,
	}

	return &i
}
Example #3
0
func (s *Store) GetKeysInQuery(q *datastore.Query) ([]*datastore.Key, error) {
	return q.KeysOnly().GetAll(s.c, nil)
}