mathisburger / surrealdb
There is no license information available for the latest version (v1) of this package.
An API wrapper for the surrealdb API.
v1
2022-09-26 12:09 UTC
Requires
- php: ^7.4 || 8.0.*
- textalk/websocket: ^1.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.11
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-26 16:54:20 UTC
README
SurrealDb.php is a driver written in php for the surrealDb database. It supports some basic features that can be used to perform actions on the database. It uses the websocket API of the database.
Installation
Installation is quite easy with
composer require mathisburger/surrealdb
Usage
Just require the package via composer and follow the following guide how to create a new entry in the database:
// Only needed for plain PHP scripts that do not use a framework like symfony include './vendor/autoload.php'; use MathisBurger\SurrealDb\SurrealDriver; $conn = new SurrealDriver('ws://127.0.0.1:8000/rpc'); $conn->login('root', 'root'); $conn->useDatabase('test', 'test'); $conn->create('user', ['username' => 'Mathis', 'password' => 'Test']);
License
This project is MIT licensed.