change `(update widgets ...)' to `(update (table widgets) ...)' so as to not have a single symbol floating around there in order to make update statements composable

master
Moritz Heidkamp 13 years ago
parent d1de827a00
commit a723338316

@ -116,6 +116,9 @@
values)
", ")))
((table (table))
(symbol->string table))
((insert into rest)
(sprintf "INSERT INTO ~A ~A"
into

@ -30,11 +30,11 @@
(test-group "updates"
(test "simple case"
"UPDATE actors SET firstname = 'Rube', lastname = 'Goldberg'"
(ssql->sql #f '(update actors (set (firstname "Rube") (lastname "Goldberg")))))
(ssql->sql #f '(update (table actors) (set (firstname "Rube") (lastname "Goldberg")))))
(test "with condition"
"UPDATE actors SET firstname = 'Felix' WHERE (lastname = 'Winkelmann')"
(ssql->sql #f '(update actors (set (firstname "Felix")) (where (= lastname "Winkelmann"))))))
(ssql->sql #f '(update (table actors) (set (firstname "Felix")) (where (= lastname "Winkelmann"))))))
(test-group "inserts"
(test "with sub-queries"

Loading…
Cancel
Save