HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Moduleopaleye-0.10.8.0Haskell2010

Opaleye.SqlTypes

SQL types and functions to create Field_s of those types. To create fields you may find it more convenient to use Opaleye.ToFields instead.

  • 22 types
  • 6 classes
  • 34 values
  • Packageopaleye-0.10.8.0
  • Exports62
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSqlTypes.hs

Numeric

0 declarations

Creating values

Types

datadata SqlInt4
#
Instances12SqlIntegral, SqlNum, IsSqlType, IsRangeType, SqlJsonIndex, SqlOrd, …
datadata SqlFloat8
#
Instances7SqlFractional, SqlNum, IsSqlType, SqlOrd, DefaultFromField, Default, …
datadata SqlNumeric
#
Instances9SqlIntegral, SqlNum, IsSqlType, IsRangeType, SqlOrd, DefaultFromField, …
datadata SqlInt8
#
Instances10SqlIntegral, SqlNum, IsSqlType, IsRangeType, SqlJsonIndex, SqlOrd, …
datadata SqlInt2
#
Instances7SqlIntegral, SqlNum, IsSqlType, SqlOrd, DefaultFromField, Default, …

Type classes

classclass SqlNum a where
#
Instances5SqlNum
  • SqlNum SqlFloat8Defined in opaleye-0.10.8.0 · Opaleye.Internal.PGTypesExternal
  • SqlNum SqlInt2Defined in opaleye-0.10.8.0 · Opaleye.Internal.PGTypesExternal
  • SqlNum SqlInt4Defined in opaleye-0.10.8.0 · Opaleye.Internal.PGTypesExternal
  • SqlNum SqlInt8Defined in opaleye-0.10.8.0 · Opaleye.Internal.PGTypesExternal
  • SqlNum SqlNumericDefined in opaleye-0.10.8.0 · Opaleye.Internal.PGTypesExternal
classclass SqlIntegral a
#

A dummy typeclass whose instances support integral operations.

Instances4SqlIntegral

Date and time

0 declarations

Creating values

Types

datadata SqlDate
#
Instances8IsSqlType, IsRangeType, SqlOrd, DefaultFromField, IntervalNum, Default, …
datadata SqlTime
#
Instances6IsSqlType, SqlOrd, DefaultFromField, IntervalNum, Default
datadata SqlTimestamp
#
Instances9IsSqlType, IsRangeType, SqlOrd, DefaultFromField, IntervalNum, Default, …
datadata SqlTimestamptz
#

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.

Instances9IsSqlType, IsRangeType, SqlOrd, DefaultFromField, IntervalNum, Default, …
datadata SqlInterval
#

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;.

Instances5IsSqlType, DefaultFromField, IntervalNum, Default

JSON

0 declarations

Creating values

Types

datadata SqlJson
#
Instances13IsSqlType, SqlIsJson, DefaultFromField, Default, …

JSONB

0 declarations

Creating values

Types

datadata SqlJsonb
#
Instances13IsSqlType, SqlIsJson, DefaultFromField, Default, …

Text

0 declarations

Creating values

Types

datadata SqlText
#
Instances11SqlString, IsSqlType, SqlJsonIndex, SqlOrd, DefaultFromField, Default, …
datadata SqlVarcharN
#

VARCHAR(n) for any n. Opaleye does not do anything to check that the n you choose is correctly adhered to!

Instances10SqlString, IsSqlType, SqlOrd, DefaultFromField, Default, …
datadata SqlCitext
#
Instances8SqlString, IsSqlType, SqlOrd, DefaultFromField, Default, …

Type classes

Array

0 declarations

Creating values

Types

datadata SqlArray_ (n :: Nullability) a
#
Instances6Default, IsSqlType, DefaultFromField

Range

0 declarations

Creating values

Types

datadata SqlRange a
#
Instances8Default, IsSqlType, DefaultFromField, …
classclass IsSqlType pgType => IsRangeType pgType where
#
Instances6IsRangeType

Other

0 declarations

Creating values

Types

datadata SqlBool
#
Instances5IsSqlType, SqlOrd, DefaultFromField, Default
datadata SqlUuid
#
Instances5IsSqlType, SqlOrd, DefaultFromField, Default
datadata SqlBytea
#
Instances6IsSqlType, DefaultFromField, Default

IsSqlType

2 declarations
classclass IsSqlType sqlType where
#

Methods

Instances21IsSqlType, …