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

Method Format

pkg/sql/sem/tree/datum.go:1209–1216  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1207
1208// Format implements the NodeFormatter interface.
1209func (d *DString) Format(ctx *FmtCtx) {
1210 buf, f := &ctx.Buffer, ctx.flags
1211 if f.HasFlags(fmtRawStrings) {
1212 buf.WriteString(string(*d))
1213 } else {
1214 lex.EncodeSQLStringWithFlags(buf, string(*d), f.EncodeFlags())
1215 }
1216}
1217
1218// Size implements the Datum interface.
1219func (d *DString) Size() uintptr {

Callers

nothing calls this directly

Calls 3

EncodeSQLStringWithFlagsFunction · 0.92
EncodeFlagsMethod · 0.80
HasFlagsMethod · 0.45

Tested by

no test coverage detected