Safe Haskell | None |
---|---|
Language | Haskell2010 |
Opaleye
Description
An SQL-generating DSL targeting PostgreSQL. Allows Postgres queries to be written within Haskell in a typesafe and composable fashion.
You might like to look at
- Basic tutorial
- Manipulation tutorial
- Advanced tutorial
- If you are confused about the
Default
typeclass, then the Default explanation
Synopsis
- module Opaleye.Adaptors
- module Opaleye.Aggregate
- module Opaleye.Binary
- type family Column a where ...
- data Nullable a
- unsafeCoerceColumn :: Field_ n a -> Field_ n' b
- unsafeCast :: String -> Field_ n' a -> Field_ n' b
- unsafeCompositeField :: Field_ n a -> String -> Field_ n' b
- joinNullable :: Column (Nullable (Nullable a)) -> Column (Nullable a)
- module Opaleye.Distinct
- module Opaleye.Field
- module Opaleye.FunctionalJoin
- module Opaleye.Join
- module Opaleye.Label
- module Opaleye.Lateral
- module Opaleye.Manipulation
- module Opaleye.MaybeFields
- module Opaleye.Operators
- module Opaleye.Order
- module Opaleye.RunSelect
- module Opaleye.Sql
- module Opaleye.Select
- module Opaleye.SqlTypes
- module Opaleye.Table
- module Opaleye.ToFields
- module Opaleye.Values
Documentation
module Opaleye.Adaptors
module Opaleye.Aggregate
module Opaleye.Binary
type family Column a where ... Source #
Do not use. Use Field
instead. Will be removed in a later
version.
Equations
Column (Nullable a) = FieldNullable a | |
Column a = Field a |
unsafeCoerceColumn :: Field_ n a -> Field_ n' b Source #
Treat a Column
as though it were of a different type. If such
a treatment is not valid then Postgres may fail with an error at
SQL run time.
unsafeCast :: String -> Field_ n' a -> Field_ n' b Source #
Cast a column to any other type. Implements Postgres's ::
or
CAST( ... AS ... )
operations. This is safe for some
conversions, such as uuid to text.
module Opaleye.Distinct
module Opaleye.Field
module Opaleye.FunctionalJoin
module Opaleye.Join
module Opaleye.Label
module Opaleye.Lateral
module Opaleye.Manipulation
module Opaleye.MaybeFields
module Opaleye.Operators
module Opaleye.Order
module Opaleye.RunSelect
module Opaleye.Sql
module Opaleye.Select
module Opaleye.SqlTypes
module Opaleye.Table
module Opaleye.ToFields
module Opaleye.Values