MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / FormatDate

Function FormatDate

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

FormatDate writes d into ctx according to the format flags.

(d pgdate.Date, ctx *FmtCtx)

Source from the content-addressed store, hash-verified

2254
2255// FormatDate writes d into ctx according to the format flags.
2256func FormatDate(d pgdate.Date, ctx *FmtCtx) {
2257 f := ctx.flags
2258 bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings))
2259 if !bareStrings {
2260 ctx.WriteByte('\'')
2261 }
2262 d.Format(&ctx.Buffer)
2263 if !bareStrings {
2264 ctx.WriteByte('\'')
2265 }
2266}
2267
2268// Format implements the NodeFormatter interface.
2269func (d *DDate) Format(ctx *FmtCtx) {

Callers 1

FormatMethod · 0.85

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…