on dev help sign in
trim trailing whitespaces
commit06a7c053e3c43285078859886eb1042f815bf4f7 authorEitan Chatav <eitan.chatav@gmail.com> dateSat 2 Jun 2018, 12:44 (8 years ago) parentd531baa
8 files changed+19−19
squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+2−2 squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+2−2 squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+2−2 squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−1 squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs+2−2 squeal-postgresql/src/Squeal/PostgreSQL/Pool.hs+1−1 squeal-postgresql/src/Squeal/PostgreSQL/Query.hs+5−5 squeal-postgresql/src/Squeal/PostgreSQL/Transaction.hs+4−4
squeal-postgresql/src/Squeal/PostgreSQL/Binary.hs+2−2
@@ -193,7 +193,7 @@ instance ToParam x ty => ToAliasedParam x (alias ::: ty) where
193193 Nothing -> K Nothing
194194 Just x -> K . Just . unK $ toParam @x @ty x
195195
196−-- | A `ToColumnParam` constraint lifts the `ToParam` encoding
196+-- | A `ToColumnParam` constraint lifts the `ToParam` encoding
197197-- of a `Type` to a `ColumnType`, encoding `Maybe`s to `Null`s. You should
198198-- not define instances of `ToColumnParam`, just use the provided instances.
199199class ToColumnParam (x :: Type) (ty :: NullityType) where
@@ -279,7 +279,7 @@ instance
279279 , HasDatatypeInfo y
280280 , LabelsWith y ~ labels
281281 ) => FromValue ('PGenum labels) y where
282− fromValue _ =
282+ fromValue _ =
283283 let
284284 greadConstructor
285285 :: All ((~) '[]) xss
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+2−2
@@ -338,7 +338,7 @@ primaryKey columns = UnsafeTableConstraintExpression $
338338-- >>> :{
339339-- let
340340-- setup :: Definition '[] Schema
341−-- setup =
341+-- setup =
342342-- createTable #users
343343-- ( serial `As` #id :*
344344-- (text & hasNotNull) `As` #name :* Nil )
@@ -372,7 +372,7 @@ primaryKey columns = UnsafeTableConstraintExpression $
372372-- >>> :{
373373-- let
374374-- setup :: Definition '[] Schema
375−-- setup =
375+-- setup =
376376-- createTable #employees
377377-- ( serial `As` #id :*
378378-- (text & hasNotNull) `As` #name :*
squeal-postgresql/src/Squeal/PostgreSQL/Expression.hs+2−2
@@ -27,7 +27,7 @@ Squeal expressions are the atoms used to build statements.
2727 , UndecidableInstances
2828#-}
2929
30−module Squeal.PostgreSQL.Expression
30+module Squeal.PostgreSQL.Expression
3131 ( -- * Expression
3232 Expression (UnsafeExpression, renderExpression)
3333 , HasParameter (param)
@@ -223,7 +223,7 @@ instance (Has relation relations columns, Has column columns ty)
223223 => IsQualified relation column
224224 (NP (Aliased (Expression relations 'Ungrouped params)) '[column ::: ty]) where
225225 relation ! column = relation ! column :* Nil
226−
226+
227227instance
228228 ( HasUnique relation relations columns
229229 , Has column columns ty
squeal-postgresql/src/Squeal/PostgreSQL/Manipulation.hs+1−1
@@ -144,7 +144,7 @@ let
144144 , "col2" ::: 'NoDef :=> 'NotNull 'PGint4
145145 ])
146146 ] '[] '[]
147− manipulation =
147+ manipulation =
148148 insertQuery_ #tab
149149 (selectStar (from (table (#other_tab `As` #t))))
150150in renderManipulation manipulation
squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs+2−2
@@ -166,7 +166,7 @@ instance Monad m => Functor (PQ schema0 schema1 m) where
166166 K x <- pq conn
167167 return $ K (f x)
168168
169−-- | Run a `PQ` and keep the result and the `Connection`.
169+-- | Run a `PQ` and keep the result and the `Connection`.
170170runPQ
171171 :: Functor m
172172 => PQ schema0 schema1 m x
@@ -176,7 +176,7 @@ runPQ (PQ pq) conn = (\ x -> (unK x, K (unK conn))) <$> pq conn
176176 -- K x <- pq conn
177177 -- return (x, K (unK conn))
178178
179−-- | Execute a `PQ` and discard the result but keep the `Connection`.
179+-- | Execute a `PQ` and discard the result but keep the `Connection`.
180180execPQ
181181 :: Functor m
182182 => PQ schema0 schema1 m x
squeal-postgresql/src/Squeal/PostgreSQL/Pool.hs+1−1
@@ -109,7 +109,7 @@ instance MonadBaseControl IO io => MonadPQ schema (PoolPQ schema io) where
109109 (_ :: K () schema) <- flip unPQ conn $
110110 traversePrepared_ manipulation params
111111 return ()
112− liftPQ m = PoolPQ $ \ pool ->
112+ liftPQ m = PoolPQ $ \ pool ->
113113 withResource pool $ \ conn -> do
114114 (K result :: K result schema) <- flip unPQ conn $
115115 liftPQ m
squeal-postgresql/src/Squeal/PostgreSQL/Query.hs+5−5
@@ -112,7 +112,7 @@ let
112112 '[]
113113 '[ "sum" ::: 'NotNull 'PGint4
114114 , "col1" ::: 'NotNull 'PGint4 ]
115− query =
115+ query =
116116 select
117117 ((#col1 + #col2) `As` #sum :* #col1 :* Nil)
118118 ( from (table (#tab `As` #t))
@@ -179,7 +179,7 @@ let
179179 query =
180180 select (sum_ #col2 `As` #sum :* #col1 `As` #col1 :* Nil)
181181 ( from (table (#tab `As` #table1))
182− & group (By #col1 :* Nil)
182+ & group (By #col1 :* Nil)
183183 & having (#col1 + sum_ #col2 .> 1) )
184184in renderQuery query
185185:}
@@ -281,7 +281,7 @@ newtype Query
281281 deriving (GHC.Generic,Show,Eq,Ord,NFData)
282282
283283-- | The results of two queries can be combined using the set operation
284−-- `union`. Duplicate rows are eliminated.
284+-- `union`. Duplicate rows are eliminated.
285285union
286286 :: Query schema params columns
287287 -> Query schema params columns
@@ -412,7 +412,7 @@ selectDotStar
412412selectDotStar rel relations = UnsafeQuery $
413413 "SELECT" <+> renderAlias rel <> ".*" <+> renderTableExpression relations
414414
415−-- | A `selectDistinctDotStar` asks for all the columns of a particular table,
415+-- | A `selectDistinctDotStar` asks for all the columns of a particular table,
416416-- and eliminates duplicate rows.
417417selectDistinctDotStar
418418 :: Has relation relations columns
@@ -555,7 +555,7 @@ where_ wh rels = rels {whereClause = wh : whereClause rels}
555555group
556556 :: SListI bys
557557 => NP (By relations) bys -- ^ grouped columns
558− -> TableExpression schema params relations 'Ungrouped
558+ -> TableExpression schema params relations 'Ungrouped
559559 -> TableExpression schema params relations ('Grouped bys)
560560group bys rels = TableExpression
561561 { fromClause = fromClause rels
squeal-postgresql/src/Squeal/PostgreSQL/Transaction.hs+4−4
@@ -158,22 +158,22 @@ data IsolationLevel
158158 = Serializable
159159 -- ^ Dirty read is not possible.
160160 -- Nonrepeatable read is not possible.
161− -- Phantom read is not possible.
161+ -- Phantom read is not possible.
162162 -- Serialization anomaly is not possible.
163163 | RepeatableRead
164164 -- ^ Dirty read is not possible.
165165 -- Nonrepeatable read is not possible.
166− -- Phantom read is not possible.
166+ -- Phantom read is not possible.
167167 -- Serialization anomaly is possible.
168168 | ReadCommitted
169169 -- ^ Dirty read is not possible.
170170 -- Nonrepeatable read is possible.
171− -- Phantom read is possible.
171+ -- Phantom read is possible.
172172 -- Serialization anomaly is possible.
173173 | ReadUncommitted
174174 -- ^ Dirty read is not possible.
175175 -- Nonrepeatable read is possible.
176− -- Phantom read is possible.
176+ -- Phantom read is possible.
177177 -- Serialization anomaly is possible.
178178 deriving (Show, Eq)
179179