Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 477 | |
| 478 | // Format implements the NodeFormatter interface. |
| 479 | func (expr *StrVal) Format(ctx *FmtCtx) { |
| 480 | buf, f := &ctx.Buffer, ctx.flags |
| 481 | if expr.scannedAsBytes { |
| 482 | lex.EncodeSQLBytes(buf, expr.s) |
| 483 | } else { |
| 484 | lex.EncodeSQLStringWithFlags(buf, expr.s, f.EncodeFlags()) |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | // WasScannedAsBytes returns true iff the input syntax was using b'...' or x'....' |
| 489 | func (expr *StrVal) WasScannedAsBytes() bool { |
nothing calls this directly
no test coverage detected