Surqlize does not open its own connection. It runs queries through an SDK instance that implements the SDK's QueryExecutor contract, which the Surreal client does. You register that instance once during bootstrap, and Surqlize uses it for every model query.
Registering the executor
Create and connect an SDK Surreal instance, then hand it to the ConnectionManager.
Once set, model queries resolve the executor automatically.
Per-query executors
ConnectionManager is a global singleton. When you need to run against a different connection, or want to avoid the singleton entirely, inject an executor for a single query with withExecutor().
The model helper methods accept an executor through an executor: argument for the same purpose.
Note
Learn more
PHP SDK v2 for connecting the underlying client
Querying for running queries through the executor
Transactions for batching queries atomically