[postmodern-devel] Building s-sql on the fly

Maciek Pasternacki maciej at pasternacki.net
Thu Dec 11 15:08:00 UTC 2008


Phil <zaries at global.co.za> writes:

> I am looking for an example of how to create a s-sql query on the fly. I
> am sure I saw something like that along the line on some website but I
> cant find it again.

Take a look at http://repo.or.cz/w/cl-trane.git?a=blob;f=src/taxonomy.lisp;h=5776b2b42dde277f9478c0df621ffa9742106c06;hb=HEAD

Query building takes place e.g. on lines 274-304 and 365-394.  Second
example may be interesting: it's a way to generate CASE statement from
list of values (it may be generalized to receive alists, I just needed
the order), to effectively make an inline-dictionary without writing
the CASE statement by hand.

Regards,
Maciej.

-- 
Maciej Pasternacki -><- http://www.pasternacki.net/ -><- http://www.3ofcoins.net/




More information about the postmodern-devel mailing list