QUOTE
Wraps a value in a format suitable for inclusion in an SQL statement.
This function corresponds to the quote(X) function in SQLite. It returns a string that is the value of its argument X formatted as an SQL literal.
A string value is enclosed in single quotes, with any internal single quotes doubled.
A numeric value is converted to its string representation, unchanged.
A BLOB is rendered as a hexadecimal literal (e.g.,
X'...').A NULL value is rendered as the string
NULL(without quotes).
This is useful for safely constructing SQL statements, although using parameterized queries is generally the preferred method for handling user input to prevent SQL injection.
Example
// SELECT quote(name) FROM Users WHERE id = 1
// If name is "O'Malley", the result is "'O''Malley'".
// If a column contains the integer 123, the result is "123".
// If a column is NULL, the result is "NULL".
val quotedName = select(QUOTE(Users.name)).from(Users).where(Users.id eq 1)Return
A KQLiteColumn of type String containing the SQL-literal representation of the value.
Author
MOHAMMAD AZIM ANSARI
Parameters
The column or value to be quoted.