FieldSelect
FieldSelect<
TFields> = { [K in keyof TFields]?: true | NestedFieldSelect | TypedExpr<unknown> } &object&object
Defined in: define/table/types/select.ts:104
Type-safe field selection object. Maps field names to selection values (true, nested selection, or typed expression).
Type Declaration
Section titled “Type Declaration”*?
optional*:true
Type Parameters
Section titled “Type Parameters”TFields
Section titled “TFields”TFields extends Record<string, FieldDefinition<unknown>>
The field definitions of the table.
Example
Section titled “Example”// Select specific fields{ title: true, content: true }
// Select with nested record{ title: true, author: { name: true, email: true } }
// Select all + expand record{ '*': true, author: true }
// With custom computed field{ title: true, commentCount: typed<number>(surql`count(<-comment)`) }