Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1814 | |
| 1815 | // Format implements the NodeFormatter interface. |
| 1816 | func (d *DUuid) Format(ctx *FmtCtx) { |
| 1817 | f := ctx.flags |
| 1818 | bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings)) |
| 1819 | if !bareStrings { |
| 1820 | ctx.WriteByte('\'') |
| 1821 | } |
| 1822 | |
| 1823 | buf := ctx.scratch[:uuid.RFC4122StrSize] |
| 1824 | d.UUID.StringBytes(buf) |
| 1825 | ctx.Write(buf) |
| 1826 | |
| 1827 | if !bareStrings { |
| 1828 | ctx.WriteByte('\'') |
| 1829 | } |
| 1830 | } |
| 1831 | |
| 1832 | // Size implements the Datum interface. |
| 1833 | func (d *DUuid) Size() uintptr { |
nothing calls this directly
no test coverage detected