Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1046 | |
| 1047 | // Format implements the NodeFormatter interface. |
| 1048 | func (d *DTimestamp) Format(ctx *FmtCtx) { |
| 1049 | f := ctx.flags |
| 1050 | bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings)) |
| 1051 | if !bareStrings { |
| 1052 | ctx.WriteByte('\'') |
| 1053 | } |
| 1054 | ctx.WriteString(d.UTC().Format(TimestampOutputFormat)) |
| 1055 | if !bareStrings { |
| 1056 | ctx.WriteByte('\'') |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | // Size implements the Datum interface. |
| 1061 | func (d *DTimestamp) Size() uintptr { |
nothing calls this directly
no test coverage detected