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

Unified Diff: impl/memory/datastore.go

Issue 1292913002: Split off serialization and key functions to their own packages. (Closed) Base URL: https://github.com/luci/gae.git@make_queries_better
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/datastore.go
diff --git a/impl/memory/datastore.go b/impl/memory/datastore.go
index 8af720030bf7a489c6b3915b90210dc13691636d..857b06e307a686b38eef483c4e650fb3467ea6b3 100644
--- a/impl/memory/datastore.go
+++ b/impl/memory/datastore.go
@@ -11,6 +11,7 @@ import (
"golang.org/x/net/context"
ds "github.com/luci/gae/service/datastore"
+ "github.com/luci/gae/service/datastore/dskey"
)
//////////////////////////////////// public ////////////////////////////////////
@@ -41,11 +42,11 @@ type dsImpl struct {
var _ ds.RawInterface = (*dsImpl)(nil)
func (d *dsImpl) DecodeKey(encoded string) (ds.Key, error) {
- return ds.NewKeyFromEncoded(encoded)
+ return dskey.NewFromEncoded(encoded)
}
func (d *dsImpl) NewKey(kind, stringID string, intID int64, parent ds.Key) ds.Key {
- return ds.NewKey(globalAppID, d.ns, kind, stringID, intID, parent)
+ return dskey.New(globalAppID, d.ns, kind, stringID, intID, parent)
}
func (d *dsImpl) PutMulti(keys []ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
@@ -114,11 +115,11 @@ type txnDsImpl struct {
var _ ds.RawInterface = (*txnDsImpl)(nil)
func (d *txnDsImpl) DecodeKey(encoded string) (ds.Key, error) {
- return ds.NewKeyFromEncoded(encoded)
+ return dskey.NewFromEncoded(encoded)
}
func (d *txnDsImpl) NewKey(kind, stringID string, intID int64, parent ds.Key) ds.Key {
- return ds.NewKey(globalAppID, d.ns, kind, stringID, intID, parent)
+ return dskey.New(globalAppID, d.ns, kind, stringID, intID, parent)
}
func (d *txnDsImpl) PutMulti(keys []ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698