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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

337
338// Format implements the NodeFormatter interface.
339func (d *DBitArray) Format(ctx *FmtCtx) {
340 f := ctx.flags
341 if f.HasFlags(fmtPgwireFormat) {
342 d.BitArray.Format(&ctx.Buffer)
343 } else {
344 withQuotes := !f.HasFlags(FmtFlags(lex.EncBareStrings))
345 if withQuotes {
346 ctx.WriteString("B'")
347 }
348 d.BitArray.Format(&ctx.Buffer)
349 if withQuotes {
350 ctx.WriteByte('\'')
351 }
352 }
353}
354
355// Size implements the Datum interface.
356func (d *DBitArray) Size() uintptr {

Callers

nothing calls this directly

Calls 4

FmtFlagsTypeAlias · 0.85
WriteStringMethod · 0.80
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected