Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1296 | |
| 1297 | // Format implements the NodeFormatter interface. |
| 1298 | func (d *DString) Format(ctx *FmtCtx) { |
| 1299 | buf, f := &ctx.Buffer, ctx.flags |
| 1300 | if f.HasFlags(fmtRawStrings) || f.HasFlags(fmtPgwireFormat) { |
| 1301 | buf.WriteString(string(*d)) |
| 1302 | } else { |
| 1303 | lexbase.EncodeSQLStringWithFlags(buf, string(*d), f.EncodeFlags()) |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | // Size implements the Datum interface. |
| 1308 | func (d *DString) Size() uintptr { |
nothing calls this directly
no test coverage detected