Sexql

SexQL generates SQL statements from nested lists of stuff. It's intended for use as a slightly cleaner way of programmatic query generation than string concatenation. Specifically, it'll transform

(select (foo bar) 
        (join table1 
              (alias (limit (select (*) (where table2 some-criterion))
                            :end 10) table2)
              :on (= table1.table2id table2.id)))
into something like
SELECT foo,bar 
   from table1 
   join (select * from table2 where some_criterion limit 10) table2
   on table1.table2id=table2.id

Note that it's no longer used by its author, who is instead working on/with its successor Septeql

Historic information in Daniel Barlow's diary. darcs tree at http://src.telent.net/sexql/


This page is linked from: Septeql  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively