Skip to content

Instantly share code, notes, and snippets.

@oranenj
Forked from LauJensen/gist:d835630aff8313980813
Created November 3, 2010 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oranenj/6fec4a139a299dc17627 to your computer and use it in GitHub Desktop.
Save oranenj/6fec4a139a299dc17627 to your computer and use it in GitHub Desktop.
Compile could be a function that takes something like this:
(compile [:and [:eq 'rank "top"] ;; could use keywords too for the parameter
[:or [:eq 'title "dev"] [:eq 'id 5]]]
or as a sugared form using plain old functions:
(compile (cql/and {'rank "top"}
(cql/or {'title "dev" 'id 5}))) ; splice maps? so that don't have to write {'title "dev} {'id 5}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment