Documentation
¶
Index ¶
- type Option
- func InAscOrder(fields ...string) Option
- func InDescOrder(fields ...string) Option
- func WithAllPreloads() Option
- func WithFilter(field string, value ...interface{}) Option
- func WithJoin(association string, conditions ...Option) Option
- func WithNotFilter(field string, value ...interface{}) Option
- func WithPagination(page, pageSize int) Option
- func WithPreloads(associations ...string) Option
- func WithSearchQuery(q string, fields ...interface{}) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
func InAscOrder ¶
func InDescOrder ¶
func WithAllPreloads ¶ added in v1.6.0
func WithAllPreloads() Option
func WithFilter ¶
WithFilter applies a WHERE clause for the given column. IMPORTANT: `field` MUST be a trusted, hardcoded column name. NEVER pass user-supplied strings as `field`.
func WithJoin ¶ added in v1.6.0
WithJoin joins the given association and optionally scopes the join with conditions. Conditions are applied only to the join clause, not the outer query.
func WithNotFilter ¶ added in v1.6.0
WithNotFilter applies a WHERE NOT clause for the given column. IMPORTANT: `field` MUST be a trusted, hardcoded column name. NEVER pass user-supplied strings as `field`.
func WithPagination ¶
func WithPreloads ¶ added in v1.6.0
func WithSearchQuery ¶
WithSearchQuery applies a WHERE clause searching `q` across multiple text fields using OR. Uses LOWER() for case-insensitive matching across SQLite and PostgreSQL. IMPORTANT: `fields` MUST be trusted, hardcoded column names. NEVER pass user-supplied strings as `fields`.