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

Unified Diff: filter/count/rds.go

Issue 1357343002: Add missing AllocateIDs API. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: add panic 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') | no next file with comments »
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 b289ce65a344eebd57ec0af590d3646a6852c6e2..c10bc8350803da02a571deb6f98bec4c813cfb1e 100644
--- a/filter/count/rds.go
+++ b/filter/count/rds.go
@@ -12,6 +12,7 @@ import (
// DSCounter is the counter object for the datastore service.
type DSCounter struct {
+ AllocateIDs Entry
DecodeCursor Entry
RunInTransaction Entry
Run Entry
@@ -28,6 +29,11 @@ type dsCounter struct {
var _ ds.RawInterface = (*dsCounter)(nil)
+func (r *dsCounter) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
+ start, err := r.ds.AllocateIDs(incomplete, n)
+ return start, r.c.AllocateIDs.up(err)
+}
+
func (r *dsCounter) DecodeCursor(s string) (ds.Cursor, error) {
cursor, err := r.ds.DecodeCursor(s)
return cursor, r.c.DecodeCursor.up(err)
« no previous file with comments | « no previous file | filter/featureBreaker/rds.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698