Source

newlisp-redis /

Filename Size Date modified Message
65 B
1.1 KB
6.1 KB
2.5 KB
-*- markdown -*-

newLISP-redis
=============

newLISP-redis allows newLISP scripts to access the [Redis](http://code.google.com/p/redis) key-value store.

Build
-----
Just drop the redis.lsp file into your working directory or directly invoke it with

    (load "/path/to/newlisp-redis/redis.lsp")

To generate documentation just run

    make

or `newlispdoc redis.lsp`

Usage
-----

1) Load the module

    (load "/path/to/newlisp-redis/redis.lsp")

2) Create a connection

    (setf 'conn (redis))

3) Call commands

    (:ping conn) => "PONG"
    (:set "key" "value") => "OK"
    (:del "key") => 1

newLISP-redis will aim to have one-to-one mappings to [Redis commands](http://code.google.com/p/redis/wiki/CommandReference), so you can invoke any command with the same arguments that Redis accepts.

Since the commands themselves are automatically generated they don't have documentation.

Commands return values in the newLISP equivalent types:

    status code replies => string
    error reply => string
    integer reply => integer
    bulk reply => string
    multi-bulk reply => list ( Redis sets are returned as lists too )