Safe Haskell | None |
---|---|
Language | Haskell2010 |
Postgres types and functions to create Column
s of those types.
You may find it more convenient to use Opaleye.Constant instead.
Synopsis
- data PGRange a
- data PGJsonb
- data PGJson
- data PGBytea
- data PGArray a
- data PGCitext
- data PGUuid
- data PGTimestamptz
- data PGTimestamp
- data PGTime
- data PGText
- data PGNumeric
- data PGInt2
- data PGInt4
- data PGInt8
- data PGFloat8
- data PGFloat4
- data PGDate
- data PGBool
- class IsSqlType pgType => IsRangeType pgType where
- class IsSqlType sqlType where
- pgString :: String -> Column PGText
- pgLazyByteString :: ByteString -> Column PGBytea
- pgStrictByteString :: ByteString -> Column PGBytea
- pgStrictText :: Text -> Column PGText
- pgLazyText :: Text -> Column PGText
- pgNumeric :: Scientific -> Column PGNumeric
- pgInt4 :: Int -> Column PGInt4
- pgInt8 :: Int64 -> Column PGInt8
- pgDouble :: Double -> Column PGFloat8
- pgBool :: Bool -> Column PGBool
- pgUUID :: UUID -> Column PGUuid
- pgDay :: Day -> Column PGDate
- pgUTCTime :: UTCTime -> Column PGTimestamptz
- pgLocalTime :: LocalTime -> Column PGTimestamp
- pgZonedTime :: ZonedTime -> Column PGTimestamptz
- pgTimeOfDay :: TimeOfDay -> Column PGTime
- pgCiStrictText :: CI Text -> Column PGCitext
- pgCiLazyText :: CI Text -> Column PGCitext
- pgJSON :: String -> Column PGJson
- pgStrictJSON :: ByteString -> Column PGJson
- pgLazyJSON :: ByteString -> Column PGJson
- pgValueJSON :: ToJSON a => a -> Column PGJson
- pgJSONB :: String -> Column PGJsonb
- pgStrictJSONB :: ByteString -> Column PGJsonb
- pgLazyJSONB :: ByteString -> Column PGJsonb
- pgValueJSONB :: ToJSON a => a -> Column PGJsonb
- pgArray :: forall a b. IsSqlType b => (a -> Column b) -> [a] -> Column (PGArray b)
- pgRange :: forall a b. IsRangeType b => (a -> Column b) -> RangeBound a -> RangeBound a -> Column (PGRange b)
- literalColumn :: Literal -> Column a
- unsafePgFormatTime :: FormatTime t => Name -> String -> t -> Column c
Documentation
Instances
Default Constant (PGRange Int) (Column (SqlRange SqlInt4)) # | |
Default Constant (PGRange Int64) (Column (SqlRange SqlInt8)) # | |
Default Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # | |
Defined in Opaleye.Constant def :: Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # | |
Default Constant (PGRange UTCTime) (Column (SqlRange SqlTimestamptz)) # | |
Defined in Opaleye.Constant | |
Default Constant (PGRange LocalTime) (Column (SqlRange SqlTimestamp)) # | |
Defined in Opaleye.Constant | |
Default Constant (PGRange Day) (Column (SqlRange SqlDate)) # | |
IsRangeType a => IsSqlType (PGRange a) Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy (PGRange a) -> String Source # showSqlType :: proxy (PGRange a) -> String Source # | |
(Typeable b, FromField b, QueryRunnerColumnDefault a b) => QueryRunnerColumnDefault (PGRange a) (PGRange b) Source # | |
Defined in Opaleye.Internal.RunQuery queryRunnerColumnDefault :: QueryRunnerColumn (PGRange a) (PGRange0 b) Source # |
Instances
IsSqlType PGJsonb Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGJsonb -> String Source # showSqlType :: proxy PGJsonb -> String Source # | |
PGIsJson SqlJsonb Source # | |
Defined in Opaleye.Operators | |
QueryRunnerColumnDefault PGJsonb String Source # | |
QueryRunnerColumnDefault PGJsonb Value Source # | |
Default Constant ByteString (Column SqlJsonb) # | |
Defined in Opaleye.Constant | |
Default Constant ByteString (Column SqlJsonb) # | |
Defined in Opaleye.Constant | |
Default Constant Value (Column SqlJsonb) # | |
type Map Nulled (Column PGJsonb) Source # | |
Instances
IsSqlType PGJson Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGJson -> String Source # showSqlType :: proxy PGJson -> String Source # | |
PGIsJson SqlJson Source # | |
Defined in Opaleye.Operators | |
QueryRunnerColumnDefault PGJson String Source # | |
QueryRunnerColumnDefault PGJson Value Source # | |
Default Constant ByteString (Column SqlJson) # | |
Defined in Opaleye.Constant | |
Default Constant ByteString (Column SqlJson) # | |
Defined in Opaleye.Constant | |
Default Constant Value (Column SqlJson) # | |
type Map Nulled (Column PGJson) Source # | |
Instances
IsSqlType PGBytea Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGBytea -> String Source # showSqlType :: proxy PGBytea -> String Source # | |
QueryRunnerColumnDefault PGBytea ByteString Source # | |
QueryRunnerColumnDefault PGBytea ByteString Source # | |
Default Constant ByteString (Column SqlBytea) # | |
Defined in Opaleye.Constant | |
Default Constant ByteString (Column SqlBytea) # | |
Defined in Opaleye.Constant | |
type Map Nulled (Column PGBytea) Source # | |
Instances
(Default Constant a (Column b), IsSqlType b) => Default Constant [a] (Column (SqlArray b)) # | |
IsSqlType a => IsSqlType (PGArray a) Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy (PGArray a) -> String Source # showSqlType :: proxy (PGArray a) -> String Source # | |
(Typeable b, QueryRunnerColumnDefault a b) => QueryRunnerColumnDefault (PGArray a) [b] Source # | |
Defined in Opaleye.Internal.RunQuery queryRunnerColumnDefault :: QueryRunnerColumn (PGArray a) [b] Source # |
Instances
PGString PGCitext Source # | |
Defined in Opaleye.PGTypes | |
IsSqlType PGCitext Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGCitext -> String Source # showSqlType :: proxy PGCitext -> String Source # | |
PGOrd SqlCitext Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGCitext (CI Text) Source # | |
Defined in Opaleye.Internal.RunQuery | |
QueryRunnerColumnDefault PGCitext (CI Text) Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default Constant (CI Text) (Column SqlCitext) # | |
Default Constant (CI Text) (Column SqlCitext) # | |
type Map Nulled (Column PGCitext) Source # | |
Instances
IsSqlType PGUuid Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGUuid -> String Source # showSqlType :: proxy PGUuid -> String Source # | |
PGOrd SqlUuid Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGUuid UUID Source # | |
Default Constant UUID (Column SqlUuid) # | |
type Map Nulled (Column PGUuid) Source # | |
data PGTimestamptz Source #
Instances
IsRangeType PGTimestamptz Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGTimestamptz -> String Source # | |
IsSqlType PGTimestamptz Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGTimestamptz -> String Source # showSqlType :: proxy PGTimestamptz -> String Source # | |
PGOrd SqlTimestamptz Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGTimestamptz UTCTime Source # | |
QueryRunnerColumnDefault PGTimestamptz ZonedTime Source # | |
Default Constant UTCTime (Column SqlTimestamptz) # | |
Defined in Opaleye.Constant | |
Default Constant ZonedTime (Column SqlTimestamptz) # | |
Defined in Opaleye.Constant | |
Default Constant (PGRange UTCTime) (Column (SqlRange SqlTimestamptz)) # | |
Defined in Opaleye.Constant | |
type Map Nulled (Column PGTimestamptz) Source # | |
Defined in Opaleye.Internal.Join |
data PGTimestamp Source #
Instances
IsRangeType PGTimestamp Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGTimestamp -> String Source # | |
IsSqlType PGTimestamp Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGTimestamp -> String Source # showSqlType :: proxy PGTimestamp -> String Source # | |
PGOrd SqlTimestamp Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGTimestamp LocalTime Source # | |
Default Constant LocalTime (Column SqlTimestamp) # | |
Defined in Opaleye.Constant | |
Default Constant (PGRange LocalTime) (Column (SqlRange SqlTimestamp)) # | |
Defined in Opaleye.Constant | |
type Map Nulled (Column PGTimestamp) Source # | |
Defined in Opaleye.Internal.Join |
Instances
IsSqlType PGTime Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGTime -> String Source # showSqlType :: proxy PGTime -> String Source # | |
PGOrd SqlTime Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGTime TimeOfDay Source # | |
Default Constant TimeOfDay (Column SqlTime) # | |
type Map Nulled (Column PGTime) Source # | |
Instances
PGString PGText Source # | |
Defined in Opaleye.PGTypes | |
IsSqlType PGText Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGText -> String Source # showSqlType :: proxy PGText -> String Source # | |
PGOrd SqlText Source # | |
Defined in Opaleye.Order | |
PGJsonIndex SqlText Source # | |
Defined in Opaleye.Operators | |
QueryRunnerColumnDefault PGText String Source # | |
QueryRunnerColumnDefault PGText Text Source # | |
QueryRunnerColumnDefault PGText Text Source # | |
Default Constant String (Column SqlText) # | |
Default Constant Text (Column SqlText) # | |
Default Constant Text (Column SqlText) # | |
type Map Nulled (Column PGText) Source # | |
type Map Nulled (Column PGText) Source # | |
Instances
PGIntegral PGNumeric Source # | |
Defined in Opaleye.PGTypes | |
IsRangeType PGNumeric Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGNumeric -> String Source # | |
IsSqlType PGNumeric Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGNumeric -> String Source # showSqlType :: proxy PGNumeric -> String Source # | |
PGOrd SqlNumeric Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGNumeric Scientific Source # | |
Default Constant Scientific (Column SqlNumeric) # | |
Defined in Opaleye.Constant def :: Constant Scientific (Column SqlNumeric) # | |
Default Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # | |
Defined in Opaleye.Constant def :: Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # |
Instances
PGIntegral PGInt2 Source # | |
Defined in Opaleye.PGTypes | |
IsSqlType PGInt2 Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGInt2 -> String Source # showSqlType :: proxy PGInt2 -> String Source # | |
PGOrd SqlInt2 Source # | |
Defined in Opaleye.Order |
Instances
PGIntegral PGInt4 Source # | |
Defined in Opaleye.PGTypes | |
PGNum PGInt4 Source # | |
Defined in Opaleye.PGTypes | |
IsRangeType PGInt4 Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGInt4 -> String Source # | |
IsSqlType PGInt4 Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGInt4 -> String Source # showSqlType :: proxy PGInt4 -> String Source # | |
PGOrd SqlInt4 Source # | |
Defined in Opaleye.Order | |
PGJsonIndex SqlInt4 Source # | |
Defined in Opaleye.Operators | |
QueryRunnerColumnDefault PGInt4 Int Source # | |
QueryRunnerColumnDefault PGInt4 Int32 Source # | |
Default Constant Int (Column SqlInt4) # | |
Default Constant Int32 (Column SqlInt4) # | |
Default Constant (PGRange Int) (Column (SqlRange SqlInt4)) # | |
type Map Nulled (Column PGInt4) Source # | |
Instances
PGIntegral PGInt8 Source # | |
Defined in Opaleye.PGTypes | |
PGNum PGInt8 Source # | |
Defined in Opaleye.PGTypes | |
IsRangeType PGInt8 Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGInt8 -> String Source # | |
IsSqlType PGInt8 Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGInt8 -> String Source # showSqlType :: proxy PGInt8 -> String Source # | |
PGOrd SqlInt8 Source # | |
Defined in Opaleye.Order | |
PGJsonIndex SqlInt8 Source # | |
Defined in Opaleye.Operators | |
QueryRunnerColumnDefault PGInt8 Int64 Source # | |
Default Constant Int64 (Column SqlInt8) # | |
Default Constant (PGRange Int64) (Column (SqlRange SqlInt8)) # | |
type Map Nulled (Column PGInt8) Source # | |
Instances
PGFractional PGFloat8 Source # | |
Defined in Opaleye.PGTypes | |
PGNum PGFloat8 Source # | |
Defined in Opaleye.PGTypes | |
IsSqlType PGFloat8 Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGFloat8 -> String Source # showSqlType :: proxy PGFloat8 -> String Source # | |
PGOrd SqlFloat8 Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGFloat8 Double Source # | |
Default Constant Double (Column SqlFloat8) # | |
type Map Nulled (Column PGFloat8) Source # | |
Instances
IsSqlType PGFloat4 Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGFloat4 -> String Source # showSqlType :: proxy PGFloat4 -> String Source # | |
PGOrd SqlFloat4 Source # | |
Defined in Opaleye.Order |
Instances
IsRangeType PGDate Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGDate -> String Source # | |
IsSqlType PGDate Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGDate -> String Source # showSqlType :: proxy PGDate -> String Source # | |
PGOrd SqlDate Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGDate Day Source # | |
Default Constant Day (Column SqlDate) # | |
Default Constant (PGRange Day) (Column (SqlRange SqlDate)) # | |
type Map Nulled (Column PGDate) Source # | |
Instances
IsSqlType PGBool Source # | |
Defined in Opaleye.PGTypes showPGType :: proxy PGBool -> String Source # showSqlType :: proxy PGBool -> String Source # | |
PGOrd SqlBool Source # | |
Defined in Opaleye.Order | |
QueryRunnerColumnDefault PGBool Bool Source # | |
Default Constant Bool (Column SqlBool) # | |
type Map Nulled (Column PGBool) Source # | |
class IsSqlType pgType => IsRangeType pgType where Source #
showRangeType :: proxy pgType -> String Source #
Instances
IsRangeType PGTimestamptz Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGTimestamptz -> String Source # | |
IsRangeType PGTimestamp Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGTimestamp -> String Source # | |
IsRangeType PGNumeric Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGNumeric -> String Source # | |
IsRangeType PGInt4 Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGInt4 -> String Source # | |
IsRangeType PGInt8 Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGInt8 -> String Source # | |
IsRangeType PGDate Source # | |
Defined in Opaleye.PGTypes showRangeType :: proxy PGDate -> String Source # |
class IsSqlType sqlType where Source #
showPGType :: proxy sqlType -> String Source #
Deprecated: Use showSqlType
instead. showPGType
will be removed in version 0.7.
showSqlType :: proxy sqlType -> String Source #
Instances
pgLocalTime :: LocalTime -> Column PGTimestamp Source #
pgStrictJSON :: ByteString -> Column PGJson Source #
pgLazyJSON :: ByteString -> Column PGJson Source #
pgStrictJSONB :: ByteString -> Column PGJsonb Source #
pgLazyJSONB :: ByteString -> Column PGJsonb Source #
pgRange :: forall a b. IsRangeType b => (a -> Column b) -> RangeBound a -> RangeBound a -> Column (PGRange b) Source #
literalColumn :: Literal -> Column a Source #
Deprecated: literalColumn
has been moved to Opaleye.Internal.PGTypes and will be removed in version 0.7.
unsafePgFormatTime :: FormatTime t => Name -> String -> t -> Column c Source #
Deprecated: unsafePgFormatTime
has been moved to Opaleye.Internal.PGTypes and will be removed in version 0.7.