Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2025 v0.1.0 Nov 28, 2025 Changes in this version + var AllIntervals = []Interval + var ErrQueryNotSupported = errors.New("the requested query option is not supported") + func FromCursor(val []byte) uint64 + func FromInterval(val Interval) (string, error) + func FromIntervalWithFallback(val Interval, fallback string) string + func FromOrdering(val Ordering) (string, error) + func FromOrderingWithFallback(val Ordering, fallback string) string + func PaginateQuery(query string, opts []interface{}, cursor Cursor, limit uint64, ...) (string, []interface{}) + func PaginateQueryOnField(query string, opts []interface{}, cursor Cursor, limit uint64, ...) (string, []interface{}) + type Cursor []byte + var EmptyCursor Cursor = Cursor([]byte{}) + func ToCursor(val uint64) Cursor + func (c Cursor) ToBase58() string + func (c Cursor) ToUint64() uint64 + type Filter struct + Valid bool + Value uint64 + func NewFilter(value uint64) Filter + func (f *Filter) IsValid() bool + func (f *Filter) Set(value uint64) + type Interval uint8 + const IntervalDay + const IntervalHour + const IntervalMonth + const IntervalRaw + const IntervalWeek + func ToInterval(val string) (Interval, error) + func ToIntervalWithFallback(val string, fallback Interval) Interval + type Option func(*QueryOptions) error + func WithCursor(val []byte) Option + func WithDirection(val Ordering) Option + func WithEndTime(val time.Time) Option + func WithFilter(val Filter) Option + func WithInterval(val Interval) Option + func WithLimit(val uint64) Option + func WithStartTime(val time.Time) Option + type Ordering uint + const Ascending + const Descending + func ToOrdering(val string) (Ordering, error) + func ToOrderingWithFallback(val string, fallback Ordering) Ordering + type QueryOptions struct + Cursor Cursor + End time.Time + FilterBy Filter + Interval Interval + Limit uint64 + SortBy Ordering + Start time.Time + Supported SupportedOptions + func DefaultPaginationHandler(opts ...Option) (*QueryOptions, error) + func DefaultPaginationHandlerWithLimit(limit uint64, opts ...Option) (*QueryOptions, error) + func (qo *QueryOptions) Apply(opts ...Option) error + type SupportedOptions byte + const CanBucketBy + const CanFilterBy + const CanLimitResults + const CanQueryByCursor + const CanQueryByEndTime + const CanQueryByStartTime + const CanSortBy