postgresql-simple 0.2 → 0.2.0.1
raw patch · 11 files changed
+22/−18 lines, 11 files
Files
- postgresql-simple.cabal +2/−2
- src/Database/PostgreSQL/Simple.hs +1/−1
- src/Database/PostgreSQL/Simple/FromField.hs +2/−2
- src/Database/PostgreSQL/Simple/FromRow.hs +1/−1
- src/Database/PostgreSQL/Simple/Internal.hs +8/−4
- src/Database/PostgreSQL/Simple/Ok.hs +1/−1
- src/Database/PostgreSQL/Simple/SqlQQ.hs +1/−1
- src/Database/PostgreSQL/Simple/Time/Implementation.hs +1/−1
- src/Database/PostgreSQL/Simple/ToField.hs +1/−1
- src/Database/PostgreSQL/Simple/ToRow.hs +3/−3
- src/Database/PostgreSQL/Simple/Types.hs +1/−1
postgresql-simple.cabal view
@@ -1,5 +1,5 @@ Name: postgresql-simple-Version: 0.2+Version: 0.2.0.1 Synopsis: Mid-Level PostgreSQL client library Description: Mid-Level PostgreSQL client library, forked from mysql-simple.@@ -8,7 +8,7 @@ Author: Bryan O'Sullivan, Leon P Smith Maintainer: Leon P Smith <leon@melding-monads.com> Copyright: (c) 2011 MailRank, Inc.- (c) 2011 Leon P Smith+ (c) 2011-2012 Leon P Smith Category: Database Build-type: Simple
src/Database/PostgreSQL/Simple.hs view
@@ -9,7 +9,7 @@ -- | -- Module: Database.PostgreSQL.Simple -- Copyright: (c) 2011 MailRank, Inc.--- (c) 2011 Leon P Smith+-- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental
src/Database/PostgreSQL/Simple/FromField.hs view
@@ -6,13 +6,13 @@ -- | -- Module: Database.PostgreSQL.Simple.FromField -- Copyright: (c) 2011 MailRank, Inc.--- (c) 2011 Leon P Smith+-- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental -- Portability: portable ----- The 'Result' typeclass, for converting a single value in a row+-- The 'FromField' typeclass, for converting a single value in a row -- returned by a SQL query into a more useful Haskell representation. -- -- A Haskell numeric type is considered to be compatible with all
src/Database/PostgreSQL/Simple/FromRow.hs view
@@ -3,7 +3,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.FromRow--- Copyright: (c) 2011 Leon P Smith+-- Copyright: (c) 2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental
src/Database/PostgreSQL/Simple/Internal.hs view
@@ -2,7 +2,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Internal--- Copyright: (c) 2011 Leon P Smith+-- Copyright: (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental@@ -153,9 +153,13 @@ connectionHandle <- newMVar conn connectionObjects <- newMVar (IntMap.empty) let wconn = Connection{..}- _ <- execute_ wconn "SET standard_conforming_strings TO on;\- \SET datestyle TO ISO"- return Connection{..}+ version <- PQ.serverVersion conn+ let settings+ | version < 80200 = "SET datestyle TO ISO"+ | otherwise = "SET standard_conforming_strings TO on;\+ \SET datestyle TO ISO"+ _ <- execute_ wconn settings+ return wconn _ -> do msg <- maybe "connectPostgreSQL error" id <$> PQ.errorMessage conn throwIO $ SqlError { sqlNativeError = -1 -- FIXME?
src/Database/PostgreSQL/Simple/Ok.hs view
@@ -4,7 +4,7 @@ ------------------------------------------------------------------------------ -- | -- Module : Database.PostgreSQL.Simple.Ok--- Copyright : (c) 2011-2012 Leon P Smith+-- Copyright : (c) 2012 Leon P Smith -- License : BSD3 -- -- Maintainer : leon@melding-monads.com
src/Database/PostgreSQL/Simple/SqlQQ.hs view
@@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.SqlQQ--- Copyright: (c) 2011 Leon P Smith+-- Copyright: (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental
src/Database/PostgreSQL/Simple/Time/Implementation.hs view
@@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Time.Implementation--- Copyright: (c) 2011 Leon P Smith+-- Copyright: (c) 2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental
src/Database/PostgreSQL/Simple/ToField.hs view
@@ -5,7 +5,7 @@ -- | -- Module: Database.PostgreSQL.Simple.ToField -- Copyright: (c) 2011 MailRank, Inc.--- (c) 2011 Leon P Smith+-- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental
src/Database/PostgreSQL/Simple/ToRow.hs view
@@ -1,14 +1,14 @@ ------------------------------------------------------------------------------ -- |--- Module: Database.PostgreSQL.Simple.QueryParams+-- Module: Database.PostgreSQL.Simple.ToRow -- Copyright: (c) 2011 MailRank, Inc.--- (c) 2011 Leon P Smith+-- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental -- Portability: portable ----- The 'QueryParams' typeclass, for rendering a collection of+-- The 'ToRow' typeclass, for rendering a collection of -- parameters to a SQL query. -- -- Predefined instances are provided for tuples containing up to ten
src/Database/PostgreSQL/Simple/Types.hs view
@@ -4,7 +4,7 @@ -- | -- Module: Database.PostgreSQL.Simple.Types -- Copyright: (c) 2011 MailRank, Inc.--- (c) 2011 Leon P Smith+-- (c) 2011-2012 Leon P Smith -- License: BSD3 -- Maintainer: Leon P Smith <leon@melding-monads.com> -- Stability: experimental