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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

638
639// Format implements the NodeFormatter interface.
640func (d *DBitArray) Format(ctx *FmtCtx) {
641 f := ctx.flags
642 if f.HasFlags(fmtPgwireFormat) {
643 d.BitArray.Format(&ctx.Buffer)
644 } else {
645 withQuotes := !f.HasFlags(FmtFlags(lexbase.EncBareStrings))
646 if withQuotes {
647 ctx.WriteString("B'")
648 }
649 d.BitArray.Format(&ctx.Buffer)
650 if withQuotes {
651 ctx.WriteByte('\'')
652 }
653 }
654}
655
656// Size implements the Datum interface.
657func (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