[postmodern-devel] [S-SQL] Multiple rows in INSERT INTO clause
Timur Sufiev
tsufiev at gmail.com
Tue Aug 25 10:12:30 UTC 2009
Is there some way in S-SQL to generate INSERT INTO clauses with multiple
rows, e.g. "INSERT INTO \"table\" (a, b) VALUES (10, 20), (30, 40)" ?
Desired sexp format is `(:insert-into table :set a (10 20) b (30 40)),
transformation can work like a MAPCAR: stop processing values sequences
as soon as the end of the shortest one is reached.
The reason to have such a feature is a performance issue: having a sequence
of rows to be inserted we want to minimize the overhead related with
sending queries to db; one query inserting, say, 50 rows is certainly
faster than 50 queries each inserting 1 row.
I would prepare the patch myself, but the syntax of s-sql.lisp is a bit too
tricky for me :(.
--
Timur Sufiev
--
Timur Sufiev
More information about the postmodern-devel
mailing list