Giter Club home page Giter Club logo

php_saekv's Introduction

SaeKV

imitate sina cloud SaeKV class.

Travis CI

Travis-ci

codecov

codecov

Github badge

Downloads Size tag license languages

Installation

Use Composer to install the library. Of course, You can go to Packagist to view.

    $ composer require yakeing/php_saekv

KV init

    $kv = new SaeKV(3000);
    $ret = $kv->init("accesskey");

KV set data

      $kv->set('kev','value');

KV add data

    $kv->add('kev','value');

KV get data

    $kv->get('kev');

KV delete data

    $kv->delete('kev');

replace data

    $ret = $kv->replace('abc', 'cccccc');

Get multiple groups of data

    $keys = array();
    array_push($keys, 'abc1');
    array_push($keys, 'abc2');
    array_push($keys, 'abc3');
    $ret = $kv->mget($keys);

Get prefix range data

    $ret = $kv->pkrget('abc', 3);

Get all data

    $ret = $kv->pkrget('');

Invalid

$ret = $kv->pkrget('', 100);

while(true){

var_dump($ret);

end($ret);

$start_key = key($ret);

$i = count($ret);

if ($i < 100) break;

$ret = $kv->pkrget('', 100, $start_key);

}

get options list

    $opts = $kv->get_options();

set options

    $opts = array('encodekey' => 0);
    $ret = $kv->set_options($opts);

Local file

    kvdb.txt (json)
    {
        kev1:value1,
        kev2:[
            kev2:value2,
            kev3:value3
        ],.....
    }

Original document

Documents: SaeKV-code

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

Sponsor

Author

weibo: yakeing

twitter: yakeing

php_saekv's People

Contributors

yakeing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.