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.

ReturnType

ReturnType = "NONE" | "none" | "BEFORE" | "before" | "AFTER" | "after" | "DIFF" | "diff" | string[] | { value: string; } | BoundQuery | Expr

Defined in: define/table/types/query.ts:255

Defines the RETURN clause options for INSERT/UPDATE statements.

  • "NONE" - Return nothing
  • "BEFORE" - Return the record before the operation (for INSERT, same as NONE)
  • "AFTER" - Return the record after the operation (default)
  • "DIFF" - Return the changeset diff
  • string[] - Return specific fields
  • { value: string } - Return VALUE of a single field
  • BoundQuery - Native SurrealQL expression (e.g., surqlid, name, count(<-comment)“)`
  • Expr - SurrealDB expression