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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

2325
2326// Format implements the NodeFormatter interface.
2327func (d *DTimestamp) Format(ctx *FmtCtx) {
2328 f := ctx.flags
2329 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
2330 if !bareStrings {
2331 ctx.WriteByte('\'')
2332 }
2333 ctx.WriteString(d.UTC().Format(TimestampOutputFormat))
2334 if !bareStrings {
2335 ctx.WriteByte('\'')
2336 }
2337}
2338
2339// Size implements the Datum interface.
2340func (d *DTimestamp) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected