on master help sign in
Document unsafeLiteral
commit7f5801f0512f92a70ccb0b27817bdf11ea1e3c3b authorOllie Charles <ollie@ocharles.org.uk> dateFri 18 Jun 2021, 10:44 (5 years ago) parent01b569f
1 file changed+5
src/Rel8/Expr/Opaleye.hs+5
src/Rel8/Expr/Opaleye.hs+5
@@ -48,6 +48,11 @@ sunsafeCastExpr TypeInformation {typeName} =
4848 fromPrimExpr . Opaleye.CastExpr typeName . toPrimExpr
4949
5050
51+-- | Unsafely construct an expression from literal SQL.
52+--
53+-- This is an escape hatch, and can be used if Rel8 can not adequately express
54+-- the query you need. If you find yourself using this function, please let us
55+-- know, as it may indicate that something is missing from Rel8!
5156unsafeLiteral :: String -> Expr a
5257unsafeLiteral = Expr . Opaleye.ConstExpr . Opaleye.OtherLit
5358