All Manuals > LispWorks® User Guide and Reference Manual > 45 The SQL Package

string-needs-n-prefix Function

Summary

Returns whether a string needs the N syntax.

Package

sql

Signature

string-needs-n-prefix string &key database => needs-n-prefix-p

Arguments
string
A string.
database
A database.
Values
needs-n-prefix-p
A boolean.
Description

The function string-needs-n-prefix returns true if string needs to be prefixed by N when passed to database (default *default-database*).

Notes

The function string-prefix-with-n-if-needed can be used to add the prefix if needed. The function sql-expression with :n-qualified can be used to unconditionally add the prefix.

At the time of writing, the prefix is required only when database is a connection to Microsoft SQL Server, and string contains characters which are not recognized by the code page of the server.

See also

string-prefix-with-n-if-needed
sql-expression
23.5.1.6 SQL string literals


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56