MCPcopy Index your code
hub / github.com/cube2222/octosql / encodeBytesSQL

Function encodeBytesSQL

parser/sqlparser/dependency/sqltypes/value.go:371–382  ·  view source on GitHub ↗
(val []byte, b BinWriter)

Source from the content-addressed store, hash-verified

369}
370
371func encodeBytesSQL(val []byte, b BinWriter) {
372 writebyte('\'', b)
373 for _, ch := range val {
374 if encodedChar := SQLEncodeMap[ch]; encodedChar == DontEscape {
375 writebyte(ch, b)
376 } else {
377 writebyte('\\', b)
378 writebyte(encodedChar, b)
379 }
380 }
381 writebyte('\'', b)
382}
383
384func encodeBytesASCII(val []byte, b BinWriter) {
385 writebyte('\'', b)

Callers 1

EncodeSQLMethod · 0.85

Calls 1

writebyteFunction · 0.85

Tested by

no test coverage detected