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

Unified Diff: impl/memory/context.go

Issue 1270063002: Rename rawdatastore -> datastore (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: and a bit more 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_test.go ('k') | impl/memory/plist.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/context.go
diff --git a/impl/memory/context.go b/impl/memory/context.go
index ec588e712981c7f08709443eb334348e13f064e0..4edef60e087d20c596990a77cf793c2a64cacc95 100644
--- a/impl/memory/context.go
+++ b/impl/memory/context.go
@@ -8,7 +8,7 @@ import (
"errors"
"sync"
- rds "github.com/luci/gae/service/rawdatastore"
+ ds "github.com/luci/gae/service/datastore"
"golang.org/x/net/context"
)
@@ -18,7 +18,7 @@ type memContextObj interface {
applyTxn(c context.Context, m memContextObj)
endTxn()
- mkTxn(*rds.TransactionOptions) memContextObj
+ mkTxn(*ds.TransactionOptions) memContextObj
}
type memContext []memContextObj
@@ -61,7 +61,7 @@ func (m memContext) endTxn() {
}
}
-func (m memContext) mkTxn(o *rds.TransactionOptions) memContextObj {
+func (m memContext) mkTxn(o *ds.TransactionOptions) memContextObj {
ret := make(memContext, len(m))
for i, itm := range m {
ret[i] = itm.mkTxn(o)
@@ -132,7 +132,7 @@ var memContextKey memContextKeyType
// fake TaskQueue is NOT backed by the fake Datastore. This is done to make the
// test-access API for TaskQueue better (instead of trying to reconstitute the
// state of the task queue from a bunch of datastore accesses).
-func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *rds.TransactionOptions) error {
+func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *ds.TransactionOptions) error {
curMC := cur(d.c)
txnMC := curMC.mkTxn(o)
@@ -154,7 +154,7 @@ func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *rds.Transact
if curMC.canApplyTxn(txnMC) {
curMC.applyTxn(d.c, txnMC)
} else {
- return rds.ErrConcurrentTransaction
+ return ds.ErrConcurrentTransaction
}
return nil
}
« no previous file with comments | « impl/dummy/dummy_test.go ('k') | impl/memory/plist.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698