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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

489
490// Format implements the NodeFormatter interface.
491func (expr *StrVal) Format(ctx *FmtCtx) {
492 buf, f := &ctx.Buffer, ctx.flags
493 if expr.scannedAsBytes {
494 lexbase.EncodeSQLBytes(buf, expr.s)
495 } else {
496 lexbase.EncodeSQLStringWithFlags(buf, expr.s, f.EncodeFlags())
497 }
498}
499
500var (
501 // 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