@@ -587,7 +587,9 @@ caseWhenThenElse
587587 :: [ ( Condition relations grouping params
588588 , Expression relations grouping params (ty)
589589 ) ]
590+ -- ^ whens and thens
590591 -> Expression relations grouping params (ty)
592+ -- ^ else
591593 -> Expression relations grouping params (ty)
592594caseWhenThenElse whenThens else_ = UnsafeExpression $ mconcat
593595 [ "CASE"
@@ -611,8 +613,8 @@ caseWhenThenElse whenThens else_ = UnsafeExpression $ mconcat
611613-- "CASE WHEN TRUE THEN 1 ELSE 0 END"
612614ifThenElse
613615 :: Condition relations grouping params
614− -> Expression relations grouping params (ty)
615− -> Expression relations grouping params (ty)
616+ -> Expression relations grouping params (ty) -- ^ then
617+ -> Expression relations grouping params (ty) -- ^ else
616618 -> Expression relations grouping params (ty)
617619ifThenElse if_ then_ else_ = caseWhenThenElse [(if_,then_)] else_
618620
@@ -673,31 +675,31 @@ infix 4 .<=
673675(.>) = unsafeBinaryOp ">"
674676infix 4 .>
675677
676−-- | >>> renderExpression $ currentDate
678+-- | >>> renderExpression currentDate
677679-- "CURRENT_DATE"
678680currentDate
679681 :: Expression relations grouping params (nullity 'PGdate)
680682currentDate = UnsafeExpression "CURRENT_DATE"
681683
682−-- | >>> renderExpression $ currentTime
684+-- | >>> renderExpression currentTime
683685-- "CURRENT_TIME"
684686currentTime
685687 :: Expression relations grouping params (nullity 'PGtimetz)
686688currentTime = UnsafeExpression "CURRENT_TIME"
687689
688−-- | >>> renderExpression $ currentTimestamp
690+-- | >>> renderExpression currentTimestamp
689691-- "CURRENT_TIMESTAMP"
690692currentTimestamp
691693 :: Expression relations grouping params (nullity 'PGtimestamptz)
692694currentTimestamp = UnsafeExpression "CURRENT_TIMESTAMP"
693695
694−-- | >>> renderExpression $ localTime
696+-- | >>> renderExpression localTime
695697-- "LOCALTIME"
696698localTime
697699 :: Expression relations grouping params (nullity 'PGtime)
698700localTime = UnsafeExpression "LOCALTIME"
699701
700−-- | >>> renderExpression $ localTimestamp
702+-- | >>> renderExpression localTimestamp
701703-- "LOCALTIMESTAMP"
702704localTimestamp
703705 :: Expression relations grouping params (nullity 'PGtimestamp)
@@ -793,7 +795,7 @@ unsafeAggregateDistinct fun x = UnsafeExpression $ mconcat
793795-- let
794796-- expression :: Expression '[tab ::: '["col" ::: nullity 'PGnumeric]] ('Grouped bys) params (nullity 'PGnumeric)
795797-- expression = sum_ #col
796−-- in renderExpression expression
798+-- in renderExpression $ sum_ #col
797799-- :}
798800-- "sum(col)"
799801sum_