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)
| 77 | // string. This is suitable for safely producing a SQL string valid |
| 78 | // for input to the parser. |
| 79 | func EscapeSQLString(in string) string { |
| 80 | var buf bytes.Buffer |
| 81 | EncodeSQLString(&buf, in) |
| 82 | return buf.String() |
| 83 | } |
| 84 | |
| 85 | // EncodeSQLStringWithFlags writes a string literal to buf. All |
| 86 | // unicode and non-printable characters are escaped. flags controls |
no test coverage detected
searching dependent graphs…