/Database/HDBC/PostgreSQL/ConnectionImpl.hs

http://github.com/hdbc/hdbc-postgresql · Haskell · 41 lines · 38 code · 3 blank · 0 comment · 0 complexity · 5bb35b16996a8fa8026524c4f6a6670c MD5 · raw file

  1. module Database.HDBC.PostgreSQL.ConnectionImpl where
  2. import qualified Database.HDBC.Types as Types
  3. import Database.HDBC.ColTypes as ColTypes
  4. data Connection =
  5. Connection {
  6. disconnect :: IO (),
  7. begin :: IO (),
  8. commit :: IO (),
  9. rollback :: IO (),
  10. runRaw :: String -> IO (),
  11. run :: String -> [Types.SqlValue] -> IO Integer,
  12. prepare :: String -> IO Types.Statement,
  13. clone :: IO Connection,
  14. hdbcDriverName :: String,
  15. hdbcClientVer :: String,
  16. proxiedClientName :: String,
  17. proxiedClientVer :: String,
  18. dbServerVer :: String,
  19. dbTransactionSupport :: Bool,
  20. getTables :: IO [String],
  21. describeTable :: String -> IO [(String, ColTypes.SqlColDesc)]
  22. }
  23. instance Types.IConnection Connection where
  24. disconnect = disconnect
  25. commit = commit
  26. rollback = rollback
  27. runRaw = runRaw
  28. run = run
  29. prepare = prepare
  30. clone = clone
  31. hdbcDriverName = hdbcDriverName
  32. hdbcClientVer = hdbcClientVer
  33. proxiedClientName = proxiedClientName
  34. proxiedClientVer = proxiedClientVer
  35. dbServerVer = dbServerVer
  36. dbTransactionSupport = dbTransactionSupport
  37. getTables = getTables
  38. describeTable = describeTable