Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- newtype Column pgType = Column PrimExpr
- data Nullable a = Nullable
- unColumn :: Column a -> PrimExpr
- unsafeCoerce :: Column a -> Column b
- unsafeCoerceColumn :: Column a -> Column b
- unsafeCast :: String -> Column a -> Column b
- unsafeCompositeField :: Column a -> String -> Column b
- binOp :: BinOp -> Column a -> Column b -> Column c
- unOp :: UnOp -> Column a -> Column b
- unsafeCase_ :: [(Column pgBool, Column a)] -> Column a -> Column a
- unsafeIfThenElse :: Column pgBool -> Column a -> Column a -> Column a
- unsafeGt :: Column a -> Column a -> Column pgBool
- unsafeEq :: Column a -> Column a -> Column pgBool
- class PGNum a where
- class PGFractional a where
- class PGIntegral a
- class PGString a where
Documentation
newtype Column pgType Source #
A column of a Query
, of type pgType
. For example Column
PGInt4
is an int4
column and a Column
PGText
is a text
column.
Only used within a Column
, to indicate that it can be NULL
.
For example, a Column
(Nullable
PGText
) can be NULL
but a
Column
PGText
cannot.
Default Constant haskell (Column sql) => Default Constant (Maybe haskell) (Column (Nullable sql)) # | |
Default NullMaker (Column a) (Column (Nullable a)) # | |
Default NullMaker (Column (Nullable a)) (Column (Nullable a)) # | |
IsSqlType a => IsSqlType (Nullable a) Source # | |
PGOrd a => PGOrd (Nullable a) Source # | |
QueryRunnerColumnDefault a b => QueryRunnerColumnDefault (Nullable a) (Maybe b) Source # | |
unsafeCoerce :: Column a -> Column b Source #
Deprecated: Will be removed in version 0.6. Use unsafeCoerceColumn instead.
unsafeCoerceColumn :: Column a -> Column 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 -> Column a -> Column 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.
pgFromInteger :: Integer -> Column a Source #
class PGFractional a where Source #
pgFromRational :: Rational -> Column a Source #
class PGIntegral a Source #
A dummy typeclass whose instances support integral operations.