Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 alpha SDK. For the stable version, see npm.

InferSelectResult

InferSelectResult<TFields, TSelect> = TSelect extends BoundQuery | Expr ? unknown : TSelect extends string[] ? Partial<InferShapeFromFields<TFields>> : TSelect extends object ? InferSelectResultFromFields<TFields, TSelect> : InferShapeFromFields<TFields>

Defined in: define/table/types/select.ts:283

Infers the complete result type from a select option.

TFields extends Record<string, FieldDefinition<unknown>>

The field definitions of the table.

TSelect

The select option value.

  • FieldSelect object → Precise type based on selection
  • String array → Partial
  • BoundQuery/Expr → unknown (or generic override)