add support for tuple literals as vectors

master
Moritz Heidkamp 14 years ago
parent 3b59938c32
commit f564b4316c

@ -43,7 +43,8 @@
(,pair? . pair->sql) (,pair? . pair->sql)
(,symbol? . source->sql) (,symbol? . source->sql)
(,string? . string->sql) (,string? . string->sql)
(,number? . number->sql))) (,number? . number->sql)
(,vector? . vector->sql)))
((clauses-order) '(columns from where order having union)) ((clauses-order) '(columns from where order having union))
@ -55,6 +56,13 @@
((pair->sql pair) ((pair->sql pair)
(self (car pair) (cdr pair))) (self (car pair) (cdr pair)))
((vector->sql vec)
(format "(~A)"
(string-intersperse
(map (lambda (s) (self 'ssql->sql s))
(vector->list vec))
", ")))
((string->sql string) ((string->sql string)
(string-append "'" (self 'escape-string string) "'")) (string-append "'" (self 'escape-string string) "'"))

Loading…
Cancel
Save