The function string-prefix-with-n-if-needed
checks if string, when passed to database, needs to be prefixed by N. If the prefix is required, it returns a sql-expression-object with the string prefixed. Otherwise it returns string.
string-prefix-with-n-if-needed
is equivalent to:
(if (string-needs-n-prefix string :database database )
(sql-expression :n-qualified string )
string )
LispWorks User Guide and Reference Manual - 20 Sep 2017