@@ -215,6 +215,24 @@ instance
215 ceiling = fromIntegerB . unsafeFunction "ceiling"
215 ceiling = fromIntegerB . unsafeFunction "ceiling"
216 floor = fromIntegerB . unsafeFunction "floor"
216 floor = fromIntegerB . unsafeFunction "floor"
219+ ( IntegerOf (Expression params tables ('Required ('NotNull ty)))
220+ ~ (Expression params tables ('Required ('NotNull 'PGInt8)))
224+ , PGCast 'PGNumeric ty
227+ => RealFloatB (Expression params tables ('Required ('NotNull ty))) where
228+ isNaN x = x ==* UnsafeExpression "\'NaN\'"
229+ isInfinite x = x ==* UnsafeExpression "\'Infinity\'"
230+ ||* x ==* UnsafeExpression "\'-Infinity\'"
231+ isNegativeZero x = x ==* UnsafeExpression "-0"
233+ atan2 y x = UnsafeExpression $
234+ "atan2(" <> renderExpression y <> ", " <> renderExpression x <> ")"
218instance IsString (Expression params tables ('Required (nullity 'PGText))) where
236instance IsString (Expression params tables ('Required (nullity 'PGText))) where
219 fromString str = UnsafeExpression $
237 fromString str = UnsafeExpression $
220 "E\'" <> fromString (escape =<< str) <> "\'"
238 "E\'" <> fromString (escape =<< str) <> "\'"