Skip to content

BeechCMS


BeechCMS / @beechcms/core / SelectOptions

Interface: SelectOptions ​

Properties ​

fields? ​

optional fields?: string[]

Column projection. Empty = SELECT *.


filterLogic? ​

optional filterLogic?: "AND" | "OR"

How top-level filters groups are combined. Defaults to 'AND'.


filters? ​

optional filters?: FilterGroup[]

Filter groups. Joined by filterLogic (default AND); conditions within a group are always ANDed.


isCount? ​

optional isCount?: boolean

When true, generates a COUNT(*) query instead of fetching rows. This omits projections, sorting/ordering clauses, and pagination limits/offsets, while keeping the join/where clauses intact for accurate counts.


kanbanOrder? ​

optional kanbanOrder?: object

When set, LEFT JOIN kanban_positions and order by fractional index (KB-S04c/S05). Mutually exclusive with orderBy; if both present, kanbanOrder wins.

axisBranchId ​

axisBranchId: string

seedSlug ​

seedSlug: string


locale? ​

optional locale?: SelectLocale

When set, filters and ORDER BY on localized branches compare the value resolved to locale.code (requested → default → first stored translation → legacy raw value) instead of the stored JSON. Absent: every column is compared raw, exactly as before localization existed.


orderBy? ​

optional orderBy?: object

Sort column and direction. Ignored when kanbanOrder is set.

column ​

column: string

dir ​

dir: "ASC" | "DESC"


pagination? ​

optional pagination?: object

LIMIT/OFFSET pagination.

limit ​

limit: number

offset ​

offset: number


resolveSeed? ​

optional resolveSeed?: (slug) => Seed | null | undefined

Resolves relation targets so search can match a relation display name (see resolveSearchSupport).

Parameters ​

slug ​

string

Returns ​

Seed | null | undefined


optional search?: string

Full-text search — uses FTS5 if the seed has indexable richtext/text branches.


status? ​

optional status?: string | null

Filters by status. null = no status filter.


trashed? ​

optional trashed?: TrashedMode

Soft-delete visibility. Defaults to 'active': omitting it can never leak a trashed row.