opaleye-sqlite-0.0.0.1: An SQL-generating DSL targeting SQLite

Safe HaskellNone
LanguageHaskell98

Opaleye.SQLite.Column

Synopsis

Documentation

null :: Column (Nullable a) Source

A NULL of any type

matchNullable :: Column b -> (Column a -> Column b) -> Column (Nullable a) -> Column b Source

If the Column (Nullable a) is NULL then return the Column b otherwise map the underlying Column a using the provided function.

The Opaleye equivalent of the maybe function.

fromNullable :: Column a -> Column (Nullable a) -> Column a Source

If the Column (Nullable a) is NULL then return the provided Column a otherwise return the underlying Column a.

The Opaleye equivalent of the fromMaybe function

toNullable :: Column a -> Column (Nullable a) Source

The Opaleye equivalent of Just

maybeToNullable :: Maybe (Column a) -> Column (Nullable a) Source

If the argument is Nothing return NULL otherwise return the provided value coerced to a nullable type.

unsafeCast :: String -> Column a -> Column b Source

Cast a column to any other type. This is safe for some conversions such as uuid to text.

data Column a Source

The Num and Fractional instances for Column a are too general. For example, they allow you to add two Column Strings. This will be fixed in a subsequent release.

unsafeCoerce :: Column a -> Column b Source

Deprecated: Use unsafeCoerceColumn instead