Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Adding Hash & List examples
  • Loading branch information
https://github.com/hiennt committed Mar 4, 2015
1 parent 3c9dfc5 commit 145494f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ KeyValuePairs = ["key1", "value1", "key2", "value2", "key3", "value3"].
{ok, Values} = eredis:q(C, ["MGET" | ["key1", "key2", "key3"]]).
```

HASH

```erlang
HashObj = ["id", "objectId", "message", "message", "receiver", "receiver", "status", "read"].
eredis:q(C, ["HMSET", "key" | HashObj]).
{ok, Values} = eredis:q(C, ["HGETALL", "key"]).
```

LIST

```erlang
eredis:q(C, ["LPUSH", "keylist", "value"]).
eredis:q(C, ["RPUSH", "keylist", "value"]).
eredis:q(C, ["LRANGE", "keylist",0,-1]).
```

Transactions:

```erlang
Expand Down

0 comments on commit 145494f

Please sign in to comment.