Advertisement
Guest User

oracle-haskell

a guest
Jun 9th, 2022
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. main :: IO ()
  2. main = do
  3.   withContext $ \ctx ->
  4.     withPool ctx cfg return \pool ->
  5.       withPoolConnection pool $ \conn ->
  6.         withStatement conn False "select name from db.report_date where id = 1" $ \st -> do
  7.           r <- executeStatement st ModeExecDefault
  8.           f <- fetch st
  9.           (DataVarchar v) <- getQueryValue st 1
  10.           peekCStringLen (bytes v) >>= print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement