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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1981
1982// Format implements the NodeFormatter interface.
1983func (d *DIPAddr) Format(ctx *FmtCtx) {
1984 f := ctx.flags
1985 bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings))
1986 if !bareStrings {
1987 ctx.WriteByte('\'')
1988 }
1989 ctx.WriteString(d.IPAddr.String())
1990 if !bareStrings {
1991 ctx.WriteByte('\'')
1992 }
1993}
1994
1995// Size implements the Datum interface.
1996func (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