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 datastore | 5 package datastore |
6 | 6 |
7 // TestingSnapshot is an opaque implementation-defined snapshot type. | 7 // TestingSnapshot is an opaque implementation-defined snapshot type. |
8 type TestingSnapshot interface { | 8 type TestingSnapshot interface { |
9 ImATestingSnapshot() | 9 ImATestingSnapshot() |
10 } | 10 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // CatchupIndexes or use Take/SetIndexSnapshot to manipulate the index s
tate. | 50 // CatchupIndexes or use Take/SetIndexSnapshot to manipulate the index s
tate. |
51 Consistent(always bool) | 51 Consistent(always bool) |
52 | 52 |
53 // AutoIndex controls the index creation behavior. If it is set to true,
then | 53 // AutoIndex controls the index creation behavior. If it is set to true,
then |
54 // any time the datastore encounters a missing index, it will silently c
reate | 54 // any time the datastore encounters a missing index, it will silently c
reate |
55 // one and allow the query to succeed. If it's false, then the query wil
l | 55 // one and allow the query to succeed. If it's false, then the query wil
l |
56 // return an error describing the index which could be added with AddInd
exes. | 56 // return an error describing the index which could be added with AddInd
exes. |
57 // | 57 // |
58 // By default this is false. | 58 // By default this is false. |
59 AutoIndex(bool) | 59 AutoIndex(bool) |
| 60 |
| 61 // DisableSpecialEntities turns off maintenance of special __entity_grou
p__ |
| 62 // type entities. By default this mainenance is enabled, but it can be |
| 63 // disabled by calling this with true. |
| 64 // |
| 65 // If it's true: |
| 66 // - AllocateIDs returns an error. |
| 67 // - Put'ing incomplete Keys returns an error. |
| 68 // - Transactions are disabled and will return an error. |
| 69 // |
| 70 // This is mainly only useful when using an embedded in-memory datastore
as |
| 71 // a fully-consistent 'datastore-lite'. In particular, this is useful fo
r the |
| 72 // txnBuf filter which uses it to fulfil queries in a buffered transacti
on, |
| 73 // but never wants the in-memory versions of these entities to bleed thr
ough |
| 74 // to the user code. |
| 75 DisableSpecialEntities(bool) |
60 } | 76 } |
OLD | NEW |