My Project
|
Public Member Functions | |
Item_func_quote (Item *a) | |
const char * | func_name () const |
String * | val_str (String *) |
void | fix_length_and_dec () |
String * Item_func_quote::val_str | ( | String * | str | ) | [virtual] |
QUOTE() function returns argument string in single quotes suitable for using in a SQL statement.
Adds a \ before all characters that needs to be escaped in a SQL string. We also escape '^Z' (END-OF-FILE in windows) to avoid probelms when running commands from a file in windows.
This function is very useful when you want to generate SQL statements.
str | Quoted string |
NULL | Out of memory. |
Implements Item.