PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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