The datastore.GetMulti(c appengine.Context, key []*Key, dst interface{})
API allows me to get 1000 entities at most. I want to get more.
An obvious way to solve this generically is to create a wrapper function mypkg.GetMulti()
which sub slices (key[0:1000], key[1000:2000]...
) the original arguments and calls datastore.GetMulti()
several times with them.
It's pretty clear how to sub slice key []*Key
, but how do I sub slice dst interface{}
which could be:
// dst must be a []S, []*S, []I or []P, for some struct type S, some interface
// type I, or some non-interface non-pointer type P such that P or *P
// implements PropertyLoadSaver. If an []I, each element must be a valid dst
// for Get: it must be a struct pointer or implement PropertyLoadSaver.
//
// As a special case, PropertyList is an invalid type for dst, even though a
// PropertyList is a slice of structs. It is treated as invalid to avoid being
// mistakenly passed when []PropertyList was intended.