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

Unified Diff: impl/prod/datastore_key.go

Issue 1253263002: Make rawdatastore API safer for writing filters. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix comments Created 5 years, 5 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
« no previous file with comments | « impl/memory/raw_datastore_test.go ('k') | impl/prod/info.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/datastore_key.go
diff --git a/impl/prod/datastore_key.go b/impl/prod/datastore_key.go
index ac1980a97644f289e8a31f9cbfb4301c7ff079ac..b2e93937147ee70209db6a0c6dc6b9e98889bd35 100644
--- a/impl/prod/datastore_key.go
+++ b/impl/prod/datastore_key.go
@@ -22,25 +22,6 @@ func dsR2F(k *datastore.Key) rds.Key {
return dsKeyImpl{k}
}
-// dsR2FErr (DS real-to-fake with error) acts like dsR2F, but is for wrapping function
-// invocations which return (*Key, error). e.g.
-//
-// return dsR2FErr(datastore.Put(...))
-//
-// instead of:
-//
-// k, err := datastore.Put(...)
-// if err != nil {
-// return nil, err
-// }
-// return dsR2F(k), nil
-func dsR2FErr(k *datastore.Key, err error) (rds.Key, error) {
- if err != nil {
- return nil, err
- }
- return dsR2F(k), nil
-}
-
// dsF2R (DS fake-to-real) converts a DSKey back to an SDK *Key.
func dsF2R(k rds.Key) *datastore.Key {
if rkey, ok := k.(dsKeyImpl); ok {
@@ -59,16 +40,6 @@ func dsF2R(k rds.Key) *datastore.Key {
return rkey
}
-// dsMR2F (DS multi-real-to-fake) converts a slice of SDK keys to their wrapped
-// types.
-func dsMR2F(ks []*datastore.Key) []rds.Key {
- ret := make([]rds.Key, len(ks))
- for i, k := range ks {
- ret[i] = dsR2F(k)
- }
- return ret
-}
-
// dsMF2R (DS multi-fake-to-fake) converts a slice of wrapped keys to SDK keys.
func dsMF2R(ks []rds.Key) []*datastore.Key {
ret := make([]*datastore.Key, len(ks))
« no previous file with comments | « impl/memory/raw_datastore_test.go ('k') | impl/prod/info.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698