spatial

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidType = errors.NewKind("%s received non-point type")
View Source
var ErrLatitudeOutOfRange = errors.NewKind("latitude %v is out of range in function %s. it must be within [-90.0, 90.0]")
View Source
var ErrLongitudeOutOfRange = errors.NewKind("longitude %v is out of range in function %s. it must be within [-180.0, 180.0]")
View Source
var ErrNoUnits = errors.NewKind("the geometry passed to function st_distance is in SRID %v, which doesn't specify a length unit. Can't convert to '%v'.")

ErrNoUnits is thrown when the specified SRID does not have units

View Source
var ErrNonGeographic = errors.NewKind("function %s is only defined for geographic spatial reference systems, but one of its argument is in SRID %v, which is not geographic")

Functions

func EvalGeomFromWKB

func EvalGeomFromWKB(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType int) (interface{}, error)

EvalGeomFromWKB takes in arguments for the ST_FROMWKB functions, and parses them to their corresponding geometry type

func FindBBox

func FindBBox(v interface{}) [4]float64

func FindDimension

func FindDimension(g types.GeometryValue) interface{}

func GeomCollToSlice

func GeomCollToSlice(g types.GeomColl) interface{}

func GeomCollToWKT

func GeomCollToWKT(g types.GeomColl, order bool) string

GeomCollToWKT converts a sql.Polygon to a string

func LineToSlice

func LineToSlice(l types.LineString) [][2]float64

func LineToWKT

func LineToWKT(l types.LineString, order bool) string

LineToWKT converts a sql.LineString to a string

func MLineToSlice

func MLineToSlice(p types.MultiLineString) [][][2]float64

func MPointToSlice

func MPointToSlice(p types.MultiPoint) [][2]float64

func MPolyToSlice

func MPolyToSlice(p types.MultiPolygon) [][][][2]float64

func MultiLineStringToWKT

func MultiLineStringToWKT(l types.MultiLineString, order bool) string

MultiLineStringToWKT converts a sql.Polygon to a string

func MultiPointToWKT

func MultiPointToWKT(p types.MultiPoint, order bool) string

MultiPointToWKT converts a sql.MultiPoint to a string

func MultiPolygonToWKT

func MultiPolygonToWKT(p types.MultiPolygon, order bool) string

MultiPolygonToWKT converts a sql.Polygon to a string

func NewArea

func NewArea(arg sql.Expression) sql.Expression

NewArea creates a new Area expression.

func NewAsGeoJSON

func NewAsGeoJSON(args ...sql.Expression) (sql.Expression, error)

NewAsGeoJSON creates a new point expression.

func NewAsWKB

func NewAsWKB(e sql.Expression) sql.Expression

NewAsWKB creates a new point expression.

func NewAsWKT

func NewAsWKT(e sql.Expression) sql.Expression

NewAsWKT creates a new point expression.

func NewDimension

func NewDimension(e sql.Expression) sql.Expression

NewDimension creates a new point expression.

func NewDistance

func NewDistance(args ...sql.Expression) (sql.Expression, error)

NewDistance creates a new Distance expression.

func NewEndPoint

func NewEndPoint(arg sql.Expression) sql.Expression

NewEndPoint creates a new EndPoint expression.

func NewGeomColl

func NewGeomColl(args ...sql.Expression) (sql.Expression, error)

NewGeomColl creates a new geometrycollection expression.

func NewGeomCollFromText

func NewGeomCollFromText(args ...sql.Expression) (sql.Expression, error)

NewGeomCollFromText creates a new multilinestring expression.

func NewGeomCollFromWKB

func NewGeomCollFromWKB(args ...sql.Expression) (sql.Expression, error)

NewGeomCollFromWKB creates a new geometrycollection expression.

func NewGeomFromGeoJSON

func NewGeomFromGeoJSON(args ...sql.Expression) (sql.Expression, error)

NewGeomFromGeoJSON creates a new point expression.

func NewGeomFromText

func NewGeomFromText(args ...sql.Expression) (sql.Expression, error)

NewGeomFromText creates a new point expression.

func NewGeomFromWKB

func NewGeomFromWKB(args ...sql.Expression) (sql.Expression, error)

NewGeomFromWKB creates a new geometry expression.

func NewIntersects

func NewIntersects(g1, g2 sql.Expression) sql.Expression

NewIntersects creates a new Intersects expression.

func NewIsClosed

func NewIsClosed(arg sql.Expression) sql.Expression

NewIsClosed creates a new EndPoint expression.

func NewLatitude

func NewLatitude(args ...sql.Expression) (sql.Expression, error)

NewLatitude creates a new ST_LATITUDE expression.

func NewLineFromText

func NewLineFromText(args ...sql.Expression) (sql.Expression, error)

NewLineFromText creates a new point expression.

func NewLineFromWKB

func NewLineFromWKB(args ...sql.Expression) (sql.Expression, error)

NewLineFromWKB creates a new point expression.

func NewLineString

func NewLineString(args ...sql.Expression) (sql.Expression, error)

NewLineString creates a new LineString.

func NewLongitude

func NewLongitude(args ...sql.Expression) (sql.Expression, error)

NewLongitude creates a new ST_LONGITUDE expression.

func NewMLineFromText

func NewMLineFromText(args ...sql.Expression) (sql.Expression, error)

NewMLineFromText creates a new multilinestring expression.

func NewMLineFromWKB

func NewMLineFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMLineFromWKB creates a new point expression.

func NewMPointFromText

func NewMPointFromText(args ...sql.Expression) (sql.Expression, error)

NewMPointFromText creates a new MultiPoint expression.

func NewMPointFromWKB

func NewMPointFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMPointFromWKB creates a new point expression.

func NewMPolyFromText

func NewMPolyFromText(args ...sql.Expression) (sql.Expression, error)

NewMPolyFromText creates a new multilinestring expression.

func NewMPolyFromWKB

func NewMPolyFromWKB(args ...sql.Expression) (sql.Expression, error)

NewMPolyFromWKB creates a new multipolygon expression.

func NewMultiLineString

func NewMultiLineString(args ...sql.Expression) (sql.Expression, error)

NewMultiLineString creates a new multilinestring expression.

func NewMultiPoint

func NewMultiPoint(args ...sql.Expression) (sql.Expression, error)

NewMultiPoint creates a new MultiPoint.

func NewMultiPolygon

func NewMultiPolygon(args ...sql.Expression) (sql.Expression, error)

NewMultiPolygon creates a new multipolygon expression.

func NewPerimeter

func NewPerimeter(args ...sql.Expression) (sql.Expression, error)

NewSTLength creates a new STX expression.

func NewPoint

func NewPoint(e1, e2 sql.Expression) sql.Expression

NewPoint creates a new point expression.

func NewPointFromText

func NewPointFromText(args ...sql.Expression) (sql.Expression, error)

NewPointFromText creates a new point expression.

func NewPointFromWKB

func NewPointFromWKB(args ...sql.Expression) (sql.Expression, error)

NewPointFromWKB creates a new point expression.

func NewPolyFromText

func NewPolyFromText(args ...sql.Expression) (sql.Expression, error)

NewPolyFromText creates a new polygon expression.

func NewPolyFromWKB

func NewPolyFromWKB(args ...sql.Expression) (sql.Expression, error)

NewPolyFromWKB creates a new point expression.

func NewPolygon

func NewPolygon(args ...sql.Expression) (sql.Expression, error)

NewPolygon creates a new polygon expression.

func NewSRID

func NewSRID(args ...sql.Expression) (sql.Expression, error)

NewSRID creates a new STX expression.

func NewSTEquals

func NewSTEquals(g1, g2 sql.Expression) sql.Expression

NewSTEquals creates a new STEquals expression.

func NewSTLength

func NewSTLength(args ...sql.Expression) (sql.Expression, error)

NewSTLength creates a new STLength expression.

func NewSTX

func NewSTX(args ...sql.Expression) (sql.Expression, error)

NewSTX creates a new STX expression.

func NewSTY

func NewSTY(args ...sql.Expression) (sql.Expression, error)

NewSTY creates a new STY expression.

func NewStartPoint

func NewStartPoint(arg sql.Expression) sql.Expression

NewStartPoint creates a new StartPoint expression.

func NewSwapXY

func NewSwapXY(e sql.Expression) sql.Expression

NewSwapXY creates a new point expression.

func NewWithin

func NewWithin(g1, g2 sql.Expression) sql.Expression

NewWithin creates a new Within expression.

func ParseAxisOrder

func ParseAxisOrder(s string) (bool, error)

ParseAxisOrder takes in a key, value string and determines the order of the xy coords

func ParseGeoJsonData

func ParseGeoJsonData(obj map[string]interface{}) (interface{}, string, error)

func ParseWKTHeader

func ParseWKTHeader(s string) (string, string, int, error)

ParseWKTHeader should extract the type and data from the geometry string `end` is used to detect extra characters after a valid geometry

func PointToSlice

func PointToSlice(p types.Point) [2]float64

func PointToWKT

func PointToWKT(p types.Point, order bool) string

PointToWKT converts a sql.Point to a string

func PolyToSlice

func PolyToSlice(p types.Polygon) [][][2]float64

func PolygonToWKT

func PolygonToWKT(p types.Polygon, order bool) string

PolygonToWKT converts a sql.Polygon to a string

func RoundFloatSlices

func RoundFloatSlices(v interface{}, p float64) interface{}

func SliceToGeomColl

func SliceToGeomColl(geometries interface{}) (interface{}, error)

func SliceToLine

func SliceToLine(coords interface{}) (interface{}, error)

func SliceToMLine

func SliceToMLine(coords interface{}) (interface{}, error)

func SliceToMPoint

func SliceToMPoint(coords interface{}) (interface{}, error)

func SliceToMPoly

func SliceToMPoly(coords interface{}) (interface{}, error)

func SliceToPoint

func SliceToPoint(coords interface{}) (interface{}, error)

func SliceToPoly

func SliceToPoly(coords interface{}) (interface{}, error)

func TrimWKTData

func TrimWKTData(s string) (string, int, error)

func WKTToGeom

func WKTToGeom(ctx *sql.Context, row sql.Row, exprs []sql.Expression, expectedGeomType string) (types.GeometryValue, error)

WKTToGeom expects a string in WKT format, and converts it to a geometry type

func WKTToGeomColl

func WKTToGeomColl(s string, srid uint32, order bool) (types.GeomColl, error)

WKTToGeomColl Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."

func WKTToLine

func WKTToLine(s string, srid uint32, order bool) (types.LineString, error)

WKTToLine expects a string like "1.2 3.4, 5.6 7.8, ..."

func WKTToMLine

func WKTToMLine(s string, srid uint32, order bool) (types.MultiLineString, error)

WKTToMLine Expects a string like "(1 2, 3 4), (5 6, 7 8), ..."

func WKTToMPoint

func WKTToMPoint(s string, srid uint32, order bool) (types.MultiPoint, error)

WKTToMPoint expects a string like "1.2 3.4, 5.6 7.8, ..."

func WKTToMPoly

func WKTToMPoly(s string, srid uint32, order bool) (types.MultiPolygon, error)

WKTToMPoly Expects a string like "((1 2, 3 4), (5 6, 7 8), ...), ..."

func WKTToPoint

func WKTToPoint(s string, srid uint32, order bool) (types.Point, error)

WKTToPoint expects a string like this "1.2 3.4"

func WKTToPoly

func WKTToPoly(s string, srid uint32, order bool) (types.Polygon, error)

WKTToPoly Expects a string like "(1 2, 3 4), (5 6, 7 8), ..."

Types

type Area

type Area struct {
	expression.UnaryExpression
}

Area is a function that returns the Area of a Polygon

func (*Area) CollationCoercibility

func (*Area) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Area) Description

func (a *Area) Description() string

Description implements sql.FunctionExpression

func (*Area) Eval

func (a *Area) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Area) FunctionName

func (a *Area) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Area) String

func (a *Area) String() string

func (*Area) Type

func (a *Area) Type() sql.Type

Type implements the sql.Expression interface.

func (*Area) WithChildren

func (a *Area) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsGeoJSON

type AsGeoJSON struct {
	expression.NaryExpression
}

AsGeoJSON is a function that returns a point type from a WKT string

func (*AsGeoJSON) CollationCoercibility

func (f *AsGeoJSON) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AsGeoJSON) Description

func (g *AsGeoJSON) Description() string

Description implements sql.FunctionExpression

func (*AsGeoJSON) Eval

func (g *AsGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsGeoJSON) FunctionName

func (g *AsGeoJSON) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsGeoJSON) String

func (g *AsGeoJSON) String() string

func (*AsGeoJSON) Type

func (g *AsGeoJSON) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsGeoJSON) WithChildren

func (g *AsGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsWKB

type AsWKB struct {
	expression.UnaryExpression
}

AsWKB is a function that converts a spatial type into WKB format (alias for AsBinary)

func (*AsWKB) CollationCoercibility

func (*AsWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AsWKB) Description

func (a *AsWKB) Description() string

Description implements sql.FunctionExpression

func (*AsWKB) Eval

func (a *AsWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsWKB) FunctionName

func (a *AsWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsWKB) IsNullable

func (a *AsWKB) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*AsWKB) String

func (a *AsWKB) String() string

func (*AsWKB) Type

func (a *AsWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsWKB) WithChildren

func (a *AsWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type AsWKT

type AsWKT struct {
	expression.UnaryExpression
}

AsWKT is a function that converts a spatial type into WKT format (alias for AsText)

func (*AsWKT) CollationCoercibility

func (*AsWKT) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AsWKT) Description

func (p *AsWKT) Description() string

Description implements sql.FunctionExpression

func (*AsWKT) Eval

func (p *AsWKT) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*AsWKT) FunctionName

func (p *AsWKT) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*AsWKT) IsNullable

func (p *AsWKT) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*AsWKT) String

func (p *AsWKT) String() string

func (*AsWKT) Type

func (p *AsWKT) Type() sql.Type

Type implements the sql.Expression interface.

func (*AsWKT) WithChildren

func (p *AsWKT) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Dimension

type Dimension struct {
	expression.UnaryExpression
}

Dimension is a function that converts a spatial type into WKT format (alias for AsText)

func (*Dimension) CollationCoercibility

func (*Dimension) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Dimension) Description

func (p *Dimension) Description() string

Description implements sql.FunctionExpression

func (*Dimension) Eval

func (p *Dimension) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Dimension) FunctionName

func (p *Dimension) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Dimension) IsNullable

func (p *Dimension) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Dimension) String

func (p *Dimension) String() string

func (*Dimension) Type

func (p *Dimension) Type() sql.Type

Type implements the sql.Expression interface.

func (*Dimension) WithChildren

func (p *Dimension) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Distance

type Distance struct {
	expression.NaryExpression
}

Distance is a function that returns the shortest distance between two geometries

func (*Distance) CollationCoercibility

func (*Distance) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Distance) Description

func (d *Distance) Description() string

Description implements sql.FunctionExpression

func (*Distance) Eval

func (d *Distance) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Distance) FunctionName

func (d *Distance) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Distance) String

func (d *Distance) String() string

func (*Distance) Type

func (d *Distance) Type() sql.Type

Type implements the sql.Expression interface.

func (*Distance) WithChildren

func (d *Distance) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type EndPoint

type EndPoint struct {
	expression.UnaryExpression
}

EndPoint is a function that returns the last point of a LineString

func (*EndPoint) CollationCoercibility

func (*EndPoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*EndPoint) Description

func (e *EndPoint) Description() string

Description implements sql.FunctionExpression

func (*EndPoint) Eval

func (e *EndPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*EndPoint) FunctionName

func (e *EndPoint) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*EndPoint) String

func (e *EndPoint) String() string

func (*EndPoint) Type

func (e *EndPoint) Type() sql.Type

Type implements the sql.Expression interface.

func (*EndPoint) WithChildren

func (e *EndPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomColl

type GeomColl struct {
	expression.NaryExpression
}

GeomColl is a function that returns a GeometryCollection.

func (*GeomColl) CollationCoercibility

func (*GeomColl) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomColl) Description

func (g *GeomColl) Description() string

Description implements sql.FunctionExpression

func (*GeomColl) Eval

func (g *GeomColl) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomColl) FunctionName

func (g *GeomColl) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomColl) String

func (g *GeomColl) String() string

func (*GeomColl) Type

func (g *GeomColl) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomColl) WithChildren

func (g *GeomColl) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomCollFromText

type GeomCollFromText struct {
	expression.NaryExpression
}

GeomCollFromText is a function that returns a MultiPolygon type from a WKT string

func (*GeomCollFromText) CollationCoercibility

func (*GeomCollFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomCollFromText) Description

func (p *GeomCollFromText) Description() string

Description implements sql.FunctionExpression

func (*GeomCollFromText) Eval

func (p *GeomCollFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomCollFromText) FunctionName

func (p *GeomCollFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomCollFromText) String

func (p *GeomCollFromText) String() string

func (*GeomCollFromText) Type

func (p *GeomCollFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomCollFromText) WithChildren

func (p *GeomCollFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomCollFromWKB

type GeomCollFromWKB struct {
	expression.NaryExpression
}

GeomCollFromWKB is a function that returns a polygon type from a WKB byte array

func (*GeomCollFromWKB) CollationCoercibility

func (*GeomCollFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomCollFromWKB) Description

func (g *GeomCollFromWKB) Description() string

Description implements sql.FunctionExpression

func (*GeomCollFromWKB) Eval

func (g *GeomCollFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomCollFromWKB) FunctionName

func (g *GeomCollFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomCollFromWKB) String

func (g *GeomCollFromWKB) String() string

func (*GeomCollFromWKB) Type

func (g *GeomCollFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomCollFromWKB) WithChildren

func (g *GeomCollFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromGeoJSON

type GeomFromGeoJSON struct {
	expression.NaryExpression
}

GeomFromGeoJSON is a function returns a geometry based on a string

func (*GeomFromGeoJSON) CollationCoercibility

func (*GeomFromGeoJSON) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomFromGeoJSON) Description

func (g *GeomFromGeoJSON) Description() string

Description implements sql.FunctionExpression

func (*GeomFromGeoJSON) Eval

func (g *GeomFromGeoJSON) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromGeoJSON) FunctionName

func (g *GeomFromGeoJSON) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromGeoJSON) String

func (g *GeomFromGeoJSON) String() string

func (*GeomFromGeoJSON) Type

func (g *GeomFromGeoJSON) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromGeoJSON) WithChildren

func (g *GeomFromGeoJSON) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromText

type GeomFromText struct {
	expression.NaryExpression
}

GeomFromText is a function that returns a point type from a WKT string

func (*GeomFromText) CollationCoercibility

func (*GeomFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomFromText) Description

func (g *GeomFromText) Description() string

Description implements sql.FunctionExpression

func (*GeomFromText) Eval

func (g *GeomFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromText) FunctionName

func (g *GeomFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromText) String

func (g *GeomFromText) String() string

func (*GeomFromText) Type

func (g *GeomFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromText) WithChildren

func (g *GeomFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type GeomFromWKB

type GeomFromWKB struct {
	expression.NaryExpression
}

GeomFromWKB is a function that returns a geometry type from a WKB byte array

func (*GeomFromWKB) CollationCoercibility

func (*GeomFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GeomFromWKB) Description

func (g *GeomFromWKB) Description() string

Description implements sql.FunctionExpression

func (*GeomFromWKB) Eval

func (g *GeomFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*GeomFromWKB) FunctionName

func (g *GeomFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*GeomFromWKB) String

func (g *GeomFromWKB) String() string

func (*GeomFromWKB) Type

func (g *GeomFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*GeomFromWKB) WithChildren

func (g *GeomFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Intersects

type Intersects struct {
	expression.BinaryExpressionStub
}

Intersects is a function that returns true if the two geometries intersect

func (*Intersects) CollationCoercibility

func (*Intersects) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Intersects) DebugString added in v0.18.0

func (i *Intersects) DebugString() string

func (*Intersects) Description

func (i *Intersects) Description() string

Description implements sql.FunctionExpression

func (*Intersects) Eval

func (i *Intersects) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Intersects) FunctionName

func (i *Intersects) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Intersects) String

func (i *Intersects) String() string

func (*Intersects) Type

func (i *Intersects) Type() sql.Type

Type implements the sql.Expression interface.

func (*Intersects) WithChildren

func (i *Intersects) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IsClosed

type IsClosed struct {
	expression.UnaryExpression
}

IsClosed is a function that checks if a LineString or MultiLineString is close

func (*IsClosed) CollationCoercibility

func (*IsClosed) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IsClosed) Description

func (i *IsClosed) Description() string

Description implements sql.FunctionExpression

func (*IsClosed) Eval

func (i *IsClosed) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*IsClosed) FunctionName

func (i *IsClosed) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*IsClosed) String

func (i *IsClosed) String() string

func (*IsClosed) Type

func (i *IsClosed) Type() sql.Type

Type implements the sql.Expression interface.

func (*IsClosed) WithChildren

func (i *IsClosed) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Latitude

type Latitude struct {
	expression.NaryExpression
}

Latitude is a function that returns the x value from a given point.

func (*Latitude) CollationCoercibility

func (*Latitude) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Latitude) Description

func (l *Latitude) Description() string

Description implements sql.FunctionExpression

func (*Latitude) Eval

func (l *Latitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Latitude) FunctionName

func (l *Latitude) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Latitude) String

func (l *Latitude) String() string

func (*Latitude) Type

func (l *Latitude) Type() sql.Type

Type implements the sql.Expression interface.

func (*Latitude) WithChildren

func (l *Latitude) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineFromText

type LineFromText struct {
	expression.NaryExpression
}

LineFromText is a function that returns a LineString type from a WKT string

func (*LineFromText) CollationCoercibility

func (*LineFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*LineFromText) Description

func (l *LineFromText) Description() string

Description implements sql.FunctionExpression

func (*LineFromText) Eval

func (l *LineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineFromText) FunctionName

func (l *LineFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineFromText) String

func (l *LineFromText) String() string

func (*LineFromText) Type

func (l *LineFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineFromText) WithChildren

func (l *LineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineFromWKB

type LineFromWKB struct {
	expression.NaryExpression
}

LineFromWKB is a function that returns a linestring type from a WKB byte array

func (*LineFromWKB) CollationCoercibility

func (*LineFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*LineFromWKB) Description

func (l *LineFromWKB) Description() string

Description implements sql.FunctionExpression

func (*LineFromWKB) Eval

func (l *LineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineFromWKB) FunctionName

func (l *LineFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineFromWKB) String

func (l *LineFromWKB) String() string

func (*LineFromWKB) Type

func (l *LineFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineFromWKB) WithChildren

func (l *LineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type LineString

type LineString struct {
	expression.NaryExpression
}

LineString is a function that returns a point type containing values Y and Y.

func (*LineString) CollationCoercibility

func (*LineString) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*LineString) Description

func (l *LineString) Description() string

Description implements sql.FunctionExpression

func (*LineString) Eval

func (l *LineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*LineString) FunctionName

func (l *LineString) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*LineString) String

func (l *LineString) String() string

func (*LineString) Type

func (l *LineString) Type() sql.Type

Type implements the sql.Expression interface.

func (*LineString) WithChildren

func (l *LineString) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Longitude

type Longitude struct {
	expression.NaryExpression
}

Longitude is a function that returns the x value from a given point.

func (*Longitude) CollationCoercibility

func (*Longitude) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Longitude) Description

func (l *Longitude) Description() string

Description implements sql.FunctionExpression

func (*Longitude) Eval

func (l *Longitude) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Longitude) FunctionName

func (l *Longitude) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Longitude) String

func (l *Longitude) String() string

func (*Longitude) Type

func (l *Longitude) Type() sql.Type

Type implements the sql.Expression interface.

func (*Longitude) WithChildren

func (l *Longitude) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MLineFromText

type MLineFromText struct {
	expression.NaryExpression
}

MLineFromText is a function that returns a MultiLineString type from a WKT string

func (*MLineFromText) CollationCoercibility

func (*MLineFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MLineFromText) Description

func (l *MLineFromText) Description() string

Description implements sql.FunctionExpression

func (*MLineFromText) Eval

func (l *MLineFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MLineFromText) FunctionName

func (l *MLineFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MLineFromText) String

func (l *MLineFromText) String() string

func (*MLineFromText) Type

func (l *MLineFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MLineFromText) WithChildren

func (l *MLineFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MLineFromWKB

type MLineFromWKB struct {
	expression.NaryExpression
}

MLineFromWKB is a function that returns a polygon type from a WKB byte array

func (*MLineFromWKB) CollationCoercibility

func (*MLineFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MLineFromWKB) Description

func (l *MLineFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MLineFromWKB) Eval

func (l *MLineFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MLineFromWKB) FunctionName

func (l *MLineFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MLineFromWKB) String

func (l *MLineFromWKB) String() string

func (*MLineFromWKB) Type

func (l *MLineFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MLineFromWKB) WithChildren

func (l *MLineFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPointFromText

type MPointFromText struct {
	expression.NaryExpression
}

MultiPoint is a function that returns a MultiPoint type from a WKT string

func (*MPointFromText) CollationCoercibility

func (*MPointFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MPointFromText) Description

func (p *MPointFromText) Description() string

Description implements sql.FunctionExpression

func (*MPointFromText) Eval

func (p *MPointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPointFromText) FunctionName

func (p *MPointFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPointFromText) String

func (p *MPointFromText) String() string

func (*MPointFromText) Type

func (p *MPointFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPointFromText) WithChildren

func (p *MPointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPointFromWKB

type MPointFromWKB struct {
	expression.NaryExpression
}

MPointFromWKB is a function that returns a linestring type from a WKB byte array

func (*MPointFromWKB) CollationCoercibility

func (*MPointFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MPointFromWKB) Description

func (p *MPointFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MPointFromWKB) Eval

func (p *MPointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPointFromWKB) FunctionName

func (p *MPointFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPointFromWKB) String

func (p *MPointFromWKB) String() string

func (*MPointFromWKB) Type

func (p *MPointFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPointFromWKB) WithChildren

func (p *MPointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPolyFromText

type MPolyFromText struct {
	expression.NaryExpression
}

MPolyFromText is a function that returns a MultiPolygon type from a WKT string

func (*MPolyFromText) CollationCoercibility

func (*MPolyFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MPolyFromText) Description

func (p *MPolyFromText) Description() string

Description implements sql.FunctionExpression

func (*MPolyFromText) Eval

func (p *MPolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPolyFromText) FunctionName

func (p *MPolyFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPolyFromText) String

func (p *MPolyFromText) String() string

func (*MPolyFromText) Type

func (p *MPolyFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPolyFromText) WithChildren

func (p *MPolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MPolyFromWKB

type MPolyFromWKB struct {
	expression.NaryExpression
}

MPolyFromWKB is a function that returns a polygon type from a WKB byte array

func (*MPolyFromWKB) CollationCoercibility

func (*MPolyFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MPolyFromWKB) Description

func (p *MPolyFromWKB) Description() string

Description implements sql.FunctionExpression

func (*MPolyFromWKB) Eval

func (p *MPolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MPolyFromWKB) FunctionName

func (p *MPolyFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MPolyFromWKB) String

func (p *MPolyFromWKB) String() string

func (*MPolyFromWKB) Type

func (p *MPolyFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*MPolyFromWKB) WithChildren

func (p *MPolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MultiLineString

type MultiLineString struct {
	expression.NaryExpression
}

MultiLineString is a function that returns a MultiLineString.

func (*MultiLineString) CollationCoercibility

func (*MultiLineString) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MultiLineString) Description

func (p *MultiLineString) Description() string

Description implements sql.FunctionExpression

func (*MultiLineString) Eval

func (p *MultiLineString) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiLineString) FunctionName

func (p *MultiLineString) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiLineString) String

func (p *MultiLineString) String() string

func (*MultiLineString) Type

func (p *MultiLineString) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiLineString) WithChildren

func (p *MultiLineString) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MultiPoint

type MultiPoint struct {
	expression.NaryExpression
}

MultiPoint is a function that returns a set of Points.

func (*MultiPoint) CollationCoercibility

func (*MultiPoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MultiPoint) Description

func (l *MultiPoint) Description() string

Description implements sql.FunctionExpression

func (*MultiPoint) Eval

func (l *MultiPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiPoint) FunctionName

func (l *MultiPoint) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiPoint) String

func (l *MultiPoint) String() string

func (*MultiPoint) Type

func (l *MultiPoint) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiPoint) WithChildren

func (l *MultiPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type MultiPolygon

type MultiPolygon struct {
	expression.NaryExpression
}

MultiPolygon is a function that returns a MultiPolygon.

func (*MultiPolygon) CollationCoercibility

func (*MultiPolygon) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*MultiPolygon) Description

func (p *MultiPolygon) Description() string

Description implements sql.FunctionExpression

func (*MultiPolygon) Eval

func (p *MultiPolygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*MultiPolygon) FunctionName

func (p *MultiPolygon) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*MultiPolygon) String

func (p *MultiPolygon) String() string

func (*MultiPolygon) Type

func (p *MultiPolygon) Type() sql.Type

Type implements the sql.Expression interface.

func (*MultiPolygon) WithChildren

func (p *MultiPolygon) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Perimeter

type Perimeter struct {
	expression.NaryExpression
}

Perimeter is a function that returns the Perimeter of a Polygon Not in MySQL, basing off: https://postgis.net/docs/ST_Perimeter.html

func (*Perimeter) CollationCoercibility

func (*Perimeter) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Perimeter) Description

func (p *Perimeter) Description() string

Description implements sql.FunctionExpression

func (*Perimeter) Eval

func (p *Perimeter) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Perimeter) FunctionName

func (p *Perimeter) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Perimeter) String

func (p *Perimeter) String() string

func (*Perimeter) Type

func (p *Perimeter) Type() sql.Type

Type implements the sql.Expression interface.

func (*Perimeter) WithChildren

func (p *Perimeter) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Point

type Point struct {
	X sql.Expression
	Y sql.Expression
}

Point is a function that returns a point type containing values Y and Y.

func (*Point) Children

func (p *Point) Children() []sql.Expression

Children implements the sql.Expression interface.

func (*Point) CollationCoercibility

func (*Point) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Point) Description

func (p *Point) Description() string

Description implements sql.FunctionExpression

func (*Point) Eval

func (p *Point) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Point) FunctionName

func (p *Point) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Point) IsNullable

func (p *Point) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*Point) Resolved

func (p *Point) Resolved() bool

Resolved implements the sql.Expression interface.

func (*Point) String

func (p *Point) String() string

func (*Point) Type

func (p *Point) Type() sql.Type

Type implements the sql.Expression interface.

func (*Point) WithChildren

func (p *Point) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PointFromText

type PointFromText struct {
	expression.NaryExpression
}

PointFromText is a function that returns a Point type from a WKT string

func (*PointFromText) CollationCoercibility

func (*PointFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PointFromText) Description

func (p *PointFromText) Description() string

Description implements sql.FunctionExpression

func (*PointFromText) Eval

func (p *PointFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PointFromText) FunctionName

func (p *PointFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PointFromText) String

func (p *PointFromText) String() string

func (*PointFromText) Type

func (p *PointFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*PointFromText) WithChildren

func (p *PointFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PointFromWKB

type PointFromWKB struct {
	expression.NaryExpression
}

PointFromWKB is a function that returns a point type from a WKB byte array

func (*PointFromWKB) CollationCoercibility

func (*PointFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PointFromWKB) Description

func (p *PointFromWKB) Description() string

Description implements sql.FunctionExpression

func (*PointFromWKB) Eval

func (p *PointFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PointFromWKB) FunctionName

func (p *PointFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PointFromWKB) String

func (p *PointFromWKB) String() string

func (*PointFromWKB) Type

func (p *PointFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*PointFromWKB) WithChildren

func (p *PointFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PolyFromText

type PolyFromText struct {
	expression.NaryExpression
}

PolyFromText is a function that returns a Polygon type from a WKT string

func (*PolyFromText) CollationCoercibility

func (*PolyFromText) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PolyFromText) Description

func (p *PolyFromText) Description() string

Description implements sql.FunctionExpression

func (*PolyFromText) Eval

func (p *PolyFromText) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PolyFromText) FunctionName

func (p *PolyFromText) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PolyFromText) String

func (p *PolyFromText) String() string

func (*PolyFromText) Type

func (p *PolyFromText) Type() sql.Type

Type implements the sql.Expression interface.

func (*PolyFromText) WithChildren

func (p *PolyFromText) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type PolyFromWKB

type PolyFromWKB struct {
	expression.NaryExpression
}

PolyFromWKB is a function that returns a polygon type from a WKB byte array

func (*PolyFromWKB) CollationCoercibility

func (*PolyFromWKB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PolyFromWKB) Description

func (p *PolyFromWKB) Description() string

Description implements sql.FunctionExpression

func (*PolyFromWKB) Eval

func (p *PolyFromWKB) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*PolyFromWKB) FunctionName

func (p *PolyFromWKB) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*PolyFromWKB) String

func (p *PolyFromWKB) String() string

func (*PolyFromWKB) Type

func (p *PolyFromWKB) Type() sql.Type

Type implements the sql.Expression interface.

func (*PolyFromWKB) WithChildren

func (p *PolyFromWKB) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Polygon

type Polygon struct {
	expression.NaryExpression
}

Polygon is a function that returns a Polygon.

func (*Polygon) CollationCoercibility

func (*Polygon) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Polygon) Description

func (p *Polygon) Description() string

Description implements sql.FunctionExpression

func (*Polygon) Eval

func (p *Polygon) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Polygon) FunctionName

func (p *Polygon) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Polygon) String

func (p *Polygon) String() string

func (*Polygon) Type

func (p *Polygon) Type() sql.Type

Type implements the sql.Expression interface.

func (*Polygon) WithChildren

func (p *Polygon) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type SRID

type SRID struct {
	expression.NaryExpression
}

SRID is a function that returns SRID of Geometry object or returns a new object with altered SRID.

func (*SRID) CollationCoercibility

func (*SRID) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*SRID) Description

func (s *SRID) Description() string

Description implements sql.FunctionExpression

func (*SRID) Eval

func (s *SRID) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*SRID) FunctionName

func (s *SRID) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SRID) String

func (s *SRID) String() string

func (*SRID) Type

func (s *SRID) Type() sql.Type

Type implements the sql.Expression interface.

func (*SRID) WithChildren

func (s *SRID) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STEquals

type STEquals struct {
	expression.BinaryExpressionStub
}

STEquals is a function that returns the STEquals of a LineString

func (*STEquals) Description

func (s *STEquals) Description() string

Description implements sql.FunctionExpression

func (*STEquals) Eval

func (s *STEquals) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STEquals) FunctionName

func (s *STEquals) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STEquals) String

func (s *STEquals) String() string

func (*STEquals) Type

func (s *STEquals) Type() sql.Type

Type implements the sql.Expression interface.

func (*STEquals) WithChildren

func (s *STEquals) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STLength

type STLength struct {
	expression.NaryExpression
}

STLength is a function that returns the STLength of a LineString

func (*STLength) CollationCoercibility

func (*STLength) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*STLength) Description

func (s *STLength) Description() string

Description implements sql.FunctionExpression

func (*STLength) Eval

func (s *STLength) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STLength) FunctionName

func (s *STLength) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STLength) String

func (s *STLength) String() string

func (*STLength) Type

func (s *STLength) Type() sql.Type

Type implements the sql.Expression interface.

func (*STLength) WithChildren

func (s *STLength) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STX

type STX struct {
	expression.NaryExpression
}

STX is a function that returns the x value from a given point.

func (*STX) CollationCoercibility

func (*STX) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*STX) Description

func (s *STX) Description() string

Description implements sql.FunctionExpression

func (*STX) Eval

func (s *STX) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STX) FunctionName

func (s *STX) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STX) String

func (s *STX) String() string

func (*STX) Type

func (s *STX) Type() sql.Type

Type implements the sql.Expression interface.

func (*STX) WithChildren

func (s *STX) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type STY

type STY struct {
	expression.NaryExpression
}

STY is a function that returns the y value from a given point.

func (*STY) CollationCoercibility

func (*STY) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*STY) Description

func (s *STY) Description() string

Description implements sql.FunctionExpression

func (*STY) Eval

func (s *STY) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*STY) FunctionName

func (s *STY) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*STY) String

func (s *STY) String() string

func (*STY) Type

func (s *STY) Type() sql.Type

Type implements the sql.Expression interface.

func (*STY) WithChildren

func (s *STY) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type StartPoint

type StartPoint struct {
	expression.UnaryExpression
}

StartPoint is a function that returns the first point of a LineString

func (*StartPoint) CollationCoercibility

func (*StartPoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*StartPoint) Description

func (s *StartPoint) Description() string

Description implements sql.FunctionExpression

func (*StartPoint) Eval

func (s *StartPoint) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*StartPoint) FunctionName

func (s *StartPoint) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*StartPoint) String

func (s *StartPoint) String() string

func (*StartPoint) Type

func (s *StartPoint) Type() sql.Type

Type implements the sql.Expression interface.

func (*StartPoint) WithChildren

func (s *StartPoint) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type SwapXY

type SwapXY struct {
	expression.UnaryExpression
}

SwapXY is a function that returns a spatial type with their X and Y values swapped

func (*SwapXY) CollationCoercibility

func (*SwapXY) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*SwapXY) Description

func (s *SwapXY) Description() string

Description implements sql.FunctionExpression

func (*SwapXY) Eval

func (s *SwapXY) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*SwapXY) FunctionName

func (s *SwapXY) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*SwapXY) IsNullable

func (s *SwapXY) IsNullable() bool

IsNullable implements the sql.Expression interface.

func (*SwapXY) String

func (s *SwapXY) String() string

func (*SwapXY) Type

func (s *SwapXY) Type() sql.Type

Type implements the sql.Expression interface.

func (*SwapXY) WithChildren

func (s *SwapXY) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type Within

type Within struct {
	expression.BinaryExpressionStub
}

Within is a function that true if left is spatially within right

func (*Within) CollationCoercibility

func (*Within) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Within) Description

func (w *Within) Description() string

Description implements sql.FunctionExpression

func (*Within) Eval

func (w *Within) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the sql.Expression interface.

func (*Within) FunctionName

func (w *Within) FunctionName() string

FunctionName implements sql.FunctionExpression

func (*Within) String

func (w *Within) String() string

func (*Within) Type

func (w *Within) Type() sql.Type

Type implements the sql.Expression interface.

func (*Within) WithChildren

func (w *Within) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL