diff --git a/datastore.go b/datastore.go index 6f8a610..b017230 100644 --- a/datastore.go +++ b/datastore.go @@ -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())) diff --git a/go.mod b/go.mod index 360fd10..8312dd9 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module github.com/ipfs/go-ds-leveldb require ( - github.com/ipfs/go-datastore v0.1.1 + github.com/ipfs/go-datastore v0.2.0 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 diff --git a/go.sum b/go.sum index 24c53bd..e07a4e0 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/MichaelMure/go-datastore v0.1.1-0.20191122134937-68a77964d1eb h1:qM6ZggZcvA/AvP1fzcgyKNWzTBCPNyOyGEgJwvNoZ9w= +github.com/MichaelMure/go-datastore v0.1.1-0.20191122134937-68a77964d1eb/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= @@ -10,8 +12,6 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ipfs/go-datastore v0.1.1 h1:F4k0TkTAZGLFzBOrVKDAvch6JZtuN4NHkfdcEZL50aI= -github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY=