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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

3861
3862// Format implements the NodeFormatter interface.
3863func (d *DBox2D) Format(ctx *FmtCtx) {
3864 f := ctx.flags
3865 bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings))
3866 if !bareStrings {
3867 ctx.WriteByte('\'')
3868 }
3869 ctx.Write(d.CartesianBoundingBox.AppendFormat(ctx.scratch[:0]))
3870 if !bareStrings {
3871 ctx.WriteByte('\'')
3872 }
3873}
3874
3875// Size implements the Datum interface.
3876func (d *DBox2D) Size() uintptr {

Callers

nothing calls this directly

Calls 4

FmtFlagsTypeAlias · 0.85
WriteMethod · 0.80
HasFlagsMethod · 0.45
AppendFormatMethod · 0.45

Tested by

no test coverage detected