1package datastore23import (4 "gno.land/p/moul/collection/v0"5)67var defaultQuery = Query{indexName: collection.IDIndex}89// Query contains arguments for querying a storage.10type Query struct {11 offset int12 size int13 indexName string14 indexKey string15}1617// Offset returns the position of the first record to return.18// The minimum offset value is 0.19func (q Query) Offset() int {20 return q.offset21}2223// Size returns the maximum number of records a query returns.24func (q Query) Size() int {25 return q.size26}2728// IndexName returns the name of the storage index being used for the query.29func (q Query) IndexName() string {30 return q.indexName31}3233// IndexKey return the index key value to locate the records.34// An empty string is returned when all indexed records match the query.35func (q Query) IndexKey() string {36 return q.indexKey37}3839// IsEmpty checks if the query is empty.40// Empty queries return no records.41func (q Query) IsEmpty() bool {42 return q.indexName == ""43}44Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.