Skip to content

Commit

Permalink
Ooops
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed May 27, 2024
1 parent 58afaaf commit b201032
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import "time"

const (
DefaultIndex = "primary"

)

var (
Expand Down
2 changes: 0 additions & 2 deletions pack_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type packData struct {
packedDefaultSpace []byte
packedDefaultIndex []byte
packedIterEq []byte
packedDefaultLimit []byte
packedDefaultOffset []byte
packedSingleKey []byte
spaceMap map[string]uint64
Expand Down Expand Up @@ -52,7 +51,6 @@ func newPackData(defaultSpace interface{}) *packData {
packedDefaultSpace: packedDefaultSpace,
packedDefaultIndex: encodeValues2(KeyIndexNo, uint32(0)),
packedIterEq: encodeValues2(KeyIterator, IterEq),
packedDefaultLimit: encodeValues2(KeyLimit, DefaultLimit),
packedDefaultOffset: encodeValues2(KeyOffset, 0),
packedSingleKey: packSelectSingleKey(),
spaceMap: make(map[string]uint64),
Expand Down
3 changes: 2 additions & 1 deletion select.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ func (q *Select) packMsg(data *packData, b []byte) (o []byte, err error) {
}

if q.Limit == 0 {
o = append(o, data.packedDefaultLimit...)
o = msgp.AppendUint(o, KeyLimit)
o = msgp.AppendUint(o, uint(DefaultLimit))
} else {
o = msgp.AppendUint(o, KeyLimit)
o = msgp.AppendUint(o, uint(q.Limit))
Expand Down

0 comments on commit b201032

Please sign in to comment.