postgresql-libpq 0.6.1 → 0.6.2
raw patch · 2 files changed
+14/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Database.PostgreSQL.LibPQ: isNullConnection :: Connection -> Bool
+ Database.PostgreSQL.LibPQ: newNullConnection :: IO Connection
Files
- Database/PostgreSQL/LibPQ.hsc +12/−0
- postgresql-libpq.cabal +2/−2
Database/PostgreSQL/LibPQ.hsc view
@@ -52,6 +52,8 @@ , connectdb , connectStart , connectPoll+ , newNullConnection+ , isNullConnection --, conndefaults --, conninfoParse , reset@@ -290,6 +292,16 @@ c_PQfinish conn fd -> closeFdWith (\_ -> c_PQfinish conn) (Fd fd) #endif++-- | Allocate a Null Connection, which all libpq functions+-- should safely fail on.+newNullConnection :: IO Connection+newNullConnection = Conn `fmap` newForeignPtr_ nullPtr++-- | Test if a connection is the Null Connection.+isNullConnection :: Connection -> Bool+isNullConnection (Conn x) = unsafeForeignPtrToPtr x == nullPtr+{-# INLINE isNullConnection #-} -- | If 'connectStart' succeeds, the next stage is to poll libpq so -- that it can proceed with the connection sequence. Use 'socket' to
postgresql-libpq.cabal view
@@ -1,5 +1,5 @@ Name: postgresql-libpq-Version: 0.6.1+Version: 0.6.2 Synopsis: low-level binding to libpq Description: This is a binding to libpq: the C application@@ -39,4 +39,4 @@ source-repository this type: git location: http://github.com/lpsmith/postgresql-libpq- tag: v0.6.1+ tag: v0.6.2