Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 337 | |
| 338 | // Format implements the NodeFormatter interface. |
| 339 | func (d *DBitArray) Format(ctx *FmtCtx) { |
| 340 | f := ctx.flags |
| 341 | if f.HasFlags(fmtPgwireFormat) { |
| 342 | d.BitArray.Format(&ctx.Buffer) |
| 343 | } else { |
| 344 | withQuotes := !f.HasFlags(FmtFlags(lex.EncBareStrings)) |
| 345 | if withQuotes { |
| 346 | ctx.WriteString("B'") |
| 347 | } |
| 348 | d.BitArray.Format(&ctx.Buffer) |
| 349 | if withQuotes { |
| 350 | ctx.WriteByte('\'') |
| 351 | } |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | // Size implements the Datum interface. |
| 356 | func (d *DBitArray) Size() uintptr { |
nothing calls this directly
no test coverage detected