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

Unified Diff: impl/memory/datastore.go

Issue 2007123002: datastore: Update AllocateIDs to take keys. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Rebase, comments. Created 4 years, 6 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/dummy/dummy.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 b78600e0dbc0db65ae1c49a8bd7ace1f6be6f344..255446d4570b805e1cbb8da832fc0374559c70e8 100644
--- a/impl/memory/datastore.go
+++ b/impl/memory/datastore.go
@@ -82,11 +82,11 @@ type dsImpl struct {
var _ ds.RawInterface = (*dsImpl)(nil)
-func (d *dsImpl) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
- return d.data.allocateIDs(incomplete, n)
+func (d *dsImpl) AllocateIDs(keys []*ds.Key, cb ds.NewKeyCB) error {
+ return d.data.allocateIDs(keys, cb)
}
-func (d *dsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
+func (d *dsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.NewKeyCB) error {
d.data.putMulti(keys, vals, cb)
return nil
}
@@ -188,11 +188,11 @@ type txnDsImpl struct {
var _ ds.RawInterface = (*txnDsImpl)(nil)
-func (d *txnDsImpl) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
- return d.data.parent.allocateIDs(incomplete, n)
+func (d *txnDsImpl) AllocateIDs(keys []*ds.Key, cb ds.NewKeyCB) error {
+ return d.data.parent.allocateIDs(keys, cb)
}
-func (d *txnDsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
+func (d *txnDsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.NewKeyCB) error {
return d.data.run(func() error {
d.data.putMulti(keys, vals, cb)
return nil
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698