method
LocalAPI.Distinct
Return paginated unique values for one direct field after access checks.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | Request context. |
collection | string | Authored collection slug. |
options | DistinctOptions | Field, filter, paging, access, draft, trash, and locale controls. |
Returns
Ascending unique values with page metadata, or an operation error.
(store.DistinctPage, error)How it works
Collection access and Where remain atomic in the adapter query; field read access is checked before values are selected.
Full signature
func (local *LocalAPI) Distinct(
ctx context.Context,
collection string,
options DistinctOptions,
) (store.DistinctPage, error)Related types
LocalAPIIn-process content operations that share the REST authorization and lifecycle pipeline.
DistinctOptionsField, filtering, pagination, authorization, draft, trash, and locale controls for one unique-value read.
DistinctPageAscending unique values with ordinary page metadata.