relational-query 0.0.1.4 → 0.0.1.5
raw patch · 2 files changed
+10/−4 lines, 2 files
Files
relational-query.cabal view
@@ -1,5 +1,5 @@ name: relational-query-version: 0.0.1.4+version: 0.0.1.5 synopsis: Typeful, Modular, Relational, algebraic query engine description: This package contiains typeful relation structure and relational-algebraic query building DSL which can
src/Database/Relational/Query/Projectable.hs view
@@ -46,8 +46,8 @@ caseSearch, caseSearchMaybe, case', caseMaybe, in', and', or', - isNothing, isJust,- fromMaybe', not', exists,+ isNothing, isJust, fromMaybe, fromMaybe',+ not', exists, (.||.), (?||?), (.+.), (.-.), (./.), (.*.), negate', fromIntegral', showNum,@@ -436,9 +436,15 @@ isJust = not' . isNothing -- | Operator from maybe type using record extended 'isNull'.+fromMaybe :: (SqlProjectable (Projection c), ProjectableShowSql (Projection c), HasColumnConstraint NotNull r)+ => Projection c r -> Projection c (Maybe r) -> Projection c r+fromMaybe d p = [ (isNothing p, d) ] `casesOrElse` unsafeCastProjectable p++-- | Deprecated. Operator from maybe type using record extended 'isNull'. fromMaybe' :: (SqlProjectable (Projection c), ProjectableShowSql (Projection c), HasColumnConstraint NotNull r) => Projection c r -> Projection c (Maybe r) -> Projection c r-fromMaybe' d p = [ (isNothing p, d) ] `casesOrElse` unsafeCastProjectable p+fromMaybe' = fromMaybe+{-# DEPRECATED fromMaybe' "Use fromMaybe instead of this." #-} unsafeUniTermFunction :: SqlProjectable p => Keyword -> p t unsafeUniTermFunction = unsafeProjectSql . (++ "()") . SQL.wordShow