mysql.escape

Escape special characters in MySQL strings.

Note, it is strongly recommended to use prepared statements instead of relying on manual escaping, as prepared statements are always safer, better and more reliable (see mysql.prepared). But if you absolutely must escape manually, the functionality is provided here.

Members

Functions

mysqlEscape
MysqlEscape!(T) mysqlEscape(T input)

Helper function to easily construct a escape wrapper struct

mysql_escape
void mysql_escape(Input input, Buffer buffer)

Simple escape function for dangerous SQL characters

Structs

MysqlEscape
struct MysqlEscape(Input)

Struct to wrap around a string so it can be passed to formattedWrite and be properly escaped all using the buffer that formattedWrite provides.

Meta