SQL-EXPRESSION — Constructs an SQL expression from supplied keyword arguments.
Function
stringA string.
tableA symbol representing a database table identifier.
aliasA table alias.
attributeA symbol representing an attribute identifier.
typeA type specifier.
A object of type sql-expression.
Returns an SQL expression constructed from the supplied arguments which may be combined as follows:
attribute and
type;
attribute;
alias or table and
attribute and
type;
alias or
table and
attribute;
table,
attribute and
type;
table and
attribute;
table
and alias;
table;
string.
(sql-expression :table 'foo :attribute 'bar)
=> #<CLSQL-SYS:SQL-IDENT-ATTRIBUTE FOO.BAR>
(sql-expression :attribute 'baz)
=> #<CLSQL-SYS:SQL-IDENT-ATTRIBUTE BAZ>
An error of type sql-user-error
is signalled if an unsupported combination of keyword arguments is
specified.