MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Format

Method Format

postgres/parser/sem/tree/datum.go:589–596  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

587
588// Format implements the NodeFormatter interface.
589func (d *DString) Format(ctx *FmtCtx) {
590 buf, f := &ctx.Buffer, ctx.flags
591 if f.HasFlags(fmtRawStrings) {
592 buf.WriteString(string(*d))
593 } else {
594 lex.EncodeSQLStringWithFlags(buf, string(*d), f.EncodeFlags())
595 }
596}
597
598// Size implements the Datum interface.
599func (d *DString) Size() uintptr {

Callers

nothing calls this directly

Calls 4

EncodeSQLStringWithFlagsFunction · 0.92
WriteStringMethod · 0.80
EncodeFlagsMethod · 0.80
HasFlagsMethod · 0.45

Tested by

no test coverage detected