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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

2464
2465// Format implements the NodeFormatter interface.
2466func (d *DTimestampTZ) Format(ctx *FmtCtx) {
2467 f := ctx.flags
2468 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
2469 if !bareStrings {
2470 ctx.WriteByte('\'')
2471 }
2472 ctx.WriteString(d.Time.Format(TimestampOutputFormat))
2473 if !bareStrings {
2474 ctx.WriteByte('\'')
2475 }
2476}
2477
2478// Size implements the Datum interface.
2479func (d *DTimestampTZ) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected