EscapeSQLString returns an escaped SQL representation of the given string. This is suitable for safely producing a SQL string valid for input to the parser.
(in string)
| 141 | // string. This is suitable for safely producing a SQL string valid |
| 142 | // for input to the parser. |
| 143 | func EscapeSQLString(in string) string { |
| 144 | var buf bytes.Buffer |
| 145 | EncodeSQLString(&buf, in) |
| 146 | return buf.String() |
| 147 | } |
| 148 | |
| 149 | // EncodeSQLStringWithFlags writes a string literal to buf. All |
| 150 | // unicode and non-printable characters are escaped. flags controls |
no test coverage detected
searching dependent graphs…