{-# LANGUAGE DataKinds #-}
module Database.Esqueleto.Postgis.Editor
( st_addpoint
, st_collectionextract
, st_flipcoordinates
, st_force2d
, st_force3d
, st_force4d
, st_forcecollection
, st_forcepolygonccw
, st_forcepolygoncw
, st_multi
, st_normalize
, st_reverse
, st_segmentize
, st_setpoint
, st_snaptogrid
, st_snap
) where
import Database.Esqueleto.Postgis.Geometry (Postgis, SpatialType(..))
import Database.Esqueleto.Experimental (SqlExpr, Value)
import Database.Esqueleto.Internal.Internal (unsafeSqlFunction)
st_addpoint ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Int) ->
SqlExpr (Value (Postgis 'Geometry a))
st_addpoint :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value Int)
-> SqlExpr (Value (Postgis 'Geometry a))
st_addpoint SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value (Postgis 'Geometry a))
b SqlExpr (Value Int)
n = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)),
SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Int))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_AddPoint" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value (Postgis 'Geometry a))
b, SqlExpr (Value Int)
n)
st_collectionextract ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Int) ->
SqlExpr (Value (Postgis 'Geometry a))
SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value Int)
t = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Int))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_CollectionExtract" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value Int)
t)
st_flipcoordinates ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_flipcoordinates :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_flipcoordinates SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_FlipCoordinates" SqlExpr (Value (Postgis 'Geometry a))
a
st_force2d ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_force2d :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_force2d SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Force2D" SqlExpr (Value (Postgis 'Geometry a))
a
st_force3d ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_force3d :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_force3d SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Force3D" SqlExpr (Value (Postgis 'Geometry a))
a
st_force4d ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_force4d :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_force4d SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Force4D" SqlExpr (Value (Postgis 'Geometry a))
a
st_forcecollection ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_forcecollection :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_forcecollection SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_ForceCollection" SqlExpr (Value (Postgis 'Geometry a))
a
st_forcepolygonccw ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_forcepolygonccw :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_forcepolygonccw SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_ForcePolygonCCW" SqlExpr (Value (Postgis 'Geometry a))
a
st_forcepolygoncw ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_forcepolygoncw :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_forcepolygoncw SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_ForcePolygonCW" SqlExpr (Value (Postgis 'Geometry a))
a
st_multi ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_multi :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_multi SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Multi" SqlExpr (Value (Postgis 'Geometry a))
a
st_normalize ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_normalize :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_normalize SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Normalize" SqlExpr (Value (Postgis 'Geometry a))
a
st_reverse ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_reverse :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_reverse SqlExpr (Value (Postgis 'Geometry a))
a = Builder
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Reverse" SqlExpr (Value (Postgis 'Geometry a))
a
st_segmentize ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Double) ->
SqlExpr (Value (Postgis 'Geometry a))
st_segmentize :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value Double) -> SqlExpr (Value (Postgis 'Geometry a))
st_segmentize SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value Double)
d = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Double))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Segmentize" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value Double)
d)
st_setpoint ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Int) ->
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a))
st_setpoint :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value Int)
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
st_setpoint SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value Int)
n SqlExpr (Value (Postgis 'Geometry a))
p = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Int),
SqlExpr (Value (Postgis 'Geometry a)))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_SetPoint" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value Int)
n, SqlExpr (Value (Postgis 'Geometry a))
p)
st_snaptogrid ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Double) ->
SqlExpr (Value (Postgis 'Geometry a))
st_snaptogrid :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value Double) -> SqlExpr (Value (Postgis 'Geometry a))
st_snaptogrid SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value Double)
d = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Double))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_SnapToGrid" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value Double)
d)
st_snap ::
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value (Postgis 'Geometry a)) ->
SqlExpr (Value Double) ->
SqlExpr (Value (Postgis 'Geometry a))
st_snap :: forall a.
SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value (Postgis 'Geometry a))
-> SqlExpr (Value Double)
-> SqlExpr (Value (Postgis 'Geometry a))
st_snap SqlExpr (Value (Postgis 'Geometry a))
a SqlExpr (Value (Postgis 'Geometry a))
b SqlExpr (Value Double)
d = Builder
-> (SqlExpr (Value (Postgis 'Geometry a)),
SqlExpr (Value (Postgis 'Geometry a)), SqlExpr (Value Double))
-> SqlExpr (Value (Postgis 'Geometry a))
forall a b.
UnsafeSqlFunctionArgument a =>
Builder -> a -> SqlExpr (Value b)
unsafeSqlFunction Builder
"ST_Snap" (SqlExpr (Value (Postgis 'Geometry a))
a, SqlExpr (Value (Postgis 'Geometry a))
b, SqlExpr (Value Double)
d)