Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: service/datastore/datastore.go

Issue 1846123002: Fix missing/broken ds.Stop handling in raw DS. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Better "count" helper function. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « filter/txnBuf/state.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/datastore.go
diff --git a/service/datastore/datastore.go b/service/datastore/datastore.go
index 1c2691a387a4e1e4d3699b9d2aed6f7fd89d1950..17305e57901d7eb5e996175a3c524d5531fde2d2 100644
--- a/service/datastore/datastore.go
+++ b/service/datastore/datastore.go
@@ -168,7 +168,8 @@ func (d *datastoreImpl) Count(q *Query) (int64, error) {
if err != nil {
return 0, err
}
- return d.RawInterface.Count(fq)
+ v, err := d.RawInterface.Count(fq)
+ return v, filterStop(err)
}
func (d *datastoreImpl) GetAll(q *Query, dst interface{}) error {
@@ -204,7 +205,7 @@ func (d *datastoreImpl) GetAll(q *Query, dst interface{}) error {
errs := map[int]error{}
i := 0
- err = d.RawInterface.Run(fq, func(k *Key, pm PropertyMap, _ CursorCB) error {
+ err = filterStop(d.RawInterface.Run(fq, func(k *Key, pm PropertyMap, _ CursorCB) error {
slice.Set(reflect.Append(slice, mat.newElem()))
itm := slice.Index(i)
mat.setKey(itm, k)
@@ -214,7 +215,7 @@ func (d *datastoreImpl) GetAll(q *Query, dst interface{}) error {
}
i++
return nil
- })
+ }))
if err == nil {
if len(errs) > 0 {
me := make(errors.MultiError, slice.Len())
« no previous file with comments | « filter/txnBuf/state.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698