OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |