Documentation ¶
Overview ¶
Package ormlist defines options for listing items from ORM indexes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option = listinternal.Option
Option represents a list option.
func Cursor ¶
Cursor specifies a cursor after which to restart iteration. Cursor values are returned by iterators and in pagination results.
func End ¶
func End(values ...interface{}) Option
End defines the values to use to end range iteration. It cannot be combined with Prefix.
Values must correspond in type to the index's fields and the number of values provided cannot exceed the number of fields in the index, although fewer values can be provided.
Range iteration can only be done for start and end values which are well-ordered, meaning that any unordered components must be equal. Ex. the bytes type is considered unordered, so a range iterator is created over an index with a bytes field, both start and end must have the same value for bytes.
func Prefix ¶
func Prefix(values ...interface{}) Option
Prefix defines values to use for prefix iteration. It cannot be used together with Start or End.
Values must correspond in type to the index's fields and the number of values provided cannot exceed the number of fields in the index, although fewer values can be provided.
func Reverse ¶
func Reverse() Option
Reverse reverses the direction of iteration. If Reverse is provided twice, iteration will happen in the forward direction.
func Start ¶
func Start(values ...interface{}) Option
Start defines the values to use to start range iteration. It cannot be combined with Prefix.
Values must correspond in type to the index's fields and the number of values provided cannot exceed the number of fields in the index, although fewer values can be provided.
Range iteration can only be done for start and end values which are well-ordered, meaning that any unordered components must be equal. Ex. the bytes type is considered unordered, so a range iterator is created over an index with a bytes field, both start and end must have the same value for bytes.