项目作者: viest

项目描述 :
PHP FoundationDB Drive
高级语言: C
项目地址: git://github.com/viest/PHP-FoundationDB.git
创建时间: 2018-05-03T06:24:48Z
项目社区:https://github.com/viest/PHP-FoundationDB

开源协议:

下载


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

  1. $foundationClient = new \Foundation\Client();
  2. $database = $foundationClient
  3. ->connection('/usr/local/etc/foundationdb/fdb.cluster')
  4. ->database('DB');

Insert

Grammar

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

Example

  1. $database->set('viest', json_encode([
  2. 'name' => 'JiexinWang',
  3. 'age' => 22
  4. ]));

Find

Grammar

  1. string get(string $key);

Example

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

Delete

Grammar

  1. bool clear(string $key);

Example

  1. $database->clear('viest')

Range

Grammar

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

Example

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