Documentation ¶
Overview ¶
Package geo implements customized types and functions for our geo needs.
**NOTE:** 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 ¶
type NearCondition struct {
// contains filtered or unexported fields
}
NearCondition stores the point and distance to filter around
func Near ¶
func Near(column string, point Point, value float64) *NearCondition
Near filters by distance around a geographic point
func (*NearCondition) SQL ¶
func (cond *NearCondition) SQL() string
SQL returns the built SQL to apply the filter.
func (*NearCondition) Values ¶
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.