예제 #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
}
예제 #2
0
// 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
}
예제 #3
0
파일: store.go 프로젝트: lufia/magazine
func (s *Store) GetKeysInQuery(q *datastore.Query) ([]*datastore.Key, error) {
	return q.KeysOnly().GetAll(s.c, nil)
}