As of August 2007 it is in alpha state and only available by darcs
(to-sql '(join rel1 rel2 predicate)) => "SELECT * FROM (REL1 JOIN REL2 ON PREDICATE) "(to-sql '(project (att1 (as att2 name) att3) relation)) => "SELECT ATT1,ATT2 AS NAME,ATT3 FROM RELATION "
(to-sql '(order (limit relation 5 15) attribute :desc) ) ; why anyone would want to limit *first* and then order the result I ; don't know, but look, it handles that too => "SELECT * FROM (SELECT * FROM RELATION OFFSET 5 LIMIT 10 ) RELATION ORDER BY ATTRIBUTE DESC "
(to-sql '(group ((as (sum quantity) quantity) (as (sum (* quantity cost)) value)) (event-id event-description) order-line)) => "SELECT SUM(QUANTITY) AS QUANTITY,SUM((QUANTITY * COST)) AS VALUE,EVENT_ID,EVENT_DESCRIPTION FROM ORDER_LINE GROUP BY EVENT_ID,EVENT_DESCRIPTION "
Be cautioned that this is work in progress: syntax may (quite likely, will) change without warning.
darcs get http://src.telent.net/septeql/
This page is linked from: sexql
CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively