@@ -77,6 +77,11 @@ module Squeal.PostgreSQL.Expression
77 , currentTimestamp
77 , currentTimestamp
78 , localTime
78 , localTime
79 , localTimestamp
79 , localTimestamp
80 -- ** Aggregation
85 -- ** Aggregation
81 , unsafeAggregate
86 , unsafeAggregate
82 , unsafeAggregateDistinct
87 , unsafeAggregateDistinct
@@ -496,22 +501,6 @@ ceiling_
496 -> Expression tables grouping params ('Required (nullity frac))
501 -> Expression tables grouping params ('Required (nullity frac))
497ceiling_ = unsafeFunction "ceiling"
502ceiling_ = unsafeFunction "ceiling"
500− (Expression tables grouping params ('Required (nullity 'PGtext))) where
501− fromString str = UnsafeExpression $
502− "E\'" <> fromString (escape =<< str) <> "\'"
515type Condition tables grouping params =
504type Condition tables grouping params =
516 Expression tables grouping params ('Required ('NotNull 'PGbool))
505 Expression tables grouping params ('Required ('NotNull 'PGbool))
@@ -626,6 +615,52 @@ localTimestamp
626 :: Expression tables grouping params ('Required (nullity 'PGtimestamp))
615 :: Expression tables grouping params ('Required (nullity 'PGtimestamp))
627localTimestamp = UnsafeExpression "LOCALTIMESTAMP"
616localTimestamp = UnsafeExpression "LOCALTIMESTAMP"
618+{-----------------------------------------
620+-----------------------------------------}
623+ (Expression tables grouping params ('Required (nullity 'PGtext))) where
624+ fromString str = UnsafeExpression $
625+ "E\'" <> fromString (escape =<< str) <> "\'"
639+ (Expression tables grouping params ('Required (nullity 'PGtext))) where
640+ mempty = fromString ""
641+ mappend = unsafeBinaryOp "||"
644+ :: Expression tables grouping params ('Required (nullity 'PGtext))
645+ -> Expression tables grouping params ('Required (nullity 'PGtext))
646+lower = unsafeFunction "lower"
649+ :: Expression tables grouping params ('Required (nullity 'PGtext))
650+ -> Expression tables grouping params ('Required (nullity 'PGtext))
651+upper = unsafeFunction "upper"
654+ :: Expression tables grouping params ('Required (nullity 'PGtext))
655+ -> Expression tables grouping params ('Required (nullity 'PGint4))
656+charLength = unsafeFunction "char_length"
659+ :: Expression tables grouping params ('Required (nullity 'PGtext))
660+ -> Expression tables grouping params ('Required (nullity 'PGtext))
661+ -> Expression tables grouping params ('Required (nullity 'PGbool))
662+like = unsafeBinaryOp "LIKE"
629{-----------------------------------------
664{-----------------------------------------
630aggregation
665aggregation
631-----------------------------------------}
666-----------------------------------------}