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

Unified Diff: impl/memory/testing_utils_test.go

Issue 1259593005: Add 'user friendly' datastore API. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: 100% coverage of new code 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
Index: impl/memory/testing_utils_test.go
diff --git a/impl/memory/testing_utils_test.go b/impl/memory/testing_utils_test.go
index b63425866ae2e30a9ead8c8123a6ee65e6c5ca69..f8aa745db82d51b3513068b5614e193ee7d5d55e 100644
--- a/impl/memory/testing_utils_test.go
+++ b/impl/memory/testing_utils_test.go
@@ -9,7 +9,7 @@ import (
"fmt"
"time"
- rds "github.com/luci/gae/service/rawdatastore"
+ ds "github.com/luci/gae/service/datastore"
"github.com/luci/luci-go/common/cmpbin"
)
@@ -34,20 +34,20 @@ func indx(kind string, orders ...string) *qIndex {
}
var (
- prop = rds.MkProperty
- propNI = rds.MkPropertyNI
+ prop = ds.MkProperty
+ propNI = ds.MkPropertyNI
)
-func key(kind string, id interface{}, parent ...rds.Key) rds.Key {
- p := rds.Key(nil)
+func key(kind string, id interface{}, parent ...ds.Key) ds.Key {
+ p := ds.Key(nil)
if len(parent) > 0 {
p = parent[0]
}
switch x := id.(type) {
case string:
- return rds.NewKey(globalAppID, "ns", kind, x, 0, p)
+ return ds.NewKey(globalAppID, "ns", kind, x, 0, p)
case int:
- return rds.NewKey(globalAppID, "ns", kind, "", int64(x), p)
+ return ds.NewKey(globalAppID, "ns", kind, "", int64(x), p)
default:
panic(fmt.Errorf("what the %T: %v", id, id))
}
@@ -71,16 +71,16 @@ func cat(bytethings ...interface{}) []byte {
cmpbin.WriteFloat64(buf, x)
case byte:
buf.WriteByte(x)
- case rds.PropertyType:
+ case ds.PropertyType:
buf.WriteByte(byte(x))
case string:
cmpbin.WriteString(buf, x)
case []byte:
buf.Write(x)
case time.Time:
- rds.WriteTime(buf, x)
- case rds.Key:
- rds.WriteKey(buf, rds.WithoutContext, x)
+ ds.WriteTime(buf, x)
+ case ds.Key:
+ ds.WriteKey(buf, ds.WithoutContext, x)
case *qIndex:
x.WriteBinary(buf)
default:

Powered by Google App Engine
This is Rietveld 408576698