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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1711
1712// Format implements the NodeFormatter interface.
1713func (d *DIPAddr) Format(ctx *FmtCtx) {
1714 f := ctx.flags
1715 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
1716 if !bareStrings {
1717 ctx.WriteByte('\'')
1718 }
1719 ctx.WriteString(d.IPAddr.String())
1720 if !bareStrings {
1721 ctx.WriteByte('\'')
1722 }
1723}
1724
1725// Size implements the Datum interface.
1726func (d *DIPAddr) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
StringMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected