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

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: 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..868bccf8d30bc09cd3392a0657ae6c02d98a4b6d 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) error {
+ return d.data.allocateIDs(keys)
}
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) error {
+ return d.data.parent.allocateIDs(keys)
}
func (d *txnDsImpl) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
« impl/dummy/dummy.go ('K') | « 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