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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1046
1047// Format implements the NodeFormatter interface.
1048func (d *DTimestamp) Format(ctx *FmtCtx) {
1049 f := ctx.flags
1050 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
1051 if !bareStrings {
1052 ctx.WriteByte('\'')
1053 }
1054 ctx.WriteString(d.UTC().Format(TimestampOutputFormat))
1055 if !bareStrings {
1056 ctx.WriteByte('\'')
1057 }
1058}
1059
1060// Size implements the Datum interface.
1061func (d *DTimestamp) 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