func (g *Goon) Run(q *datastore.Query) *Iterator {
	return &Iterator{
		g: g,
		i: q.Run(g.Context),
	}
}
Run runs the query.
package goon
import (
	"fmt"
	"reflect"
	"google.golang.org/appengine/datastore"
)
func (g *Goon) Count(q *datastore.Query) (int, error) {
	return q.Count(g.Context)
}
func (g *Goon) GetAll(q *datastore.Query, dst interface{}) ([]*datastore.Key, error) {
	v := reflect.ValueOf(dst)
	dstV := reflect.Indirect(v)
	vLenBefore := 0
	if dst != nil {
		if v.Kind() != reflect.Ptr {
			return nil, fmt.Errorf("goon: Expected dst to be a pointer to a slice or nil, got instead: %v", v.Kind())
		}
		v = v.Elem()
		if v.Kind() != reflect.Slice {
			return nil, fmt.Errorf("goon: Expected dst to be a pointer to a slice or nil, got instead: %v", v.Kind())
		}
		vLenBefore = v.Len()
	}
	var propLists []datastore.PropertyList
	keys, err := q.GetAll(g.Context, &propLists)
	if err != nil {
		g.error(err)
		return keys, err
	}
	if dst == nil || len(keys) == 0 {
		return keys, err
	}
	projection := false
	if len(propLists) > 0 {
		for i := range propLists {
			if len(propLists[i]) > 0 {
				projection = isIndexValue(&propLists[i][0])
				break
			}
		}
	}
	keysOnly := (len(propLists) != len(keys))
	updateCache := !g.inTransaction && !keysOnly && !projection
	elemType := v.Type().Elem()
	elemTypeIsPtr := false
	if elemType.Kind() == reflect.Ptr {
		elemType = elemType.Elem()
		elemTypeIsPtr = true
	}
	if elemType.Kind() != reflect.Struct {
		return keys, fmt.Errorf("goon: Expected struct, got instead: %v", elemType.Kind())
	}
	initMem := false
	finalLen := vLenBefore + len(keys)
	if v.Cap() < finalLen {
		newSlice := reflect.MakeSlice(v.Type(), finalLen, finalLen)
		if copied := reflect.Copy(newSlice, v); copied != vLenBefore {
			return keys, fmt.Errorf("goon: Wanted to copy %v elements to dst but managed %v", vLenBefore, copied)
		}
		v = newSlice
	} else {
		if elemTypeIsPtr {
			v.SetLen(finalLen)
		} else {
			initMem = true
		}
	}
	var toCache []*cacheItem
	if updateCache {
		toCache = make([]*cacheItem, 0, len(keys))
	}
	var rerr error
	for i, k := range keys {
		if elemTypeIsPtr {
			ev := reflect.New(elemType)
			v.Index(vLenBefore + i).Set(ev)
		} else if initMem {
			ev := reflect.New(elemType).Elem()
			v = reflect.Append(v, ev)
		}
		vi := v.Index(vLenBefore + i)
		var e interface{}
		if vi.Kind() == reflect.Ptr {
			e = vi.Interface()
		} else {
			e = vi.Addr().Interface()
		}
		if !keysOnly {
			if err := deserializeProperties(e, propLists[i]); err != nil {
				if errFieldMismatch(err) {
					if !IgnoreFieldMismatch {
						rerr = err
					}
				} else {
					return nil, err
				}
			}
		}
		if err := g.setStructKey(e, k); err != nil {
			return nil, err
		}
		if updateCache {
			data, err := serializeProperties(propLists[i], true)
			if err != nil {
				g.error(err)
				return nil, err
			}
			toCache = append(toCache, &cacheItem{key: cacheKey(k), value: data})
		}
	}
	if len(toCache) > 0 {
		g.cache.SetMulti(toCache)
	}
	dstV.Set(v)
	return keys, rerr
}