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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1995
1996// Format implements the NodeFormatter interface.
1997func (d *DTime) Format(ctx *FmtCtx) {
1998 f := ctx.flags
1999 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
2000 if !bareStrings {
2001 ctx.WriteByte('\'')
2002 }
2003 ctx.WriteString(timeofday.TimeOfDay(*d).String())
2004 if !bareStrings {
2005 ctx.WriteByte('\'')
2006 }
2007}
2008
2009// Size implements the Datum interface.
2010func (d *DTime) Size() uintptr {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected