Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badboy/redis.erl
simple implemenation of a redis library in erlang.
https://github.com/badboy/redis.erl
Last synced: 10 days ago
JSON representation
simple implemenation of a redis library in erlang.
- Host: GitHub
- URL: https://github.com/badboy/redis.erl
- Owner: badboy
- Created: 2010-01-25T22:46:23.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2010-01-25T23:09:04.000Z (about 15 years ago)
- Last Synced: 2025-01-19T20:15:01.248Z (13 days ago)
- Language: Erlang
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
redis.erl
=========simple implemenation of a [redis][] library written in [erlang][].
This is my first try with erlang, so no high quality code to expect.
It is untested and has some bugs.
Feel free to fork away and improve it ;)
Usage
-----First connect is as easy as you think:
Sock = redis:connect().
This connects to the redis server running on localhost:6379
now you can call the commands:
1> redis:set(Sock, "foo", "bar").
ok
2> redis:keys(Sock).
["foo"]
3> redis:get(Sock, "foo").
"bar"
4> redis:exists(Sock, "bar").
false
5> redis:size(Sock).
1
6> redis:incr(Sock, "counter").
1
7> redis:incr(Sock, "counter").
2
8> redis:incrby(Sock, "counter", 3).
5
9> ...Implemented Commands
--------------------So far the following commands are implemented
(but not fully tested ;))* KEYS (fails if given DATA size is > 9, pattern matching needs improvement)
* SET
* GET
* EXISTS
* DEL
* TYPE
* SELECT
* TTL
* INCR
* DECR
* INCRBY
* DECRBY
* INFO (parsed into List, but given DATA size is ignored)according to the [Command Reference][commandreference] there are a lot missing.
What is missing?
----------------* TESTS!
* implementation of more/all commands
* bug fixes
* TESTS!
* correctly handle bulk responses
* TESTS!Author
------Jan-Erik Rediger :: @badboy_
[redis]: http://github.com/antirez/redis/
[erlang]: http://github.com/erlang/otp/
[commandreference]: http://code.google.com/p/redis/wiki/CommandReference