Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 3511 | |
| 3512 | // Format implements the NodeFormatter interface. |
| 3513 | func (d *DGeometry) Format(ctx *FmtCtx) { |
| 3514 | f := ctx.flags |
| 3515 | bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings)) |
| 3516 | if !bareStrings { |
| 3517 | ctx.WriteByte('\'') |
| 3518 | } |
| 3519 | ctx.WriteString(d.Geometry.EWKBHex()) |
| 3520 | if !bareStrings { |
| 3521 | ctx.WriteByte('\'') |
| 3522 | } |
| 3523 | } |
| 3524 | |
| 3525 | // Size implements the Datum interface. |
| 3526 | func (d *DGeometry) Size() uintptr { |