Skip to content

Libraries

/

Surqlize (ORM)

Surqlize

Surqlize is an object-relational mapper for SurrealDB in PHP. You describe tables as PHP classes with attributes, then compose SurrealQL through a typed query builder instead of writing strings. It is built on top of version 2 of the SDK and uses the SDK to execute queries.

Models and attributes describe your SurrealDB tables, and queries are built through typed PHP APIs that your IDE and static analyser understand. Surqlize compiles each query to a deterministic SurrealQL string for tests, and runs it through the SDK with parameter-bound values at runtime.

Important

Surqlize is published as 0.0.1-alpha.2 and is in early development. It requires PHP 8.4 and depends on the alpha v2 SDK, so its API may change.

Was this page helpful?