Documentation ¶
Overview ¶
Package geo implements customized types and functions for our geo needs.
If you want a full-fledged geo library we recommend using https://github.com/twpayne/go-geom instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NearCondition ¶ added in v1.2.0
type NearCondition struct {
// contains filtered or unexported fields
}
NearCondition stores the point and distance to filter around
func Near ¶ added in v1.2.0
func Near(column string, point Point, value float64) *NearCondition
Near filters by distance around a geographic point
func (*NearCondition) SQL ¶ added in v1.2.0
func (cond *NearCondition) SQL() string
SQL returns the built SQL to apply the filter.
func (*NearCondition) Values ¶ added in v1.2.0
func (cond *NearCondition) Values() []interface{}
Values returns the SQL placeholders to apply the filter
type Point ¶
Point maps against MySQL geographical point.
func (*Point) Scan ¶
Scan implements the SQL driver.Scanner interface and will scan the MySQL POINT(x y) into the Point struct.
Click to show internal directories.
Click to hide internal directories.