quibble-core 0.0.0.1 → 0.1.0.1
raw patch · 2 files changed
+7/−7 lines, 2 filesdep ~bytestringdep ~containersdep ~hedgehogPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: bytestring, containers, hedgehog, tasty, tasty-hedgehog, text, time
API changes (from Hackage documentation)
- Database.Quibble: sortBy :: Seq (SortExpr ctx) -> Query ctx -> Query ctx
+ Database.Quibble: orderBy :: Seq (SortExpr ctx) -> Query ctx -> Query ctx
Files
- quibble-core.cabal +1/−1
- src/lib/Database/Quibble.hs +6/−6
quibble-core.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: quibble-core-version: 0.0.0.1+version: 0.1.0.1 synopsis: Convenient SQL query language for Haskell (but only for single tables) description: Provides a way to construct conditions suitable for appending to queries in a type-safe way. category: Database
src/lib/Database/Quibble.hs view
@@ -20,7 +20,7 @@ , HasTable, HasColumn , Inline(..) , query, rowsOf- , where_, sortBy, limit, offset+ , where_, orderBy, limit, offset , asc, desc , (.&&), (.||), (.==), (./=), true, false , isNull, isNotNull@@ -98,7 +98,7 @@ Just cond -> "\nWHERE " <> unExpr cond , if Seq.null (qrySort qry) then mempty- else "\nSORT BY " <> fold (Seq.intersperse ", " $ fmap sqlSortExpr $ qrySort qry)+ else "\nORDER BY " <> fold (Seq.intersperse ", " $ fmap sqlSortExpr $ qrySort qry) , case qryLimit qry of Nothing -> mempty Just limit -> "\nLIMIT " <> Builder.word64Dec limit@@ -198,7 +198,7 @@ { qryOffset = Just rows } --- | Specify how the output should be sorted. If @sortBy@ is used multiple times,+-- | Specify how the output should be sorted. If @orderBy@ is used multiple times, -- | all sort expressions are concatenated together, with later calls having -- | lower sort precedence. -- |@@ -206,9 +206,9 @@ -- | simpler. -- | -- | > query @Foo--- | > & sortBy [asc #col1, desc #col2]-sortBy :: Seq (SortExpr ctx) -> Query ctx -> Query ctx-sortBy sorts qry = qry+-- | > & orderBy [asc #col1, desc #col2]+orderBy :: Seq (SortExpr ctx) -> Query ctx -> Query ctx+orderBy sorts qry = qry { qrySort = qrySort qry <> sorts }