type

FindOptions

Projection, population, authorization, draft, trash, and locale controls for one read.

Properties

PropertyTypeDescription
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; required to disambiguate multiple auth collections.
SystemboolSystem skips access rules for trusted server code; see ListOptions.System.
TrashOnlyboolRead from trash; valid only for trash-enabled collections.
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.FindOptions. A nil OutputFields resolves every output field; a non-nil empty slice resolves none.

Full signature

type FindOptions struct { // Select is nil for all authored fields. A non-nil empty slice returns only // document metadata. Select []query.Path Populate []query.Population // OutputFields limits computed and inverse-join resolution independently // from Select. Nil resolves all; 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 *store.Document ActorCollection schema.CollectionSlug // System skips access rules for trusted server code; see ListOptions.System. System bool TrashOnly bool Locale schema.LocaleCode FallbackLocales []schema.LocaleCode DisableFallback bool AllLocales bool }

Source core/local.go:127