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

Side by Side Diff: service/datastore/datastore.go

Issue 1530503003: Return error on Get(*Key). (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years 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 | « no previous file | service/datastore/datastore_test.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 datastore 5 package datastore
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "reflect" 9 "reflect"
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 for i, e := range errs { 212 for i, e := range errs {
213 me[i] = e 213 me[i] = e
214 } 214 }
215 err = me 215 err = me
216 } 216 }
217 } 217 }
218 return err 218 return err
219 } 219 }
220 220
221 func isOkType(v reflect.Type) bool { 221 func isOkType(v reflect.Type) bool {
222 if v == typeOfKey {
223 return false
224 }
222 if v.Implements(typeOfPropertyLoadSaver) { 225 if v.Implements(typeOfPropertyLoadSaver) {
223 return true 226 return true
224 } 227 }
225 if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct { 228 if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct {
226 return true 229 return true
227 } 230 }
228 return false 231 return false
229 } 232 }
230 233
231 func (d *datastoreImpl) ExistsMulti(keys []*Key) ([]bool, error) { 234 func (d *datastoreImpl) ExistsMulti(keys []*Key) ([]bool, error) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 err = lme.Get() 336 err = lme.Get()
334 if err == nil { 337 if err == nil {
335 err = extErr 338 err = extErr
336 } 339 }
337 return 340 return
338 } 341 }
339 342
340 func (d *datastoreImpl) Raw() RawInterface { 343 func (d *datastoreImpl) Raw() RawInterface {
341 return d.RawInterface 344 return d.RawInterface
342 } 345 }
OLDNEW
« no previous file with comments | « no previous file | service/datastore/datastore_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698