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

NextPrevUpTopContentsIndex

string-prefix-with-n-if-needed

Function
Summary

Adds the N syntax to a string if needed.

Package

sql

Signature

string-prefix-with-n-if-needed string &key database => result

Arguments

string

A string.

database

A database.

Values

result

A string or a sql-expression-object.

Description

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.

Notes

string-prefix-with-n-if-needed is equivalent to:

(if (string-needs-n-prefix string
 :database database
)
    (sql-expression :n-qualified string
)
   string
)
See also

SQL string literals
string-needs-n-prefix


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex