Safe Haskell | None |
---|---|
Language | Haskell2010 |
Opaleye.Internal.PGTypesExternal
Synopsis
- type PGArray = SqlArray
- type PGRange = SqlRange
- data SqlBool
- data SqlInt4
- data SqlFloat8
- data SqlNumeric
- data SqlInt8
- data SqlInt2
- data SqlFloat4
- data SqlDate
- data SqlTime
- data SqlTimestamp
- data SqlTimestamptz
- data SqlInterval
- data SqlJson
- data SqlJsonb
- data SqlText
- data SqlVarcharN
- data SqlCitext
- type SqlArray = SqlArray_ 'NonNullable
- data SqlArray_ (n :: Nullability) a
- data SqlRange a
- data SqlUuid
- data SqlBytea
- class IsSqlType pgType => IsRangeType pgType where
- showRangeType :: proxy pgType -> String
- sqlInterval :: CalendarDiffTime -> Field PGInterval
- sqlStringVarcharN :: String -> Field SqlVarcharN
- sqlStrictTextVarcharN :: Text -> Field SqlVarcharN
- sqlLazyTextVarcharN :: Text -> Field SqlVarcharN
- pgBool :: Bool -> Field PGBool
- pgDouble :: Double -> Field PGFloat8
- pgInt4 :: Int -> Field PGInt4
- pgInt8 :: Int64 -> Field PGInt8
- pgNumeric :: Scientific -> Field PGNumeric
- pgString :: String -> Field PGText
- pgCiLazyText :: CI Text -> Field PGCitext
- type PGText = SqlText
- pgLazyByteString :: ByteString -> Field PGBytea
- type PGBytea = SqlBytea
- pgStrictByteString :: ByteString -> Field PGBytea
- pgStrictText :: Text -> Field PGText
- pgLazyText :: Text -> Field PGText
- type PGNumeric = SqlNumeric
- type PGInt4 = SqlInt4
- type PGInt8 = SqlInt8
- type PGFloat8 = SqlFloat8
- type PGBool = SqlBool
- pgUUID :: UUID -> Field PGUuid
- type PGUuid = SqlUuid
- pgDay :: Day -> Field PGDate
- type PGDate = SqlDate
- pgUTCTime :: UTCTime -> Field PGTimestamptz
- type PGTimestamptz = SqlTimestamptz
- pgLocalTime :: LocalTime -> Field PGTimestamp
- type PGTimestamp = SqlTimestamp
- pgZonedTime :: ZonedTime -> Field PGTimestamptz
- pgTimeOfDay :: TimeOfDay -> Field PGTime
- type PGTime = SqlTime
- type PGInterval = SqlInterval
- pgCiStrictText :: CI Text -> Field PGCitext
- type PGCitext = SqlCitext
- pgJSON :: String -> Field PGJson
- type PGJson = SqlJson
- pgStrictJSON :: ByteString -> Field PGJson
- pgLazyJSON :: ByteString -> Field PGJson
- pgValueJSON :: ToJSON a => a -> Field PGJson
- pgJSONB :: String -> Field PGJsonb
- type PGJsonb = SqlJsonb
- pgStrictJSONB :: ByteString -> Field PGJsonb
- pgLazyJSONB :: ByteString -> Field PGJsonb
- pgValueJSONB :: ToJSON a => a -> Field PGJsonb
- pgArray :: forall a b (n :: Nullability). IsSqlType b => (a -> Field_ n b) -> [a] -> Field (SqlArray_ n b)
- pgRange :: forall a b (n :: Nullability) (n' :: Nullability). IsRangeType b => (a -> Field_ n b) -> RangeBound a -> RangeBound a -> Field_ n' (SqlRange b)
- type PGFloat4 = SqlFloat4
- type PGInt2 = SqlInt2
- class IsSqlType sqlType where
- showSqlType :: proxy sqlType -> String
Documentation
Instances
IsSqlType SqlBool Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlBool -> String Source # | |
SqlOrd SqlBool Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlBool Bool Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields Bool (Field SqlBool) Source # | |
bool ~ Bool => Default (Inferrable FromField) SqlBool bool Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlBool bool # |
Instances
SqlIntegral SqlInt4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
SqlNum SqlInt4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlInt4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlInt4 -> String Source # | |
IsRangeType SqlInt4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlInt4 -> String Source # | |
SqlJsonIndex SqlInt4 Source # | |
Defined in Opaleye.Operators | |
SqlOrd SqlInt4 Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlInt4 Int32 Source # | |
Defined in Opaleye.Internal.RunQuery | |
DefaultFromField SqlInt4 Int Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields Int32 (Field SqlInt4) Source # | |
Default ToFields Int (Field SqlInt4) Source # | |
Default ToFields (PGRange Int) (Field (SqlRange SqlInt4)) Source # | |
int ~ Int => Default (Inferrable FromField) SqlInt4 int Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlInt4 int # |
Instances
SqlFractional SqlFloat8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
SqlNum SqlFloat8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlFloat8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlFloat8 -> String Source # | |
SqlOrd SqlFloat8 Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlFloat8 Double Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields Double (Field SqlFloat8) Source # | |
double ~ Double => Default (Inferrable FromField) SqlFloat8 double Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlFloat8 double # |
data SqlNumeric Source #
Instances
Instances
SqlIntegral SqlInt8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
SqlNum SqlInt8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlInt8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlInt8 -> String Source # | |
IsRangeType SqlInt8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlInt8 -> String Source # | |
SqlJsonIndex SqlInt8 Source # | |
Defined in Opaleye.Operators | |
SqlOrd SqlInt8 Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlInt8 Int64 Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields Int64 (Field SqlInt8) Source # | |
Default ToFields (PGRange Int64) (Field (SqlRange SqlInt8)) Source # | |
int64 ~ Int64 => Default (Inferrable FromField) SqlInt8 int64 Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlInt8 int64 # |
Instances
SqlIntegral SqlInt2 Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlInt2 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlInt2 -> String Source # | |
SqlOrd SqlInt2 Source # | |
Defined in Opaleye.Order |
Instances
IsSqlType SqlFloat4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlFloat4 -> String Source # | |
SqlOrd SqlFloat4 Source # | |
Defined in Opaleye.Order |
Instances
IsSqlType SqlDate Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlDate -> String Source # | |
IsRangeType SqlDate Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlDate -> String Source # | |
SqlOrd SqlDate Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlDate Day Source # | |
Defined in Opaleye.Internal.RunQuery | |
IntervalNum SqlDate SqlTimestamp Source # | |
Defined in Opaleye.Operators | |
Default ToFields Day (Field SqlDate) Source # | |
Default ToFields (PGRange Day) (Field (SqlRange SqlDate)) Source # | |
day ~ Day => Default (Inferrable FromField) SqlDate day Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlDate day # |
Instances
IsSqlType SqlTime Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlTime -> String Source # | |
SqlOrd SqlTime Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlTime TimeOfDay Source # | |
Defined in Opaleye.Internal.RunQuery | |
IntervalNum SqlTime SqlTime Source # | |
Defined in Opaleye.Operators | |
Default ToFields TimeOfDay (Field SqlTime) Source # | |
timeofday ~ TimeOfDay => Default (Inferrable FromField) SqlTime timeofday Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlTime timeofday # |
data SqlTimestamp Source #
Instances
data SqlTimestamptz Source #
Be careful if you use Haskell's ZonedTime
with
SqlTimestamptz
. A Postgres timestamptz
does not actually
contain any time zone. It is just a UTC time that is automatically
converted to or from local time on certain occasions, according to
the timezone setting of the
server.
Therefore, although when you roundtrip an input ZonedTime
to
obtain an output ZonedTime
they each refer to the same
instant in time, the time zone attached to the output will not
necessarily the same as the time zone attached to the input.
Instances
data SqlInterval Source #
Requires you to configure intervalstyle
as iso_8601
.
You can configure intervalstyle
on every connection with a SET
command,
but for better performance you may want to configure it permanently in the
file found with SHOW config_file;
.
Instances
IsSqlType SqlInterval Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlInterval -> String Source # | |
DefaultFromField SqlInterval CalendarDiffTime Source # | |
Defined in Opaleye.Internal.RunQuery Methods defaultFromField :: FromField SqlInterval CalendarDiffTime Source # | |
IntervalNum SqlInterval SqlInterval Source # | |
Defined in Opaleye.Operators | |
Default ToFields CalendarDiffTime (Field SqlInterval) Source # | |
Defined in Opaleye.Internal.Constant Methods | |
calendardifftime ~ CalendarDiffTime => Default (Inferrable FromField) SqlInterval calendardifftime Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlInterval calendardifftime # |
Instances
Instances
Instances
SqlString SqlText Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlText Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlText -> String Source # | |
SqlJsonIndex SqlText Source # | |
Defined in Opaleye.Operators | |
SqlOrd SqlText Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlText Text Source # | |
Defined in Opaleye.Internal.RunQuery | |
DefaultFromField SqlText Text Source # | |
Defined in Opaleye.Internal.RunQuery | |
DefaultFromField SqlText String Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields Text (Field SqlText) Source # | |
Default ToFields Text (Field SqlText) Source # | |
Default ToFields String (Field SqlText) Source # | |
text ~ Text => Default (Inferrable FromField) SqlText text Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlText text # |
data SqlVarcharN Source #
VARCHAR(n)
for any n
. Opaleye does not do anything to check
that the n
you choose is correctly adhered to!
Instances
Instances
SqlString SqlCitext Source # | |
Defined in Opaleye.Internal.PGTypesExternal | |
IsSqlType SqlCitext Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlCitext -> String Source # | |
SqlOrd SqlCitext Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlCitext (CI Text) Source # | |
Defined in Opaleye.Internal.RunQuery | |
DefaultFromField SqlCitext (CI Text) Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields (CI Text) (Field SqlCitext) Source # | |
Default ToFields (CI Text) (Field SqlCitext) Source # | |
cttext ~ CI Text => Default (Inferrable FromField) SqlCitext cttext Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlCitext cttext # |
type SqlArray = SqlArray_ 'NonNullable Source #
data SqlArray_ (n :: Nullability) a Source #
Instances
(Default ToFields a (Field_ n b), IsSqlType b) => Default ToFields [a] (Field (SqlArray_ n b)) Source # | |
(Typeable h, Default (Inferrable FromField) f h, hs ~ [h]) => Default (Inferrable FromField) (SqlArray f) hs Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField (SqlArray f) hs # | |
(Typeable h, Default (Inferrable FromField) f h, hs ~ [Maybe h]) => Default (Inferrable FromField) (SqlArray_ 'Nullable f) hs Source # | |
Defined in Opaleye.Internal.Inferrable | |
IsSqlType a => IsSqlType (SqlArray_ n a) Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy (SqlArray_ n a) -> String Source # | |
(Typeable b, DefaultFromField a b) => DefaultFromField (SqlArray_ 'NonNullable a) [b] Source # | |
Defined in Opaleye.Internal.RunQuery Methods defaultFromField :: FromField (SqlArray_ 'NonNullable a) [b] Source # | |
(Typeable b, DefaultFromField a b) => DefaultFromField (SqlArray_ 'Nullable a) [Maybe b] Source # | |
Defined in Opaleye.Internal.RunQuery |
Instances
Default ToFields (PGRange Int64) (Field (SqlRange SqlInt8)) Source # | |
Default ToFields (PGRange Scientific) (Field (SqlRange SqlNumeric)) Source # | |
Defined in Opaleye.Internal.Constant Methods def :: ToFields (PGRange Scientific) (Field (SqlRange SqlNumeric)) # | |
Default ToFields (PGRange Day) (Field (SqlRange SqlDate)) Source # | |
Default ToFields (PGRange UTCTime) (Field (SqlRange SqlTimestamptz)) Source # | |
Defined in Opaleye.Internal.Constant | |
Default ToFields (PGRange LocalTime) (Field (SqlRange SqlTimestamp)) Source # | |
Defined in Opaleye.Internal.Constant | |
Default ToFields (PGRange Int) (Field (SqlRange SqlInt4)) Source # | |
IsRangeType a => IsSqlType (SqlRange a) Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy (SqlRange a) -> String Source # | |
(Typeable b, DefaultFromField a b) => DefaultFromField (SqlRange a) (PGRange b) Source # | |
Defined in Opaleye.Internal.RunQuery |
Instances
IsSqlType SqlUuid Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlUuid -> String Source # | |
SqlOrd SqlUuid Source # | |
Defined in Opaleye.Order | |
DefaultFromField SqlUuid UUID Source # | |
Defined in Opaleye.Internal.RunQuery | |
Default ToFields UUID (Field SqlUuid) Source # | |
uuid ~ UUID => Default (Inferrable FromField) SqlUuid uuid Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlUuid uuid # |
Instances
IsSqlType SqlBytea Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showSqlType :: proxy SqlBytea -> String Source # | |
DefaultFromField SqlBytea ByteString Source # | |
Defined in Opaleye.Internal.RunQuery Methods | |
DefaultFromField SqlBytea ByteString Source # | |
Defined in Opaleye.Internal.RunQuery Methods | |
Default ToFields ByteString (Field SqlBytea) Source # | |
Defined in Opaleye.Internal.Constant | |
Default ToFields ByteString (Field SqlBytea) Source # | |
Defined in Opaleye.Internal.Constant | |
bytestring ~ ByteString => Default (Inferrable FromField) SqlBytea bytestring Source # | |
Defined in Opaleye.Internal.Inferrable Methods def :: Inferrable FromField SqlBytea bytestring # |
class IsSqlType pgType => IsRangeType pgType where Source #
Methods
showRangeType :: proxy pgType -> String Source #
Instances
IsRangeType SqlDate Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlDate -> String Source # | |
IsRangeType SqlInt4 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlInt4 -> String Source # | |
IsRangeType SqlInt8 Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlInt8 -> String Source # | |
IsRangeType SqlNumeric Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlNumeric -> String Source # | |
IsRangeType SqlTimestamp Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlTimestamp -> String Source # | |
IsRangeType SqlTimestamptz Source # | |
Defined in Opaleye.Internal.PGTypesExternal Methods showRangeType :: proxy SqlTimestamptz -> String Source # |
type PGNumeric = SqlNumeric Source #
type PGTimestamptz = SqlTimestamptz Source #
pgLocalTime :: LocalTime -> Field PGTimestamp Source #
type PGTimestamp = SqlTimestamp Source #
type PGInterval = SqlInterval Source #
pgStrictJSON :: ByteString -> Field PGJson Source #
pgLazyJSON :: ByteString -> Field PGJson Source #
pgStrictJSONB :: ByteString -> Field PGJsonb Source #
pgLazyJSONB :: ByteString -> Field PGJsonb Source #
pgArray :: forall a b (n :: Nullability). IsSqlType b => (a -> Field_ n b) -> [a] -> Field (SqlArray_ n b) Source #
pgRange :: forall a b (n :: Nullability) (n' :: Nullability). IsRangeType b => (a -> Field_ n b) -> RangeBound a -> RangeBound a -> Field_ n' (SqlRange b) Source #
class IsSqlType sqlType where Source #
Methods
showSqlType :: proxy sqlType -> String Source #