on master help sign in
Document unsafeLiteral
7f5801fOllie Charles
src/Rel8/Expr/Opaleye.hs+5
@@ -48,6 +48,11 @@ sunsafeCastExpr TypeInformation {typeName} =
48 fromPrimExpr . Opaleye.CastExpr typeName . toPrimExpr
48 fromPrimExpr . Opaleye.CastExpr typeName . toPrimExpr
49
49
50
50
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!
51unsafeLiteral :: String -> Expr a
56unsafeLiteral :: String -> Expr a
52unsafeLiteral = Expr . Opaleye.ConstExpr . Opaleye.OtherLit
57unsafeLiteral = Expr . Opaleye.ConstExpr . Opaleye.OtherLit
53
58