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.
The core idea is small: describe your SurrealDB tables with models and attributes, then build queries 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.
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.
Getting started
Building queries
Schema and tooling
Sources
PHP SDK v2 that Surqlize builds on
Laravel integration for using Surqlize in Laravel