Skip to content

viest/PHP-FoundationDB

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PHP-FoundationDB

Build Status

FoundationDB is a distributed database designed to handle large volumes of structured data across clusters of commodity servers. It organizes data as an ordered key-value store and employs ACID transactions for all operations. It is especially well-suited for read/write workloads but also has excellent performance for write-intensive workloads.

Open Database

$foundationClient = new \Foundation\Client();

$database = $foundationClient
    ->connection('/usr/local/etc/foundationdb/fdb.cluster')
    ->database('DB');

Insert

Grammar

bool set(string $key, string $value);

Example

$database->set('viest', json_encode([
    'name' => 'JiexinWang',
    'age' => 22
]));

Find

Grammar

string get(string $key);

Example

$user = $database->get('viest');

Delete

Grammar

bool clear(string $key);

Example

$database->clear('viest')

Range

Grammar

array range(int $startIndex, int $endIndex);

Example

$rangeArray = $database->range(0, 2);