OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The LUCI 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 under the Apache License, Version 2.0 |
3 // found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
4 | 4 |
5 // Package txnBuf contains a transaction buffer filter for the datastore | 5 // Package txnBuf contains a transaction buffer filter for the datastore |
6 // service. | 6 // service. |
7 // | 7 // |
8 // By default, datastore transactions take a snapshot of the entity group as | 8 // By default, datastore transactions take a snapshot of the entity group as |
9 // soon as you Get or Put into it. All subsequent Get (and query) operations | 9 // soon as you Get or Put into it. All subsequent Get (and query) operations |
10 // reflect the state of the ORIGINAL transaction snapshot, regardless of any | 10 // reflect the state of the ORIGINAL transaction snapshot, regardless of any |
11 // Put/Delete operations you've done since the beginning of the transaction. | 11 // Put/Delete operations you've done since the beginning of the transaction. |
12 // | 12 // |
13 // If you've installed this transaction buffer, then: | 13 // If you've installed this transaction buffer, then: |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // from the moment that it begins iteration). Note, however, that datastore | 67 // from the moment that it begins iteration). Note, however, that datastore |
68 // operations within the callback are still synchronized. This behavior is | 68 // operations within the callback are still synchronized. This behavior is |
69 // so that the user is not forced to buffer all of the query results before | 69 // so that the user is not forced to buffer all of the query results before |
70 // doing work with them, but can treat the query like a stream of events, | 70 // doing work with them, but can treat the query like a stream of events, |
71 // if they so choose. | 71 // if they so choose. |
72 // | 72 // |
73 // - The changing of namespace inside of a transaction is undefined... This is | 73 // - The changing of namespace inside of a transaction is undefined... This is |
74 // just generally a terrible idea anyway, but I thought it was worth | 74 // just generally a terrible idea anyway, but I thought it was worth |
75 // mentioning. | 75 // mentioning. |
76 package txnBuf | 76 package txnBuf |
OLD | NEW |