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

Unified Diff: filter/count/rds.go

Issue 1367003002: Add missing Count api (Closed) Base URL: https://github.com/luci/gae.git@move_serialization_helpers
Patch Set: Created 5 years, 3 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 | « no previous file | filter/featureBreaker/rds.go » ('j') | impl/prod/raw_datastore_type_converter_test.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/count/rds.go
diff --git a/filter/count/rds.go b/filter/count/rds.go
index c10bc8350803da02a571deb6f98bec4c813cfb1e..6d933433d170456173cdf9254c8d8ea890f1b5a4 100644
--- a/filter/count/rds.go
+++ b/filter/count/rds.go
@@ -16,6 +16,7 @@ type DSCounter struct {
DecodeCursor Entry
RunInTransaction Entry
Run Entry
+ Count Entry
DeleteMulti Entry
GetMulti Entry
PutMulti Entry
@@ -43,6 +44,11 @@ func (r *dsCounter) Run(q *ds.FinalizedQuery, cb ds.RawRunCB) error {
return r.c.Run.up(r.ds.Run(q, cb))
}
+func (r *dsCounter) Count(q *ds.FinalizedQuery) (int64, error) {
+ count, err := r.ds.Count(q)
+ return count, r.c.Count.up(err)
+}
+
func (r *dsCounter) RunInTransaction(f func(context.Context) error, opts *ds.TransactionOptions) error {
return r.c.RunInTransaction.up(r.ds.RunInTransaction(f, opts))
}
« no previous file with comments | « no previous file | filter/featureBreaker/rds.go » ('j') | impl/prod/raw_datastore_type_converter_test.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698