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

Unified Diff: impl/memory/datastore.go

Issue 1372473002: Add the ability to disable special automatic entities in impl/memory (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: add more docstring 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/context.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore.go
diff --git a/impl/memory/datastore.go b/impl/memory/datastore.go
index 33a245e62a455a9450ae4b873183af4d64ef945c..84f5adddb53b2fbbb571bed4ff50c868532da881 100644
--- a/impl/memory/datastore.go
+++ b/impl/memory/datastore.go
@@ -41,8 +41,7 @@ type dsImpl struct {
var _ ds.RawInterface = (*dsImpl)(nil)
func (d *dsImpl) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
- start := d.data.allocateIDs(incomplete, n)
- return start, nil
+ return d.data.allocateIDs(incomplete, n)
}
func (d *dsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
@@ -121,6 +120,10 @@ func (d *dsImpl) AutoIndex(enable bool) {
d.data.setAutoIndex(enable)
}
+func (d *dsImpl) DisableSpecialEntities(enabled bool) {
+ d.data.setDisableSpecialEntities(enabled)
+}
+
func (d *dsImpl) Testable() ds.Testable {
return d
}
@@ -135,8 +138,7 @@ type txnDsImpl struct {
var _ ds.RawInterface = (*txnDsImpl)(nil)
func (d *txnDsImpl) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
- start := d.data.parent.allocateIDs(incomplete, n)
- return start, nil
+ return d.data.parent.allocateIDs(incomplete, n)
}
func (d *txnDsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
« no previous file with comments | « impl/memory/context.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698