opaleye-0.9.5.1: An SQL-generating DSL targeting PostgreSQL
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Synopsis

Documentation

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 

data Nullable a Source #

Only used within a Field_, to indicate that it can be NULL. For example, a Field_ (Nullability SqlText) can be NULL but a Field_ SqlText cannot.

unsafeCoerceColumn :: Field_ n a -> Field_ n' b Source #

Treat a Field_ 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.