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

Unified Diff: service/datastore/context.go

Issue 1355783002: Refactor keys and queries in datastore service and implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years, 3 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: service/datastore/context.go
diff --git a/service/datastore/context.go b/service/datastore/context.go
index 93f320c93bc6d1b3e470bd4cca24ba1a976cea41..1de3b246c55b016537a30c6731194d26159a324a 100644
--- a/service/datastore/context.go
+++ b/service/datastore/context.go
@@ -5,6 +5,7 @@
package datastore
import (
+ "github.com/luci/gae/service/info"
"golang.org/x/net/context"
)
@@ -47,7 +48,12 @@ func GetRaw(c context.Context) RawInterface {
// Get gets the Interface implementation from context.
func Get(c context.Context) Interface {
- return &datastoreImpl{GetRaw(c)}
+ inf := info.Get(c)
+ return &datastoreImpl{
+ GetRaw(c),
+ inf.FullyQualifiedAppID(),
+ inf.GetNamespace(),
+ }
}
// SetRawFactory sets the function to produce Datastore instances, as returned by

Powered by Google App Engine
This is Rietveld 408576698