Skip to content

Instantly share code, notes, and snippets.

View avital's full-sized avatar

Avital Oliver avital

View GitHub Profile
@avital
avital / robot.clj
Created September 23, 2009 23:05 — forked from ayal/robot.clj
; Explain to Ayal:
; 1. interleaved log
; 1.1. (try)
; 2. FP IS SO GOOD WHAT
; 3. never use #() unless its SUPER SHORT REALLY
; 4. Hardly use closures its too hard to follow them use thigns like for
; 5. WE MUST HAVE A "Lisp Editor" (which will also be a JSON editor in effect, etc). THESE PARENTHESIS MATCHING AND
; NEWLINE CALCULATINON ARE TOO HARD
read
----
{
"action": "read",
"table": "user/shift/trail/comment",
"constraints": {
"user_id": 67 || [option1, option2, option3] || {range: [range-begin, range-end]}
// if range-begin is null, this means all less than range-add.
// if range-add is null, this means all greater than range-begin.
// "NOW()" works for dates.
read
----
{
"action": "read",
"table": "user/shift/trail/comment",
"constraints": {
"user_id": 67
},
"properties": "*" || ["username", "summary", "modified"],
"orderby": ["<" || ">", "modified"],