packages feed

pg-store 0.4.1 → 0.4.2

raw patch · 4 files changed

+14/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Database.PostgreSQL.Store.Errand: class ErrandQuery q r where type ErrandResult q r where {
+ Database.PostgreSQL.Store.Errand: executeWith :: ErrandQuery q r => (Result -> Errand r) -> q x -> ErrandResult q r
+ Database.PostgreSQL.Store.Errand: type family ErrandResult q r;
+ Database.PostgreSQL.Store.Errand: }

Files

pg-store.cabal view
@@ -1,5 +1,5 @@ name:                pg-store-version:             0.4.1+version:             0.4.2 category:            Database synopsis:            Simple storage interface to PostgreSQL description:         Simple storage interface to PostgreSQL
src/Database/PostgreSQL/Store/Entity.hs view
@@ -168,7 +168,7 @@  -- | An entity that is used as a parameter or result of a query. class (KnownNat (Width a)) => Entity a where-	-- | Number of values the entity consists of+	-- | Number of values of which the entity consists 	type Width a :: Nat  	type Width a = GEntityWidth (Rep a)@@ -248,7 +248,7 @@ -- | Chain of 7 entities instance (GenericEntity (a, b, c, d, e, f, g)) => Entity (a, b, c, d, e, f, g) --- | A value which may normally not be @NULL@.+-- | A value which may be @NULL@. instance (Entity a) => Entity (Maybe a) where 	type Width (Maybe a) = Width a 
src/Database/PostgreSQL/Store/Errand.hs view
@@ -25,19 +25,26 @@  	runErrand, +	-- * Execute queries 	execute, 	execute', 	query, 	queryWith, +	-- * Prepare statements 	prepare, +	-- * Transactions 	beginTransaction, 	commitTransaction, 	saveTransaction, 	rollbackTransaction, 	rollbackTransactionTo,-	withTransaction+	withTransaction,++	-- * Helpers+	ErrandQuery (..),+ ) where  import           GHC.TypeLits
src/Database/PostgreSQL/Store/Query/TH.hs view
@@ -36,6 +36,8 @@ -- > genCatSound :: QueryGenerator a -- > genCatSound = [pgQueryGen| 'meow' |] --+-- 'pgQueryGen' supports the same operations as 'pgQuery'.+-- -- = 'Entity' -- Everything that has an instance of 'Entity' can also be used in these quasi quoters. So far, one -- can only utilize them in the form of named expressions.@@ -94,7 +96,7 @@ -- > listMyTable :: Query MyTable -- > listMyTable = -- >     [pgQuery| SELECT #MyTable(t)--- >               FROM @MyTable AS t |]+-- >               FROM @MyTable t |] -- -- The alias is included in the resulting SQL: --