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

Side by Side Diff: service/datastore/testable.go

Issue 1355783002: Refactor keys and queries in datastore service and implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: appease errcheck 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 | « service/datastore/serialize/serialize_test.go ('k') | service/taskqueue/errors.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 datastore 5 package datastore
6 6
7 type TestingSnapshot interface{} 7 // TestingSnapshot is an opaque implementation-defined snapshot type.
8 type TestingSnapshot interface {
9 » ImATestingSnapshot()
10 }
8 11
9 // Testable is the testable interface for fake datastore implementations. 12 // Testable is the testable interface for fake datastore implementations.
10 type Testable interface { 13 type Testable interface {
11 // AddIndex adds the provided index. 14 // AddIndex adds the provided index.
12 // Blocks all datastore access while the index is built. 15 // Blocks all datastore access while the index is built.
13 // Panics if any of the IndexDefinition objects are not Compound() 16 // Panics if any of the IndexDefinition objects are not Compound()
14 AddIndexes(...*IndexDefinition) 17 AddIndexes(...*IndexDefinition)
15 18
16 // TakeIndexSnapshot allows you to take a snapshot of the current index 19 // TakeIndexSnapshot allows you to take a snapshot of the current index
17 // tables, which can be used later with SetIndexSnapshot. 20 // tables, which can be used later with SetIndexSnapshot.
(...skipping 14 matching lines...) Expand all
32 // 35 //
33 // But depending on the implementation it may implemented with an atomic 36 // But depending on the implementation it may implemented with an atomic
34 // operation. 37 // operation.
35 CatchupIndexes() 38 CatchupIndexes()
36 39
37 // SetTransactionRetryCount set how many times RunInTransaction will ret ry 40 // SetTransactionRetryCount set how many times RunInTransaction will ret ry
38 // transaction body pretending transaction conflicts happens. 0 (default ) 41 // transaction body pretending transaction conflicts happens. 0 (default )
39 // means commit succeeds on the first attempt (no retries). 42 // means commit succeeds on the first attempt (no retries).
40 SetTransactionRetryCount(int) 43 SetTransactionRetryCount(int)
41 } 44 }
OLDNEW
« no previous file with comments | « service/datastore/serialize/serialize_test.go ('k') | service/taskqueue/errors.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698