source: project/wiki/eggref/4/redis @ 29421

Last change on this file since 29421 was 29421, checked in by anonymous, 7 years ago

abarbu documentation update

File size: 1.5 KB
Line 
1[[tags: egg db]]
2[[toc:]]
3
4== redis
5
6This page is maintained in the package's
7[[https://github.com/abarbu/redis-chicken |github repository]].
8
9Fast bindings to redis using hiredis. Note that you will need to fetch
10the git submodules in this package. These bindings provide only the
11synchornous API and at the moment do not provide timeouts.
12
13<procedure>(redis-connect hostname port)</procedure>
14
15Connect to a redis host, will produce an error if the connection
16fails. Returns an opaque pointer to the redis context.
17
18<procedure>(redis-command context string)</procedure>
19
20Send the string as a command to redis and parse the reply. Arrays are
21converted into lists.
22
23=== Example
24<enscript hilight="scheme">
25   (redis-command (redis-connect "127.0.0.1" 6379) "keys *")
26</enscript>
27
28This will produce a list of strings, the keys in the redis database.
29
30=== License
31
32Copyright 2012 Andrei Barbu. All rights reserved.
33
34Contact Andrei Barbu at andrei@0xab.com.
35
36This program is free software: you can redistribute it and/or modify
37it under the terms of the GNU Lesser General Public License as published by
38the Free Software Foundation, either version 3 of the License, or
39(at your option) any later version.
40This program is distributed in the hope that it will be useful,
41but WITHOUT ANY WARRANTY; without even the implied warranty of
42MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43GNU Lesser General Public License for more details.
44You should have received a copy of the GNU Lesser General Public License
45along with this program.  If not, see http://www.gnu.org/licenses.
Note: See TracBrowser for help on using the repository browser.