type
TypedListOptions
Filter, paginate, populate and project generated documents without changing the binding’s locale shape.
Properties
| Property | Type | Description |
|---|---|---|
Where | query.Expression | Atomic query predicate. |
Page | int | One-based result page. |
Limit | int | Maximum documents to return. |
SkipTotal | bool | SkipTotal skips counting every match; see ListOptions.SkipTotal. |
Sort | []query.Sort | Authored field ordering. |
TrashOnly | bool | Select only soft-deleted documents. |
Draft | *bool | Select the working head with true or the live head with false before filtering, sorting and pagination; nil uses the access-aware default. |
Select | []query.Path | Returned field projection. |
Populate | []query.Population | Expand authored relationship paths into typed target documents. |
OutputFields | []query.Path | Computed and inverse-join output selection. |
Actor | *store.Document | Authenticated actor. |
ActorCollection | schema.CollectionSlug | Auth collection owning Actor. |
System | bool | System skips access rules for trusted server code; see ListOptions.System. |
Locale | schema.LocaleCode | Single content locale. |
FallbackLocales | []schema.LocaleCode | Explicit locale fallback chain. |
DisableFallback | bool | Require an exact localized value. |
How it works
Ordinary collection handles read one locale. Localized projects also generate AllLocales bindings whose models contain locale maps. Both accept these list options, apply access predicates before pagination, and return no partial page after a decoding failure.
Full signature
type TypedListOptions struct {
// Where filters documents before pagination and remains atomic with access predicates.
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; see ListOptions.SkipTotal.
SkipTotal bool
// Sort orders results by authored field paths.
Sort []query.Sort
// TrashOnly returns deleted documents and is valid only for trash-enabled collections.
TrashOnly bool
// Draft explicitly includes draft documents when true or restricts reads to
// published documents when false. Nil preserves the Local API default.
Draft *bool
// 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
// 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 skips access rules for trusted server code; see ListOptions.System.
System 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
}