beam-postgres 0.3.2.2 → 0.3.2.3
raw patch · 5 files changed
+15/−6 lines, 5 filesdep ~beam-coredep ~freedep ~postgresql-simple
Dependency ranges changed: beam-core, free, postgresql-simple
Files
- Database/Beam/Postgres/Connection.hs +6/−1
- Database/Beam/Postgres/Migrate.hs +1/−1
- Database/Beam/Postgres/PgSpecific.hs +1/−1
- Database/Beam/Postgres/Syntax.hs +4/−0
- beam-postgres.cabal +3/−3
Database/Beam/Postgres/Connection.hs view
@@ -52,6 +52,8 @@ import Control.Monad.Reader import Control.Monad.State+import Control.Monad.Fail (MonadFail)+import qualified Control.Monad.Fail as Fail import Data.ByteString (ByteString) import Data.ByteString.Builder (toLazyByteString, byteString)@@ -266,7 +268,7 @@ getFields res' >>= \fields -> runPgRowReader conn rowIdx res' fields fromBackendRow >>= \case Left err -> pure (PgStreamDone (Left (PgRowParseError err)))- Right r -> next r Nothing+ Right r -> next (Just r) Nothing stepProcess (PgFetchNext next) (Just (PgI.Row rowIdx res)) = getFields res >>= \fields -> runPgRowReader conn rowIdx res fields fromBackendRow >>= \case@@ -301,6 +303,9 @@ -- API. See "Database.Beam.Postgres.Conduit" for more information. newtype Pg a = Pg { runPg :: F PgF a } deriving (Monad, Applicative, Functor, MonadFree PgF)++instance MonadFail Pg where+ fail e = fail $ "Internal Error with: " <> show e instance MonadIO Pg where liftIO x = liftF (PgLiftIO x id)
Database/Beam/Postgres/Migrate.hs view
@@ -273,7 +273,7 @@ getDbConstraints :: Pg.Connection -> IO [ Db.SomeDatabasePredicate ] getDbConstraints conn =- do tbls <- Pg.query_ conn "SELECT oid, relname FROM pg_catalog.pg_class where relnamespace=(select oid from pg_catalog.pg_namespace where nspname='public') and relkind='r'"+ do tbls <- Pg.query_ conn "SELECT cl.oid, relname FROM pg_catalog.pg_class \"cl\" join pg_catalog.pg_namespace \"ns\" on (ns.oid = relnamespace) where nspname = any (current_schemas(false)) and relkind='r'" let tblsExist = map (\(_, tbl) -> Db.SomeDatabasePredicate (Db.TableExistsPredicate tbl)) tbls columnChecks <-
Database/Beam/Postgres/PgSpecific.hs view
@@ -403,7 +403,7 @@ -- containing expressions. array_ :: forall context f s a. (PgIsArrayContext context, Foldable f)- => f (QGenExpr PgArrayValueContext PgExpressionSyntax s a)+ => f (QGenExpr context PgExpressionSyntax s a) -> QGenExpr context PgExpressionSyntax s (V.Vector a) array_ vs = QExpr $ fmap (PgExpressionSyntax . mkArraySyntax (Proxy @context) . mconcat) $
Database/Beam/Postgres/Syntax.hs view
@@ -52,6 +52,7 @@ , PgSelectLockingOptions(..) , fromPgSelectLockingClause , pgSelectStmt+ , defaultPgValueSyntax , PgDataTypeDescr(..) @@ -1145,6 +1146,9 @@ instance HasSqlValueSyntax PgValueSyntax BL.ByteString where sqlValueSyntax = defaultPgValueSyntax . Pg.Binary++instance Pg.ToField a => HasSqlValueSyntax PgValueSyntax (V.Vector a) where+ sqlValueSyntax = defaultPgValueSyntax pgQuotedIdentifier :: T.Text -> PgSyntax pgQuotedIdentifier t =
beam-postgres.cabal view
@@ -1,5 +1,5 @@ name: beam-postgres-version: 0.3.2.2+version: 0.3.2.3 synopsis: Connection layer between beam and postgres description: Beam driver for <https://www.postgresql.org/ PostgreSQL>, an advanced open-source RDBMS homepage: http://tathougies.github.io/beam/user-guide/backends/beam-postgres@@ -31,14 +31,14 @@ beam-migrate >=0.3 && <0.4, postgresql-libpq >=0.8 && <0.10,- postgresql-simple >=0.5 && <0.6,+ postgresql-simple >=0.5 && <0.7, text >=1.0 && <1.3, bytestring >=0.10 && <0.11, hashable >=1.1 && <1.3, lifted-base >=0.2 && <0.3,- free >=4.12 && <5.1,+ free >=4.12 && <5.2, time >=1.6 && <1.10, monad-control >=1.0 && <1.1, mtl >=2.1 && <2.3,