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

Unified Diff: impl/memory/gkvlite_iter.go

Issue 1365743002: Refactor serialization helpers from impl/memory -> service/datastore/serialize (Closed) Base URL: https://github.com/luci/gae.git@estimate_size
Patch Set: fix comments 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
« no previous file with comments | « impl/memory/datastore_query_test.go ('k') | impl/memory/gkvlite_iter_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/gkvlite_iter.go
diff --git a/impl/memory/gkvlite_iter.go b/impl/memory/gkvlite_iter.go
index 417815da3574a1b4f1e1cbcf350a92e6e39cffc3..f75ca02d248d2d965e31e37192912ee18b1ceda9 100644
--- a/impl/memory/gkvlite_iter.go
+++ b/impl/memory/gkvlite_iter.go
@@ -8,6 +8,7 @@ import (
"bytes"
"sync"
+ "github.com/luci/gae/service/datastore/serialize"
"github.com/luci/gkvlite"
)
@@ -64,7 +65,7 @@ func multiIterate(defs []*iterDefinition, cb func(suffix []byte) bool) {
}
def := defs[idx]
- it.next(bjoin(def.prefix, suffix), func(itm *gkvlite.Item) {
+ it.next(serialize.Join(def.prefix, suffix), func(itm *gkvlite.Item) {
if itm == nil {
// we hit the end of an iterator, we're now done with the whole
// query.
@@ -127,11 +128,11 @@ func (def *iterDefinition) mkIter() *iterator {
// convert the suffixes from the iterDefinition into full rows for the
// underlying storage.
- start := bjoin(prefix, def.start)
+ start := serialize.Join(prefix, def.start)
end := []byte(nil)
if def.end != nil {
- end = bjoin(prefix, def.end)
+ end = serialize.Join(prefix, def.end)
}
go func() {
« no previous file with comments | « impl/memory/datastore_query_test.go ('k') | impl/memory/gkvlite_iter_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698