Download the PHP package s00d/rocksdb-client-php without Composer
On this page you can find all versions of the php package s00d/rocksdb-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download s00d/rocksdb-client-php
More information about s00d/rocksdb-client-php
Files in s00d/rocksdb-client-php
Package rocksdb-client-php
Short Description A PHP client for interacting with RocksDB server
License MIT
Informations about the package rocksdb-client-php
RocksDB Client PHP
A PHP client for interacting with RocksDB server.
Overview
This package is a part of the RocksDBFusion project. Before integrating this client into your application, you need to run the RocksDB server provided by RocksDBFusion.
Installation
You can install the package via Composer:
Workflow
Below is the diagram illustrating how the client interacts with the RocksDB server:
Configuration
Laravel Integration
-
Add the service provider:
In your
config/app.php
file, add the service provider to theproviders
array:And the alias to the
aliases
array: -
Publish the configuration file:
This will create a
config/rocksdb.php
configuration file where you can set the connection details. -
Update your
.env
file:Add your RocksDB connection details to the
.env
file: -
Usage:
Now you can use the RocksDB client in your Laravel application:
Direct Usage (Without Laravel)
If you want to use the client without Laravel, you can directly instantiate the RocksDBClient
class.
-
Create an instance:
- Usage:
Server Setup
This package is a client for the RocksDB server, which is part of the RocksDBFusion project. Before using this client, ensure the RocksDB server is running. You can set up and run the server by following the instructions in the RocksDBFusion repository.
Methods
put
Stores a key-value pair in the database.
get
Retrieves the value of a key from the database.
delete
Deletes a key from the database.
merge
Merges a value with an existing key.
listColumnFamilies
Lists all column families in the database.
createColumnFamily
Creates a new column family.
dropColumnFamily
Drops an existing column family.
compactRange
Compacts the database within a range.
Transactions
Begin Transaction
Begins a new transaction.
Commit Transaction
Commits a transaction.
Rollback Transaction
Rolls back a transaction.
License
This project is licensed under the MIT License - see the LICENSE file for details.