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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

898
899// Format implements the NodeFormatter interface.
900func (d *DTime) Format(ctx *FmtCtx) {
901 f := ctx.flags
902 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
903 if !bareStrings {
904 ctx.WriteByte('\'')
905 }
906 ctx.WriteString(timeofday.TimeOfDay(*d).String())
907 if !bareStrings {
908 ctx.WriteByte('\'')
909 }
910}
911
912// Size implements the Datum interface.
913func (d *DTime) Size() uintptr {

Callers

nothing calls this directly

Calls 5

TimeOfDayTypeAlias · 0.92
FmtFlagsTypeAlias · 0.85
WriteStringMethod · 0.80
StringMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected