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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

1890
1891// Format implements the NodeFormatter interface.
1892func (d *DDate) Format(ctx *FmtCtx) {
1893 f := ctx.flags
1894 bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings))
1895 if !bareStrings {
1896 ctx.WriteByte('\'')
1897 }
1898 d.Date.Format(&ctx.Buffer)
1899 if !bareStrings {
1900 ctx.WriteByte('\'')
1901 }
1902}
1903
1904// Size implements the Datum interface.
1905func (d *DDate) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
FormatMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected