Changeset 29422 in project


Ignore:
Timestamp:
07/27/13 19:26:04 (6 years ago)
Author:
anonymous
Message:

redis 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/redis

    r29421 r29422  
    1919
    2020Send the string as a command to redis and parse the reply. Arrays are
    21 converted into lists.
     21converted into lists. Due to a bug in hiredis if your command has a
     22string argument which contains whitespace you need to use
     23''redis-command*'' instead as it is impossible to correctly escape
     24whitespace characters. If you want to pass in binary data you should
     25also look at ''redis-command*'' instead.
     26
     27<procedure>(redis-command* context command . arguments)</procedure>
     28
     29Like ''redis-command'' but separately specifies the command and each
     30of its arguments. When you have a string argument which contains
     31whitespace you must use this function instead of ''redis-command''
     32because of a bug in hiredis.
    2233
    2334=== Example
     
    2839This will produce a list of strings, the keys in the redis database.
    2940
     41<enscript hilight="scheme">
     42   (begin (redis-command* (redis-connect "127.0.0.1" 6379) "hset" "a" "b" "x y z")
     43          (redis-command* (redis-connect "127.0.0.1" 6379) "hget" "a" "b"))
     44</enscript>
     45
     46Set key ''b'' in hash table ''a'' to a string which may contain
     47whitespace and retrieve that string.
     48
    3049=== License
    3150
    32 Copyright 2012 Andrei Barbu. All rights reserved.
     51Copyright 2012-2013 Andrei Barbu. All rights reserved.
    3352
    3453Contact Andrei Barbu at andrei@0xab.com.
Note: See TracChangeset for help on using the changeset viewer.