MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Format

Method Format

pkg/sql/sem/tree/datum.go:3513–3523  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

3511
3512// Format implements the NodeFormatter interface.
3513func (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.
3526func (d *DGeometry) Size() uintptr {

Callers

nothing calls this directly

Calls 3

FmtFlagsTypeAlias · 0.85
HasFlagsMethod · 0.45
EWKBHexMethod · 0.45

Tested by

no test coverage detected