type

ListOptions

Filtering, pagination, projection, population, authorization, and locale controls for a list read.

Properties

PropertyTypeDescription
Wherequery.ExpressionFilter documents atomically with the access predicate.
PageintOne-based page; zero selects the first.
LimitintMaximum documents returned per page.
SkipTotalboolSkipTotal skips counting every match, like REST pagination=false. The page then has a nil Total and an exact HasNextPage.
Sort[]query.SortStable authored-field ordering.
Select[]query.PathRestrict returned stored fields.
Populate[]query.PopulationExpand configured relationship paths.
OutputFields[]query.PathLimit computed and inverse-join fields independently of Select.
Draft*boolInclude drafts when true or require published content when false.
Actor*store.DocumentActor used by access rules.
ActorCollectionschema.CollectionSlugExact auth collection owning Actor.
SystemboolSystem runs the call as trusted server code: collection, field, draft and reference access rules are skipped. Validation, hooks, versions and reference integrity still apply, and Actor, when set, still reaches hooks. Only Go code can set it; REST and GraphQL never do.
TrashOnlyboolList trashed documents only.
Localeschema.LocaleCodeSelected content locale.
FallbackLocales[]schema.LocaleCodeOptional replacement fallback chain.
DisableFallbackboolDisable locale fallbacks.
AllLocalesboolReturn all localized values.

How it works

The root package re-exports this type as ridu.ListOptions. TrashOnly is valid only for trash-enabled collections.

Full signature

type ListOptions struct { // Where filters documents before pagination and remains atomic with access predicates. // Paths with a Read rule on the field or an ancestor are not queryable. Where query.Expression // Page is the one-based result page. Zero selects the first page. Page int // Limit is the maximum documents returned per page. Limit int // SkipTotal skips counting every match, like REST pagination=false. The // page then has a nil Total and an exact HasNextPage. SkipTotal bool // Sort orders results by authored field paths without Read rules on the field or ancestors. // Container sorts also require all descendants to have no Read rules. Sort []query.Sort // Select restricts returned document fields. Select []query.Path // Populate expands configured relationship paths. Populate []query.Population // OutputFields limits computed and inverse-join resolution without // projecting away stored fields. Nil resolves all output fields; a non-nil // empty slice resolves none. OutputFields []query.Path // Draft explicitly includes draft documents when true or restricts reads to // published documents when false. Nil preserves the Local API default. Draft *bool // Actor is the authenticated document used by access rules. Actor *store.Document // ActorCollection identifies the exact auth collection that owns Actor. ActorCollection schema.CollectionSlug // System runs the call as trusted server code: collection, field, draft // and reference access rules are skipped. Validation, hooks, versions and // reference integrity still apply, and Actor, when set, still reaches // hooks. Only Go code can set it; REST and GraphQL never do. System bool // TrashOnly returns deleted documents and is valid only for trash-enabled collections. TrashOnly bool // Locale selects one configured content locale. Empty uses the application default. Locale schema.LocaleCode // FallbackLocales replaces the locale's configured fallback chain when non-nil. FallbackLocales []schema.LocaleCode // DisableFallback requires an exact value in Locale. DisableFallback bool // AllLocales returns locale-keyed values for localized fields. AllLocales bool }

Source core/local.go:21