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

Side by Side Diff: impl/prod/raw_datastore.go

Issue 1270113002: Re-add metadata passthrough on Get operations (Closed) Base URL: https://github.com/luci/gae.git@fix_other_interfaces
Patch Set: cleanup Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « impl/memory/raw_datastore.go ('k') | service/datastore/checkfilter.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package prod 5 package prod
6 6
7 import ( 7 import (
8 ds "github.com/luci/gae/service/datastore" 8 ds "github.com/luci/gae/service/datastore"
9 "github.com/luci/gae/service/info" 9 "github.com/luci/gae/service/info"
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return err 92 return err
93 } 93 }
94 94
95 func (d rdsImpl) DeleteMulti(ks []ds.Key, cb ds.DeleteMultiCB) error { 95 func (d rdsImpl) DeleteMulti(ks []ds.Key, cb ds.DeleteMultiCB) error {
96 err := datastore.DeleteMulti(d, dsMF2R(ks)) 96 err := datastore.DeleteMulti(d, dsMF2R(ks))
97 return idxCallbacker(err, len(ks), func(_ int, err error) { 97 return idxCallbacker(err, len(ks), func(_ int, err error) {
98 cb(err) 98 cb(err)
99 }) 99 })
100 } 100 }
101 101
102 func (d rdsImpl) GetMulti(keys []ds.Key, cb ds.GetMultiCB) error { 102 func (d rdsImpl) GetMulti(keys []ds.Key, _meta ds.MultiMetaGetter, cb ds.GetMult iCB) error {
103 rkeys := dsMF2R(keys) 103 rkeys := dsMF2R(keys)
104 vals := make([]datastore.PropertyLoadSaver, len(keys)) 104 vals := make([]datastore.PropertyLoadSaver, len(keys))
105 for i := range keys { 105 for i := range keys {
106 vals[i] = &typeFilter{ds.PropertyMap{}} 106 vals[i] = &typeFilter{ds.PropertyMap{}}
107 } 107 }
108 err := datastore.GetMulti(d, rkeys, vals) 108 err := datastore.GetMulti(d, rkeys, vals)
109 return idxCallbacker(err, len(keys), func(idx int, err error) { 109 return idxCallbacker(err, len(keys), func(idx int, err error) {
110 cb(vals[idx].(*typeFilter).pm, err) 110 cb(vals[idx].(*typeFilter).pm, err)
111 }) 111 })
112 } 112 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if !cb(dsR2F(k), tf.pm, cfunc) { 148 if !cb(dsR2F(k), tf.pm, cfunc) {
149 return nil 149 return nil
150 } 150 }
151 } 151 }
152 } 152 }
153 153
154 func (d rdsImpl) RunInTransaction(f func(c context.Context) error, opts *ds.Tran sactionOptions) error { 154 func (d rdsImpl) RunInTransaction(f func(c context.Context) error, opts *ds.Tran sactionOptions) error {
155 ropts := (*datastore.TransactionOptions)(opts) 155 ropts := (*datastore.TransactionOptions)(opts)
156 return datastore.RunInTransaction(d, f, ropts) 156 return datastore.RunInTransaction(d, f, ropts)
157 } 157 }
OLDNEW
« no previous file with comments | « impl/memory/raw_datastore.go ('k') | service/datastore/checkfilter.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698