method

LocalAPI.Distinct

func (local *LocalAPI) Distinct( ctx context.Context, collection string, options DistinctOptions, ) (store.DistinctPage, error)

Return paginated unique values for one direct field after access checks.

Source core/local.go:345

@param ctx
Request context.
@param collection
Authored collection slug.
@param options
Field, filter, paging, access, draft, trash, and locale controls.
@returns
Ascending unique values with page metadata, or an operation error.

Collection access and Where remain atomic in the adapter query; field read access is checked before values are selected.

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • DistinctOptions

    Field, filtering, pagination, authorization, draft, trash, and locale controls for one unique-value read.

  • DistinctPage

    Ascending unique values with ordinary page metadata.