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

Side by Side Diff: filter/count/rds.go

Issue 1306373002: filter/count: Fix alignment on 32-bit systems. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Use &...{} instead of new. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package count 5 package count
6 6
7 import ( 7 import (
8 "golang.org/x/net/context" 8 "golang.org/x/net/context"
9 9
10 ds "github.com/luci/gae/service/datastore" 10 ds "github.com/luci/gae/service/datastore"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return r.c.PutMulti.up(r.ds.PutMulti(keys, vals, cb)) 71 return r.c.PutMulti.up(r.ds.PutMulti(keys, vals, cb))
72 } 72 }
73 73
74 func (r *dsCounter) Testable() ds.Testable { 74 func (r *dsCounter) Testable() ds.Testable {
75 return r.ds.Testable() 75 return r.ds.Testable()
76 } 76 }
77 77
78 // FilterRDS installs a counter datastore filter in the context. 78 // FilterRDS installs a counter datastore filter in the context.
79 func FilterRDS(c context.Context) (context.Context, *DSCounter) { 79 func FilterRDS(c context.Context) (context.Context, *DSCounter) {
80 state := &DSCounter{} 80 state := &DSCounter{}
81 state.NewKey.init()
82 state.DecodeCursor.init()
83 state.DecodeKey.init()
84 state.NewQuery.init()
85 state.RunInTransaction.init()
86 state.Run.init()
87 state.DeleteMulti.init()
88 state.GetMulti.init()
89 state.PutMulti.init()
90
81 return ds.AddRawFilters(c, func(ic context.Context, ds ds.RawInterface) ds.RawInterface { 91 return ds.AddRawFilters(c, func(ic context.Context, ds ds.RawInterface) ds.RawInterface {
82 return &dsCounter{state, ds} 92 return &dsCounter{state, ds}
83 }), state 93 }), state
84 } 94 }
OLDNEW
« filter/count/count.go ('K') | « filter/count/mc.go ('k') | filter/count/tq.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698