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

Unified Diff: service/datastore/raw_interface.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
« service/datastore/key.go ('K') | « service/datastore/multiarg.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/raw_interface.go
diff --git a/service/datastore/raw_interface.go b/service/datastore/raw_interface.go
index bfb9a9f83da4af42d3427cecc000ca4cdfac4766..d464d2bc0884510e0acfae574ec3824017a4cfe7 100644
--- a/service/datastore/raw_interface.go
+++ b/service/datastore/raw_interface.go
@@ -105,12 +105,12 @@ func (m MultiMetaGetter) GetSingle(idx int) MetaGetter {
// reflection work. See datastore.Interface for a more user-friendly interface.
type RawInterface interface {
// AllocateIDs allows you to allocate IDs from the datastore without putting
- // any data. `incomplete` must be a PartialValid Key. If there's no error,
- // a contiguous block of IDs of n length starting at `start` will be reserved
- // indefinitely for the user application code for use in new keys. The
- // appengine automatic ID generator will never automatically assign these IDs
- // for Keys of this type.
- AllocateIDs(incomplete *Key, n int) (start int64, err error)
+ // any data. The supplied keys must be PartialValid and share the same entity
+ // type.
+ //
+ // If there's no error, the keys in the slice will be replaced with keys
+ // containing integer IDs assigned to them.
+ AllocateIDs(keys []*Key, cb PutMultiCB) error
iannucci 2016/06/14 01:46:04 maybe PutMultiCB should be renamed? Or duplicated
// RunInTransaction runs f in a transaction.
//
« service/datastore/key.go ('K') | « service/datastore/multiarg.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698