Function
sql
sql &rest args => sql-expression
A set of expressions.
An SQL expression.
sql generates SQL from a set of expressions given by args. Each argument tosql is translated into SQL and then the args are concatenated with a single space between each pair. The rules for translation into SQL, based on the type of each individual argumentx, are as follows:
string => (format nil "'~A'" x)
nil => "NULL"
symbol => (symbol-name x)
number => (princ-to-string x)
list => (format nil "(~{~A~^,~})" (mapcar #'sql x))
vector => (format nil "~{~A~^,~}" (map 'list #'sql x))
sql-expression => x
=> error sql-expressionsql-operationsql-operator