Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 2851 | |
| 2852 | // Format implements the NodeFormatter interface. |
| 2853 | func (d *DTimestamp) Format(ctx *FmtCtx) { |
| 2854 | f := ctx.flags |
| 2855 | bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings)) |
| 2856 | if !bareStrings { |
| 2857 | ctx.WriteByte('\'') |
| 2858 | } |
| 2859 | |
| 2860 | ctx.Write(PGWireFormatTimestamp(d.Time, nil, ctx.scratch[:0])) |
| 2861 | |
| 2862 | if !bareStrings { |
| 2863 | ctx.WriteByte('\'') |
| 2864 | } |
| 2865 | } |
| 2866 | |
| 2867 | // Size implements the Datum interface. |
| 2868 | func (d *DTimestamp) Size() uintptr { |
nothing calls this directly
no test coverage detected