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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1814
1815// Format implements the NodeFormatter interface.
1816func (d *DUuid) Format(ctx *FmtCtx) {
1817 f := ctx.flags
1818 bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings))
1819 if !bareStrings {
1820 ctx.WriteByte('\'')
1821 }
1822
1823 buf := ctx.scratch[:uuid.RFC4122StrSize]
1824 d.UUID.StringBytes(buf)
1825 ctx.Write(buf)
1826
1827 if !bareStrings {
1828 ctx.WriteByte('\'')
1829 }
1830}
1831
1832// Size implements the Datum interface.
1833func (d *DUuid) Size() uintptr {

Callers

nothing calls this directly

Calls 4

FmtFlagsTypeAlias · 0.85
StringBytesMethod · 0.80
WriteMethod · 0.80
HasFlagsMethod · 0.45

Tested by

no test coverage detected