Skip to content

Commit

Permalink
query: always return the size
Browse files Browse the repository at this point in the history
fix #34
  • Loading branch information
MichaelMure committed Nov 27, 2019
1 parent 08467f0 commit edc4838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (a *accessor) Query(q dsq.Query) (dsq.Results, error) {
return dsq.Result{}, false
}
k := string(i.Key())
e := dsq.Entry{Key: k}
e := dsq.Entry{Key: k, Size: len(i.Value())}

if !q.KeysOnly {
buf := make([]byte, len(i.Value()))
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ require (
github.com/syndtr/goleveldb v1.0.0
)

replace github.com/ipfs/go-datastore => github.com/MichaelMure/go-datastore v0.1.1-0.20191122134937-68a77964d1eb

go 1.13

0 comments on commit edc4838

Please sign in to comment.