chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: Thoughts on an O/RM library?


From: Hans Bulfone
Subject: [Chicken-users] Re: Thoughts on an O/RM library?
Date: Sat, 4 Feb 2006 14:42:12 +0100
User-agent: Mutt/1.4.2.1i

hi,

On Sat, Feb 04, 2006 at 12:17:37AM -0600, Reed Sheridan wrote:

> I really just don't want to manually
> conc strings together, and have to remember to escape SQL strings, which I
> will forget and then some 1337 Hax0r will drop my tables...

then you might find my sql library useful:

http://www.nil.at/software/sql.sexp

it is a small (and incomplete) library for constructing sql queries:

#;2> (define (some-scheme-function x) (+ x 99))
#;3> (sql:select
 '(f.data quux.name)
 '((as foobar f) quux)
 `(and (= f.quux quux.bla)
       (>= quux.xyz (some_database_function ,(some-scheme-function 1) 
"te'st"))))
"SELECT f.data,quux.name FROM foobar AS f,quux WHERE ((f.quux=quux.bla) AND 
(quux.xyz>=some_database_function(100,'te''st')))"
#;4> 

some special syntax and other things are probably missing, but it has
already been useful in some programs.

regards,
hans.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]