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

Function EncodeUntaggedGeoValue

pkg/util/encoding/encoding.go:2718–2724  ·  view source on GitHub ↗

EncodeUntaggedGeoValue encodes a geopb.SpatialObject value, appends it to the supplied buffer, and returns the final buffer.

(appendTo []byte, so *geopb.SpatialObject)

Source from the content-addressed store, hash-verified

2716// EncodeUntaggedGeoValue encodes a geopb.SpatialObject value, appends it to the supplied buffer,
2717// and returns the final buffer.
2718func EncodeUntaggedGeoValue(appendTo []byte, so *geopb.SpatialObject) ([]byte, error) {
2719 bytes, err := protoutil.Marshal(so)
2720 if err != nil {
2721 return nil, err
2722 }
2723 return EncodeUntaggedBytesValue(appendTo, bytes), nil
2724}
2725
2726// EncodeDecimalValue encodes an apd.Decimal value with its value tag, appends
2727// it to the supplied buffer, and returns the final buffer.

Callers 1

EncodeGeoValueFunction · 0.85

Calls 2

MarshalFunction · 0.92
EncodeUntaggedBytesValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…