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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

582
583// Format implements the NodeFormatter interface.
584func (d *DBitArray) Format(ctx *FmtCtx) {
585 f := ctx.flags
586 if f.HasFlags(fmtPgwireFormat) {
587 d.BitArray.Format(&ctx.Buffer)
588 } else {
589 withQuotes := !f.HasFlags(FmtFlags(lex.EncBareStrings))
590 if withQuotes {
591 ctx.WriteString("B'")
592 }
593 d.BitArray.Format(&ctx.Buffer)
594 if withQuotes {
595 ctx.WriteByte('\'')
596 }
597 }
598}
599
600// Size implements the Datum interface.
601func (d *DBitArray) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected