Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 2325 | |
| 2326 | // Format implements the NodeFormatter interface. |
| 2327 | func (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. |
| 2340 | func (d *DTimestamp) Size() uintptr { |