(b BinWriter)
| 316 | } |
| 317 | |
| 318 | func (s String) encodeSql(b BinWriter) { |
| 319 | writebyte(b, '\'') |
| 320 | for _, ch := range s.raw() { |
| 321 | if encodedChar := SqlEncodeMap[ch]; encodedChar == DONTESCAPE { |
| 322 | writebyte(b, ch) |
| 323 | } else { |
| 324 | writebyte(b, '\\') |
| 325 | writebyte(b, encodedChar) |
| 326 | } |
| 327 | } |
| 328 | writebyte(b, '\'') |
| 329 | } |
| 330 | |
| 331 | func (s String) encodeAscii(b BinWriter) { |
| 332 | writebyte(b, '\'') |