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

Side by Side Diff: impl/memory/datastore.go

Issue 1366793002: Add Consistent(bool) to Testing interface (Closed) Base URL: https://github.com/luci/gae.git@move_serialization_helpers
Patch Set: fix errcheck in test... 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 unified diff | Download patch
« no previous file with comments | « no previous file | impl/memory/datastore_data.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 memory 5 package memory
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) { 96 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) {
97 d.data.setSnapshot(snap.(*memStore)) 97 d.data.setSnapshot(snap.(*memStore))
98 } 98 }
99 99
100 func (d *dsImpl) CatchupIndexes() { 100 func (d *dsImpl) CatchupIndexes() {
101 d.data.catchupIndexes() 101 d.data.catchupIndexes()
102 } 102 }
103 103
104 func (d *dsImpl) SetTransactionRetryCount(count int) { 104 func (d *dsImpl) SetTransactionRetryCount(count int) {
105 » d.data.txnFakeRetry = count 105 » d.data.setTxnRetry(count)
106 }
107
108 func (d *dsImpl) Consistent(always bool) {
109 » d.data.setConsistent(always)
106 } 110 }
107 111
108 func (d *dsImpl) Testable() ds.Testable { 112 func (d *dsImpl) Testable() ds.Testable {
109 return d 113 return d
110 } 114 }
111 115
112 ////////////////////////////////// txnDsImpl /////////////////////////////////// 116 ////////////////////////////////// txnDsImpl ///////////////////////////////////
113 117
114 type txnDsImpl struct { 118 type txnDsImpl struct {
115 data *txnDataStoreData 119 data *txnDataStoreData
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return countQuery(fq, d.ns, true, d.data.snap, d.data.snap) 158 return countQuery(fq, d.ns, true, d.data.snap, d.data.snap)
155 } 159 }
156 160
157 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error { 161 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error {
158 return errors.New("datastore: nested transactions are not supported") 162 return errors.New("datastore: nested transactions are not supported")
159 } 163 }
160 164
161 func (*txnDsImpl) Testable() ds.Testable { 165 func (*txnDsImpl) Testable() ds.Testable {
162 return nil 166 return nil
163 } 167 }
OLDNEW
« no previous file with comments | « no previous file | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698