| OLD | NEW |
| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 d.data.addIndexes(idxs) | 133 d.data.addIndexes(idxs) |
| 134 } | 134 } |
| 135 | 135 |
| 136 func (d *dsImpl) TakeIndexSnapshot() ds.TestingSnapshot { | 136 func (d *dsImpl) TakeIndexSnapshot() ds.TestingSnapshot { |
| 137 return d.data.takeSnapshot() | 137 return d.data.takeSnapshot() |
| 138 } | 138 } |
| 139 | 139 |
| 140 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) { | 140 func (d *dsImpl) SetIndexSnapshot(snap ds.TestingSnapshot) { |
| 141 » d.data.setSnapshot(snap.(*memStore)) | 141 » d.data.setSnapshot(snap.(memStore)) |
| 142 } | 142 } |
| 143 | 143 |
| 144 func (d *dsImpl) CatchupIndexes() { | 144 func (d *dsImpl) CatchupIndexes() { |
| 145 d.data.catchupIndexes() | 145 d.data.catchupIndexes() |
| 146 } | 146 } |
| 147 | 147 |
| 148 func (d *dsImpl) SetTransactionRetryCount(count int) { | 148 func (d *dsImpl) SetTransactionRetryCount(count int) { |
| 149 d.data.setTxnRetry(count) | 149 d.data.setTxnRetry(count) |
| 150 } | 150 } |
| 151 | 151 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 return countQuery(fq, d.data.parent.aid, d.ns, true, d.data.snap, d.data
.snap) | 218 return countQuery(fq, d.data.parent.aid, d.ns, true, d.data.snap, d.data
.snap) |
| 219 } | 219 } |
| 220 | 220 |
| 221 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio
nOptions) error { | 221 func (*txnDsImpl) RunInTransaction(func(c context.Context) error, *ds.Transactio
nOptions) error { |
| 222 return errors.New("datastore: nested transactions are not supported") | 222 return errors.New("datastore: nested transactions are not supported") |
| 223 } | 223 } |
| 224 | 224 |
| 225 func (*txnDsImpl) Testable() ds.Testable { | 225 func (*txnDsImpl) Testable() ds.Testable { |
| 226 return nil | 226 return nil |
| 227 } | 227 } |
| OLD | NEW |