karlomikus / rqlite
There is no license information available for the latest version (0.1.0) of this package.
0.1.0
2024-11-03 15:46 UTC
Requires
- php: ^8.2|^8.3
- psr/http-message: ^2.0
- psr/log: ^3.0
Requires (Dev)
- fakerphp/faker: ^1.23
- guzzlehttp/guzzle: ^7.0
- mockery/mockery: ^1.6
- pestphp/pest: ^3.5
- phpstan/phpstan: ^1.12
- symfony/var-dumper: ^7.1
Suggests
- ext-curl: To use the Curl adapter
- guzzlehttp/guzzle: To use the Guzzle adapter
This package is auto-updated.
Last update: 2024-12-03 15:58:59 UTC
README
A basic rqlite client for PHP. Supports multiple HTTP adapters (Curl, Guzzle, Basic PHP file stream). Returns strongly typed results. Rqlite is a lightweight, distributed relational database, which uses SQLite as its storage engine.
Installation
composer require karlomikus/rqlite
Usage
<?php use Kami\Rqlite\Rqlite; use Kami\Rqlite\Adapters\Curl; // Create a http adapter and point it to your rqlite server // You can create your own adapter by implementing the Adapter interface $curlAdapter = new Curl('http://localhost:4001'); // Create a Rqlite client instance and pass the adapter as a constructor argument $rqlite = new Rqlite($curlAdapter); // Run your SQL queries // Supports status(), query() and execute() endpoints $result = $rqlite->query([ 'SELECT * FROM foo', ]); // Get the results // By default the results from query endpoint are fetch as associative arrays var_dump($result);