| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Opaleye.PGTypes
Description
Postgres types and functions to create Columns 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
- showRangeType :: proxy pgType -> String
- class IsSqlType sqlType where
- showPGType :: proxy sqlType -> String
- showSqlType :: proxy sqlType -> String
- 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 Methods 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) # | |
Defined in Opaleye.PGTypes | |
| (Typeable b, FromField b, QueryRunnerColumnDefault a b) => QueryRunnerColumnDefault (PGRange a) (PGRange b) # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn (PGRange a) (PGRange0 b) # | |
Instances
| IsSqlType PGJsonb # | |
Defined in Opaleye.PGTypes | |
| PGIsJson SqlJsonb # | |
Defined in Opaleye.Operators | |
| QueryRunnerColumnDefault PGJsonb Value # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGJsonb Value # | |
| QueryRunnerColumnDefault PGJsonb String # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGJsonb String # | |
| 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) # | |
Instances
| IsSqlType PGJson # | |
Defined in Opaleye.PGTypes | |
| PGIsJson SqlJson # | |
Defined in Opaleye.Operators | |
| QueryRunnerColumnDefault PGJson Value # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGJson Value # | |
| QueryRunnerColumnDefault PGJson String # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGJson String # | |
| 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) # | |
Instances
| IsSqlType PGBytea # | |
Defined in Opaleye.PGTypes | |
| QueryRunnerColumnDefault PGBytea ByteString # | |
Defined in Opaleye.Internal.RunQuery | |
| QueryRunnerColumnDefault PGBytea ByteString # | |
Defined in Opaleye.Internal.RunQuery | |
| Default Constant ByteString (Column SqlBytea) # | |
Defined in Opaleye.Constant | |
| Default Constant ByteString (Column SqlBytea) # | |
Defined in Opaleye.Constant | |
| type Map Nulled (Column PGBytea) # | |
Instances
| (Default Constant a (Column b), IsSqlType b) => Default Constant [a] (Column (SqlArray b)) # | |
| IsSqlType a => IsSqlType (PGArray a) # | |
Defined in Opaleye.PGTypes | |
| (Typeable b, QueryRunnerColumnDefault a b) => QueryRunnerColumnDefault (PGArray a) [b] # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn (PGArray a) [b] # | |
Instances
| PGString PGCitext # | |
Defined in Opaleye.PGTypes | |
| IsSqlType PGCitext # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlCitext # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGCitext (CI Text) # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGCitext (CI Text) # | |
| QueryRunnerColumnDefault PGCitext (CI Text) # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGCitext (CI Text) # | |
| Default Constant (CI Text) (Column SqlCitext) # | |
| Default Constant (CI Text) (Column SqlCitext) # | |
| type Map Nulled (Column PGCitext) # | |
data PGTimestamptz #
Instances
| IsRangeType PGTimestamptz # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGTimestamptz -> String # | |
| IsSqlType PGTimestamptz # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlTimestamptz # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGTimestamptz UTCTime # | |
Defined in Opaleye.Internal.RunQuery | |
| QueryRunnerColumnDefault PGTimestamptz ZonedTime # | |
Defined in Opaleye.Internal.RunQuery | |
| 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) # | |
Defined in Opaleye.Internal.Join | |
data PGTimestamp #
Instances
| IsRangeType PGTimestamp # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGTimestamp -> String # | |
| IsSqlType PGTimestamp # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlTimestamp # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGTimestamp LocalTime # | |
Defined in Opaleye.Internal.RunQuery | |
| 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) # | |
Defined in Opaleye.Internal.Join | |
Instances
| PGString PGText # | |
Defined in Opaleye.PGTypes | |
| IsSqlType PGText # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlText # | |
Defined in Opaleye.Order | |
| PGJsonIndex SqlText # | |
Defined in Opaleye.Operators | |
| QueryRunnerColumnDefault PGText Text # | |
Defined in Opaleye.Internal.RunQuery Methods | |
| QueryRunnerColumnDefault PGText Text # | |
Defined in Opaleye.Internal.RunQuery Methods | |
| QueryRunnerColumnDefault PGText String # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGText String # | |
| Default Constant Text (Column SqlText) # | |
| Default Constant Text (Column SqlText) # | |
| Default Constant String (Column SqlText) # | |
| type Map Nulled (Column PGText) # | |
| type Map Nulled (Column PGText) # | |
Instances
| PGIntegral PGNumeric # | |
Defined in Opaleye.PGTypes | |
| IsRangeType PGNumeric # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGNumeric -> String # | |
| IsSqlType PGNumeric # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlNumeric # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGNumeric Scientific # | |
Defined in Opaleye.Internal.RunQuery | |
| Default Constant Scientific (Column SqlNumeric) # | |
Defined in Opaleye.Constant Methods def :: Constant Scientific (Column SqlNumeric) # | |
| Default Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # | |
Defined in Opaleye.Constant Methods def :: Constant (PGRange Scientific) (Column (SqlRange SqlNumeric)) # | |
Instances
| PGIntegral PGInt2 # | |
Defined in Opaleye.PGTypes | |
| IsSqlType PGInt2 # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlInt2 # | |
Defined in Opaleye.Order | |
Instances
| PGIntegral PGInt4 # | |
Defined in Opaleye.PGTypes | |
| PGNum PGInt4 # | |
Defined in Opaleye.PGTypes | |
| IsRangeType PGInt4 # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGInt4 -> String # | |
| IsSqlType PGInt4 # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlInt4 # | |
Defined in Opaleye.Order | |
| PGJsonIndex SqlInt4 # | |
Defined in Opaleye.Operators | |
| QueryRunnerColumnDefault PGInt4 Int # | |
Defined in Opaleye.Internal.RunQuery Methods | |
| QueryRunnerColumnDefault PGInt4 Int32 # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGInt4 Int32 # | |
| Default Constant Int (Column SqlInt4) # | |
| Default Constant Int32 (Column SqlInt4) # | |
| Default Constant (PGRange Int) (Column (SqlRange SqlInt4)) # | |
| type Map Nulled (Column PGInt4) # | |
Instances
| PGIntegral PGInt8 # | |
Defined in Opaleye.PGTypes | |
| PGNum PGInt8 # | |
Defined in Opaleye.PGTypes | |
| IsRangeType PGInt8 # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGInt8 -> String # | |
| IsSqlType PGInt8 # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlInt8 # | |
Defined in Opaleye.Order | |
| PGJsonIndex SqlInt8 # | |
Defined in Opaleye.Operators | |
| QueryRunnerColumnDefault PGInt8 Int64 # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGInt8 Int64 # | |
| Default Constant Int64 (Column SqlInt8) # | |
| Default Constant (PGRange Int64) (Column (SqlRange SqlInt8)) # | |
| type Map Nulled (Column PGInt8) # | |
Instances
| PGFractional PGFloat8 # | |
Defined in Opaleye.PGTypes Methods pgFromRational :: Rational -> Column PGFloat8 # sqlFromRational :: Rational -> Column PGFloat8 # | |
| PGNum PGFloat8 # | |
Defined in Opaleye.PGTypes | |
| IsSqlType PGFloat8 # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlFloat8 # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGFloat8 Double # | |
Defined in Opaleye.Internal.RunQuery Methods queryRunnerColumnDefault :: QueryRunnerColumn PGFloat8 Double # | |
| Default Constant Double (Column SqlFloat8) # | |
| type Map Nulled (Column PGFloat8) # | |
Instances
| IsSqlType PGFloat4 # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlFloat4 # | |
Defined in Opaleye.Order | |
Instances
| IsRangeType PGDate # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGDate -> String # | |
| IsSqlType PGDate # | |
Defined in Opaleye.PGTypes | |
| PGOrd SqlDate # | |
Defined in Opaleye.Order | |
| QueryRunnerColumnDefault PGDate Day # | |
Defined in Opaleye.Internal.RunQuery Methods | |
| Default Constant Day (Column SqlDate) # | |
| Default Constant (PGRange Day) (Column (SqlRange SqlDate)) # | |
| type Map Nulled (Column PGDate) # | |
class IsSqlType pgType => IsRangeType pgType where #
Methods
showRangeType :: proxy pgType -> String #
Instances
| IsRangeType PGTimestamptz # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGTimestamptz -> String # | |
| IsRangeType PGTimestamp # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGTimestamp -> String # | |
| IsRangeType PGNumeric # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGNumeric -> String # | |
| IsRangeType PGInt4 # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGInt4 -> String # | |
| IsRangeType PGInt8 # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGInt8 -> String # | |
| IsRangeType PGDate # | |
Defined in Opaleye.PGTypes Methods showRangeType :: proxy PGDate -> String # | |
class IsSqlType sqlType where #
Minimal complete definition
Nothing
Methods
showPGType :: proxy sqlType -> String #
Deprecated: Use showSqlType instead. showPGType will be removed in version 0.7.
showSqlType :: proxy sqlType -> String #
Instances
pgLazyByteString :: ByteString -> Column PGBytea #
pgStrictText :: Text -> Column PGText #
pgLazyText :: Text -> Column PGText #
pgNumeric :: Scientific -> Column PGNumeric #
pgUTCTime :: UTCTime -> Column PGTimestamptz #
pgLocalTime :: LocalTime -> Column PGTimestamp #
pgZonedTime :: ZonedTime -> Column PGTimestamptz #
pgTimeOfDay :: TimeOfDay -> Column PGTime #
pgStrictJSON :: ByteString -> Column PGJson #
pgLazyJSON :: ByteString -> Column PGJson #
pgValueJSON :: ToJSON a => a -> Column PGJson #
pgStrictJSONB :: ByteString -> Column PGJsonb #
pgLazyJSONB :: ByteString -> Column PGJsonb #
pgValueJSONB :: ToJSON a => a -> Column PGJsonb #
pgRange :: forall a b. IsRangeType b => (a -> Column b) -> RangeBound a -> RangeBound a -> Column (PGRange b) #
literalColumn :: Literal -> Column a #
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 #
Deprecated: unsafePgFormatTime has been moved to Opaleye.Internal.PGTypes and will be removed in version 0.7.