Index: service/datastore/testable.go |
diff --git a/service/datastore/testable.go b/service/datastore/testable.go |
index 14e3d8e822f1565148e4f767c0ebc3324fb63863..331156fbd4f7b33f74e3d9441b20a0b6488bdfac 100644 |
--- a/service/datastore/testable.go |
+++ b/service/datastore/testable.go |
@@ -57,4 +57,20 @@ type Testable interface { |
// |
// By default this is false. |
AutoIndex(bool) |
+ |
+ // DisableSpecialEntities turns off maintenance of special __entity_group__ |
+ // type entities. By default this mainenance is enabled, but it can be |
+ // disabled by calling this with true. |
+ // |
+ // If it's true: |
+ // - AllocateIDs returns an error. |
+ // - Put'ing incomplete Keys returns an error. |
+ // - Transactions are disabled and will return an error. |
+ // |
+ // This is mainly only useful when using an embedded in-memory datastore as |
+ // a fully-consistent 'datastore-lite'. In particular, this is useful for the |
+ // txnBuf filter which uses it to fulfil queries in a buffered transaction, |
+ // but never wants the in-memory versions of these entities to bleed through |
+ // to the user code. |
+ DisableSpecialEntities(bool) |
} |