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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

2655
2656// Format implements the NodeFormatter interface.
2657func (d *DInterval) Format(ctx *FmtCtx) {
2658 f := ctx.flags
2659 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
2660 if !bareStrings {
2661 ctx.WriteByte('\'')
2662 }
2663 d.Duration.Format(&ctx.Buffer)
2664 if !bareStrings {
2665 ctx.WriteByte('\'')
2666 }
2667}
2668
2669// Size implements the Datum interface.
2670func (d *DInterval) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected