SQL-EXPRESSION — Constructs an SQL expression from supplied keyword arguments.Function
string
A string.
table
A symbol representing a database table identifier.
alias
A table alias.
attribute
A symbol representing an attribute identifier.
type
A 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.