func (qr QueryRange) UpperBoundValue() interface{} {
	if qr.UpperBound == nil {
		return nil
	}
	if qr.IncludeUpperBound {
		return qr.UpperBound
	}
	switch t := qr.UpperBound.(type) {
	case int64:
		return t - 1
	case time.Time:
		return t.Unix() - 1
	default:
		panic("not implemented")
	}
}
UpperBoundValue returns the value for the upper bound. If the upper bound is
nil, nil will be returned.
package indexer
import (
	"time"
	"github.com/tendermint/tendermint/libs/pubsub/query"
)
type QueryRanges map[string]QueryRange
type QueryRange struct {
	LowerBound        interface{}  
	UpperBound        interface{}  
	Key               string
	IncludeLowerBound bool
	IncludeUpperBound bool
}
func (qr QueryRange) AnyBound() interface{} {
	if qr.LowerBound != nil {
		return qr.LowerBound
	}
	return qr.UpperBound
}
func (qr QueryRange) LowerBoundValue() interface{} {
	if qr.LowerBound == nil {
		return nil
	}
	if qr.IncludeLowerBound {
		return qr.LowerBound
	}
	switch t := qr.LowerBound.(type) {
	case int64:
		return t + 1
	case time.Time:
		return t.Unix() + 1
	default:
		panic("not implemented")
	}
}