SDK methods
The SurrealDB SDK for PHP has a single SurrealDB class that provides methods for querying a remote SurrealDB database. The class is designed to be simple to use and easy to understand for developers who are new to PHP or SurrealDB. This page lists out the methods that are available in the SurrealDB class.
Initialization methods
Query methods
Mutation methods
| Function | Description |
|---|
$db->create($thing,$data) | Creates a record in the database |
$db->insert($thing,$data) | Inserts one or multiple records in the database |
$db->insertRelation($thing,$data) | Inserts one or multiple records in the database |
$db->update($thing,$data) | Updates all records in a table, or a specific record |
$db->merge($thing,$data) | Modifies all records in a table, or a specific record |
$db->patch($thing,$data) | Applies JSON Patch changes to all records in a table, or a specific record |
$db->delete($thing,$data) | Deletes all records, or a specific record |
Authentication methods
Utility methods