Git Product home page Git Product logo

rediz's Introduction

Rediz

NOTE: Somewhat production ready.... (Some big features are not implemented, but if this subset satisfies your needs then it is working well...)

Build Status

An Erlang Redis client based on the High-performance Shackle client library. A lot of this library's design was inspired and driven by the design/code in Anchor, and Shackle.

TODO

  • Rest of client commands
  • Faster decoding
  • Multi/Exec commands

Why

To get familiar with Shackle by doing a simple/small project.

Warning

Right now tests use the locally setup redis server, this could be very dangerous to your environment as they flush DBs.

Example

1> rediz:start(rediz_local_pool, #{ip => "127.0.0.1", 
                                   port => 6379, 
                                   auth => no_auth, 
                                   db => 0,
                                   pool_size => 16}).
ok

2> rediz:hset(<<"rediz:hash">>, <<"field">>, <<"val">>, rediz_local_pool).
{ok, 1}

3> rediz:hset(<<"rediz:hash">>, <<"field2">>, <<"val2">>, rediz_local_pool).
{ok, 1}

4> rediz:hkeys(<<"redis:hash">>, rediz_local_pool).
{ok, []}

5> rediz:hkeys(<<"rediz:hash">>, rediz_local_pool).
{ok, [<<"field2">>, <<"field">>]}

6> rediz:hget(<<"rediz:hash">>, <<"field2">>, rediz_local_pool).
{ok, <<"val2">>}

7> rediz:hgetall(<<"rediz:hash">>, rediz_local_pool).
{ok,[{<<"field2">>, <<"val2">>},
     {<<"field">>, <<"val">>}]}

8> rediz:keys(<<"rediz:*">>, rediz_local_pool).
{ok, [<<"rediz:hash">>]}

rediz's People

Contributors

amokhtar avatar gootik avatar

Watchers

 avatar  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.