MCPcopy Index your code
hub / github.com/dinedal/textql / encodeSql

Method encodeSql

sqlparser/sqltypes/sqltypes.go:318–329  ·  view source on GitHub ↗
(b BinWriter)

Source from the content-addressed store, hash-verified

316}
317
318func (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
331func (s String) encodeAscii(b BinWriter) {
332 writebyte(b, '\'')

Callers

nothing calls this directly

Calls 2

rawMethod · 0.95
writebyteFunction · 0.85

Tested by

no test coverage detected