MCPcopy
hub / github.com/dosco/graphjin / renderGeoDistance

Method renderGeoDistance

core/internal/dialect/sqlite.go:581–584  ·  view source on GitHub ↗

renderGeoDistance renders the distance value for SpatiaLite (in meters)

(ctx Context, geo *qcode.GeoExp)

Source from the content-addressed store, hash-verified

579
580// renderGeoDistance renders the distance value for SpatiaLite (in meters)
581func (d *SQLiteDialect) renderGeoDistance(ctx Context, geo *qcode.GeoExp) {
582 distance := geo.Unit.ToMeters(geo.Distance)
583 ctx.WriteString(fmt.Sprintf(`%f`, distance))
584}
585
586func (d *SQLiteDialect) BindVar(i int) string {
587 return "?"

Callers 1

RenderGeoOpMethod · 0.95

Calls 2

ToMetersMethod · 0.80
WriteStringMethod · 0.65

Tested by

no test coverage detected