packages feed

postgresql-typed 0.6.2.5 → 0.6.2.6

raw patch · 2 files changed

+30/−11 lines, 2 filesdep +ramdep ~cryptonPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: ram

Dependency ranges changed: crypton

API changes (from Hackage documentation)

- Database.PostgreSQL.Typed: [pgDBUser, pgDBPass] :: PGDatabase -> ByteString
- Database.PostgreSQL.Typed.Dynamic: instance Database.PostgreSQL.Typed.Dynamic.PGRep Data.ByteString.Internal.ByteString
- Database.PostgreSQL.Typed.Protocol: [pgDBUser, pgDBPass] :: PGDatabase -> ByteString
- Database.PostgreSQL.Typed.Query: instance Database.PostgreSQL.Typed.Query.PGQuery Data.ByteString.Internal.ByteString Database.PostgreSQL.Typed.Types.PGValues
- Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGColumn "bytea" Data.ByteString.Internal.ByteString
- Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGParameter "bytea" Data.ByteString.Internal.ByteString
- Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGStringType t => Database.PostgreSQL.Typed.Types.PGColumn t Data.ByteString.Internal.ByteString
- Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGStringType t => Database.PostgreSQL.Typed.Types.PGParameter t Data.ByteString.Internal.ByteString
+ Database.PostgreSQL.Typed: [pgDBPass] :: PGDatabase -> ByteString
+ Database.PostgreSQL.Typed: [pgDBTLSParams] :: PGDatabase -> Maybe ClientParams
+ Database.PostgreSQL.Typed: [pgDBUser] :: PGDatabase -> ByteString
+ Database.PostgreSQL.Typed.Dynamic: instance Database.PostgreSQL.Typed.Dynamic.PGRep Data.ByteString.Internal.Type.ByteString
+ Database.PostgreSQL.Typed.Protocol: [pgDBPass] :: PGDatabase -> ByteString
+ Database.PostgreSQL.Typed.Protocol: [pgDBTLSParams] :: PGDatabase -> Maybe ClientParams
+ Database.PostgreSQL.Typed.Protocol: [pgDBUser] :: PGDatabase -> ByteString
+ Database.PostgreSQL.Typed.Query: instance Database.PostgreSQL.Typed.Query.PGQuery Data.ByteString.Internal.Type.ByteString Database.PostgreSQL.Typed.Types.PGValues
+ Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGColumn "bytea" Data.ByteString.Internal.Type.ByteString
+ Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGParameter "bytea" Data.ByteString.Internal.Type.ByteString
+ Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGStringType t => Database.PostgreSQL.Typed.Types.PGColumn t Data.ByteString.Internal.Type.ByteString
+ Database.PostgreSQL.Typed.Types: instance Database.PostgreSQL.Typed.Types.PGStringType t => Database.PostgreSQL.Typed.Types.PGParameter t Data.ByteString.Internal.Type.ByteString
- Database.PostgreSQL.Typed: PGDatabase :: Either (HostName, ServiceName) SockAddr -> ByteString -> ByteString -> [(ByteString, ByteString)] -> Bool -> (MessageFields -> IO ()) -> PGTlsMode -> PGDatabase
+ Database.PostgreSQL.Typed: PGDatabase :: Either (HostName, ServiceName) SockAddr -> ByteString -> ByteString -> ByteString -> [(ByteString, ByteString)] -> Bool -> (MessageFields -> IO ()) -> PGTlsMode -> Maybe ClientParams -> PGDatabase
- Database.PostgreSQL.Typed.Array: class (PGType t, PGType (PGElemType t)) => PGArrayType t where {
+ Database.PostgreSQL.Typed.Array: class (PGType t, PGType PGElemType t) => PGArrayType (t :: Symbol) where {
- Database.PostgreSQL.Typed.Array: type PGElemType t :: Symbol;
+ Database.PostgreSQL.Typed.Array: type PGElemType (t :: Symbol) :: Symbol;
- Database.PostgreSQL.Typed.Dynamic: class (PGParameter (PGRepType a) a, PGColumn (PGRepType a) a) => PGRep a where {
+ Database.PostgreSQL.Typed.Dynamic: class (PGParameter PGRepType a a, PGColumn PGRepType a a) => PGRep a where {
- Database.PostgreSQL.Typed.Dynamic: pgDecodeRep :: forall a. PGRep a => PGValue -> a
+ Database.PostgreSQL.Typed.Dynamic: pgDecodeRep :: PGRep a => PGValue -> a
- Database.PostgreSQL.Typed.Protocol: PGDatabase :: Either (HostName, ServiceName) SockAddr -> ByteString -> ByteString -> [(ByteString, ByteString)] -> Bool -> (MessageFields -> IO ()) -> PGTlsMode -> PGDatabase
+ Database.PostgreSQL.Typed.Protocol: PGDatabase :: Either (HostName, ServiceName) SockAddr -> ByteString -> ByteString -> ByteString -> [(ByteString, ByteString)] -> Bool -> (MessageFields -> IO ()) -> PGTlsMode -> Maybe ClientParams -> PGDatabase
- Database.PostgreSQL.Typed.Range: class (PGType t, PGType (PGSubType t)) => PGRangeType t where {
+ Database.PostgreSQL.Typed.Range: class (PGType t, PGType PGSubType t) => PGRangeType (t :: Symbol) where {
- Database.PostgreSQL.Typed.Range: type PGSubType t :: Symbol;
+ Database.PostgreSQL.Typed.Range: type PGSubType (t :: Symbol) :: Symbol;
- Database.PostgreSQL.Typed.Types: class PGType t => PGColumn t a
+ Database.PostgreSQL.Typed.Types: class PGType t => PGColumn (t :: Symbol) a
- Database.PostgreSQL.Typed.Types: class PGType t => PGParameter t a
+ Database.PostgreSQL.Typed.Types: class PGType t => PGParameter (t :: Symbol) a
- Database.PostgreSQL.Typed.Types: class PGType t => PGRecordType t
+ Database.PostgreSQL.Typed.Types: class PGType t => PGRecordType (t :: Symbol)
- Database.PostgreSQL.Typed.Types: class PGType t => PGStringType t
+ Database.PostgreSQL.Typed.Types: class PGType t => PGStringType (t :: Symbol)
- Database.PostgreSQL.Typed.Types: class (KnownSymbol t, PGParameter t (PGVal t), PGColumn t (PGVal t)) => PGType t where {
+ Database.PostgreSQL.Typed.Types: class (KnownSymbol t, PGParameter t PGVal t, PGColumn t PGVal t) => PGType (t :: Symbol) where {
- Database.PostgreSQL.Typed.Types: pgDecodeColumn :: PGColumn t (Maybe a) => PGTypeEnv -> PGTypeID t -> PGValue -> Maybe a
+ Database.PostgreSQL.Typed.Types: pgDecodeColumn :: forall (t :: Symbol) a. PGColumn t (Maybe a) => PGTypeEnv -> PGTypeID t -> PGValue -> Maybe a
- Database.PostgreSQL.Typed.Types: pgDecodeColumnNotNull :: PGColumn t a => PGTypeEnv -> PGTypeID t -> PGValue -> a
+ Database.PostgreSQL.Typed.Types: pgDecodeColumnNotNull :: forall (t :: Symbol) a. PGColumn t a => PGTypeEnv -> PGTypeID t -> PGValue -> a
- Database.PostgreSQL.Typed.Types: pgEncodeParameter :: PGParameter t a => PGTypeEnv -> PGTypeID t -> a -> PGValue
+ Database.PostgreSQL.Typed.Types: pgEncodeParameter :: forall (t :: Symbol) a. PGParameter t a => PGTypeEnv -> PGTypeID t -> a -> PGValue
- Database.PostgreSQL.Typed.Types: pgEscapeParameter :: PGParameter t a => PGTypeEnv -> PGTypeID t -> a -> ByteString
+ Database.PostgreSQL.Typed.Types: pgEscapeParameter :: forall (t :: Symbol) a. PGParameter t a => PGTypeEnv -> PGTypeID t -> a -> ByteString
- Database.PostgreSQL.Typed.Types: type PGVal t :: *;
+ Database.PostgreSQL.Typed.Types: type PGVal (t :: Symbol);

Files

Database/PostgreSQL/Typed/Protocol.hs view
@@ -186,12 +186,13 @@   , pgDBLogMessage :: MessageFields -> IO () -- ^ How to log server notice messages (e.g., @print . PGError@) #ifdef VERSION_tls   , pgDBTLS :: PGTlsMode -- ^ TLS mode+  , pgDBTLSParams :: Maybe TLS.ClientParams -- ^ TLS client params #endif   } deriving (Show)  instance Eq PGDatabase where #ifdef VERSION_tls-  PGDatabase a1 n1 u1 p1 l1 _ _ s1 == PGDatabase a2 n2 u2 p2 l2 _ _ s2 =+  PGDatabase a1 n1 u1 p1 l1 _ _ s1 _ == PGDatabase a2 n2 u2 p2 l2 _ _ s2 _ =     a1 == a2 && n1 == n2 && u1 == u2 && p1 == p2 && l1 == l2 && s1 == s2 #else   PGDatabase a1 n1 u1 p1 l1 _ _ == PGDatabase a2 n2 u2 p2 l2 _ _ =@@ -394,6 +395,7 @@   , pgDBLogMessage = defaultLogMessage #ifdef VERSION_tls   , pgDBTLS = TlsDisabled+  , pgDBTLSParams = Nothing #endif   } @@ -754,12 +756,20 @@           pure $ PGTlsContext ctx         "N" -> throwIO (userError "Server does not support TLS")         _ -> throwIO (userError "Unexpected response from server when issuing SSLRequest")-    params = (TLS.defaultParamsClient tlsHost tlsPort)-      { TLS.clientSupported =-          def { TLS.supportedCiphers = TLS.ciphersuite_strong }-      , TLS.clientShared = clientShared-      , TLS.clientHooks = clientHooks-      }+    params = +      case pgDBTLSParams db of+        Nothing -> (TLS.defaultParamsClient tlsHost tlsPort)+          { TLS.clientSupported =+              def +                  { TLS.supportedCiphers = TLS.ciphersuite_strong+#if MIN_VERSION_tls(2,0,0)+                  , TLS.supportedExtendedMainSecret = TLS.AllowEMS +#endif+                  }+          , TLS.clientShared = clientShared+          , TLS.clientHooks = clientHooks+          }+        Just userParams -> userParams { TLS.clientShared = clientShared, TLS.clientHooks = clientHooks }     tlsHost = case pgDBAddr db of       Left (h,_) -> h       Right (Net.SockAddrUnix s) -> s
postgresql-typed.cabal view
@@ -1,5 +1,5 @@ Name:          postgresql-typed-Version:       0.6.2.5+Version:       0.6.2.6 Cabal-Version: >= 1.10 License:       BSD3 License-File:  COPYING@@ -25,7 +25,7 @@  source-repository head   type:     git-  location: git://github.com/dylex/postgresql-typed+  location: https://github.com/dylex/postgresql-typed  Flag md5   Description: Enable md5 password authentication method.@@ -62,6 +62,10 @@   Description: Use crypton rather than cryptonite.   Default: True +Flag ram+  Description: Use ram rather than memory (only if crypton).+  Default: False+ Library   default-language:    Haskell2010   Build-Depends:@@ -97,11 +101,16 @@     Database.PostgreSQL.Typed.TypeCache   GHC-Options: -Wall   if flag(md5)-    Build-Depends: memory >= 0.5     if flag(crypton)-      Build-Depends: crypton+      if flag(ram)+        Build-Depends: crypton >= 1.1+        Build-Depends: ram+      else+        Build-Depends: crypton < 1.1+        Build-Depends: memory >= 0.5     else       Build-Depends: cryptonite >= 0.5+      Build-Depends: memory >= 0.5   if flag(binary)     Build-Depends: postgresql-binary >= 0.8, text >= 1, uuid >= 1.3, scientific >= 0.3   else