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

Unified Diff: impl/dummy/dummy.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, 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
Index: impl/dummy/dummy.go
diff --git a/impl/dummy/dummy.go b/impl/dummy/dummy.go
index 11b1a8278be46781484ce8c071b3d1dac3dfd529..234100d5f884d077bd8592c8c17aa7cc4f5199e6 100644
--- a/impl/dummy/dummy.go
+++ b/impl/dummy/dummy.go
@@ -10,9 +10,9 @@ import (
"strings"
"time"
+ "github.com/luci/gae/service/datastore"
"github.com/luci/gae/service/info"
"github.com/luci/gae/service/memcache"
- "github.com/luci/gae/service/rawdatastore"
"github.com/luci/gae/service/taskqueue"
"golang.org/x/net/context"
)
@@ -64,27 +64,27 @@ func ni() error {
type rds struct{}
-func (rds) NewKey(kind string, sid string, iid int64, par rawdatastore.Key) rawdatastore.Key {
- return rawdatastore.NewKey("dummy~appid", "", kind, sid, iid, par)
+func (rds) NewKey(kind string, sid string, iid int64, par datastore.Key) datastore.Key {
+ return datastore.NewKey("dummy~appid", "", kind, sid, iid, par)
}
-func (rds) DecodeKey(string) (rawdatastore.Key, error) { panic(ni()) }
-func (rds) PutMulti([]rawdatastore.Key, []rawdatastore.PropertyLoadSaver, rawdatastore.PutMultiCB) error {
+func (rds) DecodeKey(string) (datastore.Key, error) { panic(ni()) }
+func (rds) PutMulti([]datastore.Key, []datastore.PropertyMap, datastore.PutMultiCB) error {
panic(ni())
}
-func (rds) GetMulti([]rawdatastore.Key, rawdatastore.GetMultiCB) error { panic(ni()) }
-func (rds) DeleteMulti([]rawdatastore.Key, rawdatastore.DeleteMultiCB) error { panic(ni()) }
-func (rds) NewQuery(string) rawdatastore.Query { panic(ni()) }
-func (rds) Run(rawdatastore.Query, rawdatastore.RunCB) error { panic(ni()) }
-func (rds) RunInTransaction(func(context.Context) error, *rawdatastore.TransactionOptions) error {
+func (rds) GetMulti([]datastore.Key, datastore.GetMultiCB) error { panic(ni()) }
+func (rds) DeleteMulti([]datastore.Key, datastore.DeleteMultiCB) error { panic(ni()) }
+func (rds) NewQuery(string) datastore.Query { panic(ni()) }
+func (rds) Run(datastore.Query, datastore.RawRunCB) error { panic(ni()) }
+func (rds) RunInTransaction(func(context.Context) error, *datastore.TransactionOptions) error {
panic(ni())
}
var dummyRDSInst = rds{}
-// RawDatastore returns a dummy rawdatastore.Interface implementation suitable
+// RawDatastore returns a dummy datastore.Interface implementation suitable
// for embedding. Every method panics with a message containing the name of the
// method which was unimplemented.
-func RawDatastore() rawdatastore.Interface { return dummyRDSInst }
+func RawDatastore() datastore.RawInterface { return dummyRDSInst }
/////////////////////////////////// mc ////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698