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

Issue 2011773002: datastore: variadic Get, Put, Exists, Delete. (Closed)

Created:
4 years, 7 months ago by dnj
Modified:
4 years, 6 months ago
Reviewers:
dnj (Google), iannucci
CC:
chromium-reviews, infra-reviews+luci-gae_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/luci/gae@master
Target Ref:
refs/heads/master
Project:
luci-gae
Visibility:
Public.

Description

datastore: variadic Get, Put, Exists, Delete. Fixes #51. Update Get, Put, Exists, and Delete to be variadic. This will make the interface more usable and get rid of boilerplate in client code. Get, Put, Exists, and Delete now accept variadic arguments. Any one of these arguments can be an argument that was previously valid or the *Multi version of those functions. This effectively obsoletes the *Multi versions, but they are left in for backwards compatiblility with the stated intention of removing them at a later date. Get/Put/Exists/Delete will now return a single error in the one-argument case or a MultiError in a multiple-argument case. Note that now that single argument case can take a slice type, the single error may itself be a MultiError if the single argument is a slice. Committed: https://github.com/luci/gae/commit/ee5266ebb4c1957a848000175f03ddb6845d01ed

Patch Set 1 #

Total comments: 12

Patch Set 2 : ExistsMulti and DeleteMulti are also friends. #

Patch Set 3 : Handle empty slices, Exists now has its own test. #

Patch Set 4 : Update documentation and fix/clarify behavior on ExistsResult. #

Total comments: 14

Patch Set 5 : Comments, added PLS chan support because why not. #

Patch Set 6 : s/chn/chan/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1432 lines, -532 lines) Patch
M service/datastore/datastore.go View 1 5 chunks +126 lines, -76 lines 0 comments Download
M service/datastore/datastore_test.go View 1 2 3 4 12 chunks +518 lines, -295 lines 0 comments Download
M service/datastore/interface.go View 1 2 3 4 3 chunks +114 lines, -51 lines 0 comments Download
M service/datastore/multiarg.go View 1 2 3 4 5 5 chunks +394 lines, -110 lines 0 comments Download
M service/datastore/types.go View 1 2 3 1 chunk +178 lines, -0 lines 0 comments Download
A service/datastore/types_test.go View 1 2 3 1 chunk +102 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (14 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2011773002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2011773002/1
4 years, 7 months ago (2016-05-25 05:26:34 UTC) #2
dnj
PTAL. I've written a few annotations, but hopefully mostly straightforward. I think there was some ...
4 years, 7 months ago (2016-05-25 05:27:16 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-25 05:32:23 UTC) #6
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-25 05:32:31 UTC) #7
iannucci
high-level comments, will make lower-level comments when I have more bandwidth. https://chromiumcodereview.appspot.com/2011773002/diff/1/service/datastore/interface.go File service/datastore/interface.go (right): ...
4 years, 7 months ago (2016-05-25 17:36:47 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2011773002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2011773002/40001
4 years, 6 months ago (2016-05-27 16:49:55 UTC) #11
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started ...
4 years, 6 months ago (2016-05-27 16:49:59 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2011773002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2011773002/80001
4 years, 6 months ago (2016-05-27 18:12:50 UTC) #16
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started ...
4 years, 6 months ago (2016-05-27 18:12:52 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2011773002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2011773002/80001
4 years, 6 months ago (2016-05-27 20:32:25 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-27 20:37:37 UTC) #22
iannucci
lgtm https://chromiumcodereview.appspot.com/2011773002/diff/80001/service/datastore/interface.go File service/datastore/interface.go (right): https://chromiumcodereview.appspot.com/2011773002/diff/80001/service/datastore/interface.go#newcode144 service/datastore/interface.go:144: // - []I where i is some interface ...
4 years, 6 months ago (2016-05-28 02:50:53 UTC) #23
dnj
https://chromiumcodereview.appspot.com/2011773002/diff/80001/service/datastore/interface.go File service/datastore/interface.go (right): https://chromiumcodereview.appspot.com/2011773002/diff/80001/service/datastore/interface.go#newcode144 service/datastore/interface.go:144: // - []I where i is some interface type. ...
4 years, 6 months ago (2016-05-28 17:47:21 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2011773002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2011773002/120001
4 years, 6 months ago (2016-05-28 17:49:23 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-05-28 17:54:19 UTC) #29
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://github.com/luci/gae/commit/ee5266ebb4c1957a848000175f03ddb6845d01ed

Powered by Google App Engine
This is Rietveld 408576698