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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1123
1124// Format implements the NodeFormatter interface.
1125func (d *DTimestampTZ) Format(ctx *FmtCtx) {
1126 f := ctx.flags
1127 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
1128 if !bareStrings {
1129 ctx.WriteByte('\'')
1130 }
1131 ctx.WriteString(d.Time.Format(TimestampTZOutputFormat))
1132 if !bareStrings {
1133 ctx.WriteByte('\'')
1134 }
1135}
1136
1137// Size implements the Datum interface.
1138func (d *DTimestampTZ) Size() uintptr {

Callers

nothing calls this directly

Calls 4

FmtFlagsTypeAlias · 0.85
WriteStringMethod · 0.80
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected