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

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: Add empty arg/key short-circuits for other varidic methods. Created 4 years, 7 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
Index: impl/memory/datastore.go
diff --git a/impl/memory/datastore.go b/impl/memory/datastore.go
index 46c32e9864a55063d5b04555b2b4ac1e47c379c2..533f2f62b9c232a4060f83779370bf65b3b4d538 100644
--- a/impl/memory/datastore.go
+++ b/impl/memory/datastore.go
@@ -82,8 +82,8 @@ 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.PutMultiCB) error {
+ return d.data.allocateIDs(keys, cb)
}
func (d *dsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
@@ -188,8 +188,8 @@ 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.PutMultiCB) error {
+ return d.data.parent.allocateIDs(keys, cb)
}
func (d *txnDsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {

Powered by Google App Engine
This is Rietveld 408576698