use proto everywhere on v2 stores

This commit is contained in:
Barak Michener 2015-06-23 16:57:42 -04:00
parent 80ddf74cd2
commit 390d012fc4
3 changed files with 60 additions and 46 deletions

View file

@ -16,7 +16,6 @@ package bolt
import (
"bytes"
"encoding/json"
"errors"
"fmt"
@ -25,6 +24,7 @@ import (
"github.com/google/cayley/graph"
"github.com/google/cayley/graph/iterator"
"github.com/google/cayley/graph/proto"
"github.com/google/cayley/quad"
)
@ -114,8 +114,8 @@ func (it *Iterator) Close() error {
}
func (it *Iterator) isLiveValue(val []byte) bool {
var entry IndexEntry
json.Unmarshal(val, &entry)
var entry proto.HistoryEntry
entry.Unmarshal(val)
return len(entry.History)%2 != 0
}