Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

whee/cl-riak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic usage

Set

(cl-riak:set key value :bucket "bucket-name")

* (cl-riak:set "foo" "bar" :bucket "nom") 

"bar"
"a85hYGBgzGDKBVIcypz/fvql33qYwZTImMfK8CHsznG+LAA="

Get

(cl-riak:get key value :bucket "bucket-name")

* (cl-riak:get "foo" :bucket "nom")

"bar"
"a85hYGBgzGDKBVIcypz/fvql33qYwZTImMfK8CHsznG+LAA="

MapReduce

(yes, this is ugly)

An example: (define-constant +mapred-reminders+ "{ "inputs":"reminder", "query":[ { "map":{ "language":"javascript", "source":"function (v, k, a) {var data = Riak.mapValuesJson(v)[0]; if (data.username == '~a') {return [{'key':v.key, 'value':v.values[0].data}];} else {return [];}}", "keep":true } } ] }" :test 'string=)

(let ((reminders (cl-riak:mapred (format nil +mapred-reminders+ username))))
     ...)

About

Minimal Common Lisp interface to Riak

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published