diff --git a/ssql.scm b/ssql.scm index dacfbe8..083a565 100644 --- a/ssql.scm +++ b/ssql.scm @@ -116,6 +116,9 @@ values) ", "))) + ((table (table)) + (symbol->string table)) + ((insert into rest) (sprintf "INSERT INTO ~A ~A" into diff --git a/tests/ansi-test.scm b/tests/ansi-test.scm index b267e14..3de15f5 100644 --- a/tests/ansi-test.scm +++ b/tests/ansi-test.scm @@ -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"