Commits

Bryan O'Sullivan committed 32b656f

Moar info.

  • Participants
  • Parent commits 4d4381e

Comments (0)

Files changed (2)

File Database/MySQL.hs

     , serverInfo
     , hostInfo
     , protocolInfo
+    , characterSetName
     -- * General information
     , clientInfo
     , clientVersion
 protocolInfo conn = withConn conn $ \ptr ->
                     fromIntegral <$> mysql_get_proto_info ptr
 
+characterSetName :: Connection -> IO String
+characterSetName conn = withConn conn $ \ptr ->
+                        peekCString =<< mysql_character_set_name ptr
+
 clientInfo :: String
 clientInfo = unsafePerformIO $ peekCString mysql_get_client_info
 {-# NOINLINE clientInfo #-}

File Database/MySQL/C.hsc

     , mysql_get_server_info
     , mysql_get_host_info
     , mysql_get_proto_info
+    , mysql_character_set_name
     -- * General information
     , mysql_get_client_info
     , mysql_get_client_version
 foreign import ccall safe mysql_get_proto_info
     :: Ptr MYSQL -> IO CUInt
 
+foreign import ccall safe mysql_character_set_name
+    :: Ptr MYSQL -> IO CString
+
 foreign import ccall safe mysql_get_client_info :: CString
 
 foreign import ccall safe mysql_get_client_version :: CULong