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

Side by Side Diff: impl/prod/raw_datastore.go

Issue 1285703002: Add testable interface for datastore. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: rebase 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 prod 5 package prod
6 6
7 import ( 7 import (
8 ds "github.com/luci/gae/service/datastore" 8 ds "github.com/luci/gae/service/datastore"
9 "github.com/luci/gae/service/info" 9 "github.com/luci/gae/service/info"
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if !cb(dsR2F(k), tf.pm, cfunc) { 148 if !cb(dsR2F(k), tf.pm, cfunc) {
149 return nil 149 return nil
150 } 150 }
151 } 151 }
152 } 152 }
153 153
154 func (d rdsImpl) RunInTransaction(f func(c context.Context) error, opts *ds.Tran sactionOptions) error { 154 func (d rdsImpl) RunInTransaction(f func(c context.Context) error, opts *ds.Tran sactionOptions) error {
155 ropts := (*datastore.TransactionOptions)(opts) 155 ropts := (*datastore.TransactionOptions)(opts)
156 return datastore.RunInTransaction(d, f, ropts) 156 return datastore.RunInTransaction(d, f, ropts)
157 } 157 }
158
159 func (d rdsImpl) Testable() ds.Testable {
160 return nil
161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698