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

Unified Diff: service/datastore/serialize/invertible.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: inequalities work now 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: service/datastore/serialize/invertible.go
diff --git a/service/datastore/serialize/invertible.go b/service/datastore/serialize/invertible.go
index 98ac514b9f7df4af4b8b2d9705f44f35df89343c..b71f96b511a13806736256415a5ef3efa5b0db33 100644
--- a/service/datastore/serialize/invertible.go
+++ b/service/datastore/serialize/invertible.go
@@ -12,6 +12,9 @@ import (
// that this package requires.
type Buffer interface {
String() string
+ Bytes() []byte
+ Len() int
+
Grow(int)
Read([]byte) (int, error)
@@ -46,7 +49,7 @@ var _ Buffer = (*bytes.Buffer)(nil)
// then you definitely don't need it!
type InvertibleBuffer interface {
Buffer
- Invert()
+ SetInvert(inverted bool)
}
type invertibleBuffer struct {
@@ -110,6 +113,6 @@ func (ib *invertibleBuffer) ReadByte() (byte, error) {
return ret, err
}
-func (ib *invertibleBuffer) Invert() {
- ib.invert = !ib.invert
+func (ib *invertibleBuffer) SetInvert(inverted bool) {
+ ib.invert = inverted
}

Powered by Google App Engine
This is Rietveld 408576698