MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Format

Method Format

pkg/sql/sem/tree/constant.go:434–441  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

432
433// Format implements the NodeFormatter interface.
434func (expr *StrVal) Format(ctx *FmtCtx) {
435 buf, f := &ctx.Buffer, ctx.flags
436 if expr.scannedAsBytes {
437 lex.EncodeSQLBytes(buf, expr.s)
438 } else {
439 lex.EncodeSQLStringWithFlags(buf, expr.s, f.EncodeFlags())
440 }
441}
442
443var (
444 // StrValAvailAllParsable is the set of parsable string types.

Callers

nothing calls this directly

Calls 3

EncodeSQLBytesFunction · 0.92
EncodeSQLStringWithFlagsFunction · 0.92
EncodeFlagsMethod · 0.80

Tested by

no test coverage detected