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

Function spatialObjectToJSON

pkg/sql/sem/tree/datum.go:4169–4175  ·  view source on GitHub ↗
(so geopb.SpatialObject, maxDecimalDigits int)

Source from the content-addressed store, hash-verified

4167}
4168
4169func spatialObjectToJSON(so geopb.SpatialObject, maxDecimalDigits int) (json.JSON, error) {
4170 j, err := geo.SpatialObjectToGeoJSON(so, maxDecimalDigits, geo.SpatialObjectToGeoJSONFlagZero)
4171 if err != nil {
4172 return nil, err
4173 }
4174 return json.ParseJSON(string(j))
4175}
4176
4177// formatTime formats time with specified layout.
4178// TODO(yuzefovich): consider using this function in more places.

Callers 2

ToJSONMethod · 0.85
ToJSONMethod · 0.85

Calls 2

SpatialObjectToGeoJSONFunction · 0.92
ParseJSONFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…