it's not like I created that API myself

master
Moritz Heidkamp 13 years ago
parent 8307540474
commit b2a6da33c2

@ -111,7 +111,7 @@
(sprintf "INSERT INTO ~A VALUES ~A" (sprintf "INSERT INTO ~A VALUES ~A"
into into
(string-intersperse (map (lambda (val) (string-intersperse (map (lambda (val)
(self (car val) (cdr val))) (self 'ssql->sql val))
values) ", "))) values) ", ")))
((insert (('into table) ('columns columns ...) values ...)) ((insert (('into table) ('columns columns ...) values ...))

@ -45,9 +45,9 @@
(select (columns id) (from actors) (where (and (= firstname "Helge") (select (columns id) (from actors) (where (and (= firstname "Helge")
(= lastname "Schneider")))))))) (= lastname "Schneider"))))))))
(test "multiple records" (test "multiple records using vectors for the records"
"INSERT INTO actors (firstname, lastname) VALUES ('Sylvester', 'Stallone'), ('Arnold', 'Schwarzenegger')" "INSERT INTO actors (firstname, lastname) VALUES ('Sylvester', 'Stallone'), ('Arnold', 'Schwarzenegger')"
(ssql->sql #f '(insert (into actors) (columns firstname lastname) (values "Sylvester" "Stallone") (values "Arnold" "Schwarzenegger")))) (ssql->sql #f '(insert (into actors) (columns firstname lastname) #("Sylvester" "Stallone") #("Arnold" "Schwarzenegger"))))
(test "without explicit columns" (test "without explicit columns"
"INSERT INTO actors VALUES ('Marlon', 'Brando')" "INSERT INTO actors VALUES ('Marlon', 'Brando')"

Loading…
Cancel
Save