feat: add a Surreal Eloquent query foundation#118
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an initial SurrealDB-backed Laravel Query Builder / Eloquent foundation so the surreal connection can be used for standard model workflows (e.g., User::query()), with a feature test proving basic CRUD against a real Surreal runtime.
Changes:
- Introduces a custom
SurrealQueryBuilderand wires it intoSurrealSchemaConnection::query(). - Extends
SurrealSchemaConnectionto execute select/insert/update/delete operations via SurrealQL overSurrealHttpClient. - Adds a feature test that boots a local Surreal instance and validates common
UserEloquent operations onDB_CONNECTION=surreal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| tests/Feature/SurrealEloquentDriverTest.php | Proves core Eloquent CRUD/lookup behavior works on the surreal connection using a real local Surreal runtime. |
| app/Services/Surreal/Schema/SurrealSchemaConnection.php | Adds query execution + record CRUD helpers, plus wiring for a custom query builder and default query grammar/processor. |
| app/Services/Surreal/Query/SurrealQueryBuilder.php | Implements minimal Query Builder overrides (get/insert/insertGetId/update/delete/exists/count) backed by SurrealSchemaConnection helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
surrealdatabase connection into a real data connection instead of a schema-only shimUserEloquent test onDB_CONNECTION=surrealVerification
Closes #117