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

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: 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') | impl/memory/datastore_data.go » ('J')
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) { 91 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) {
92 d.data.setSnapshot(snap.(*memStore)) 92 d.data.setSnapshot(snap.(*memStore))
93 } 93 }
94 94
95 func (d *dsImpl) CatchupIndexes() { 95 func (d *dsImpl) CatchupIndexes() {
96 d.data.catchupIndexes() 96 d.data.catchupIndexes()
97 } 97 }
98 98
99 func (d *dsImpl) SetTransactionRetryCount(count int) { 99 func (d *dsImpl) SetTransactionRetryCount(count int) {
100 » d.data.txnFakeRetry = count 100 » d.data.setTxnRetry(count)
101 }
102
103 func (d *dsImpl) Consistent(always bool) {
104 » d.data.setConsistent(always)
101 } 105 }
102 106
103 func (d *dsImpl) Testable() ds.Testable { 107 func (d *dsImpl) Testable() ds.Testable {
104 return d 108 return d
105 } 109 }
106 110
107 ////////////////////////////////// txnDsImpl /////////////////////////////////// 111 ////////////////////////////////// txnDsImpl ///////////////////////////////////
108 112
109 type txnDsImpl struct { 113 type txnDsImpl struct {
110 data *txnDataStoreData 114 data *txnDataStoreData
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return executeQuery(q, d.ns, true, d.data.snap, d.data.snap, cb) 149 return executeQuery(q, d.ns, true, d.data.snap, d.data.snap, cb)
146 } 150 }
147 151
148 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error { 152 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio nOptions) error {
149 return errors.New("datastore: nested transactions are not supported") 153 return errors.New("datastore: nested transactions are not supported")
150 } 154 }
151 155
152 func (*txnDsImpl) Testable() ds.Testable { 156 func (*txnDsImpl) Testable() ds.Testable {
153 return nil 157 return nil
154 } 158 }
OLDNEW
« no previous file with comments | « no previous file | impl/memory/datastore_data.go » ('j') | impl/memory/datastore_data.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698