Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 SDK. For use with version 1.x, see here.

SurrealLike

SurrealLike = Pick<Surreal, "create" | "select" | "update" | "delete" | "query" | "relate"> & Partial<Pick<Surreal, "connect" | "close">>

Defined in: define/table/types/model.ts:22

A type that represents any SurrealDB-compatible object that can perform CRUD operations. This includes Surreal instances, SurrealSession instances, and Transaction objects.

This type picks only the core methods that are guaranteed to be available across all SurrealDB object types, ensuring maximum compatibility. connect and close are optional as they are not present on transaction objects.