mysql-haskell-0.8.0.0: pure haskell MySQL driver

Copyright(c) Winterland 2016
LicenseBSD
Maintainerdrkoster@qq.com
Stabilityexperimental
PortabilityPORTABLE
Safe HaskellNone
LanguageHaskell2010

Database.MySQL.Connection

Description

This is an internal module, the MySQLConn type should not directly acessed to user.

Synopsis

Documentation

data MySQLConn Source #

MySQLConn wrap both InputStream and OutputStream for MySQL Packet.

You shouldn't use one MySQLConn in different thread, if you do that, consider protecting it with a MVar.

data ConnectInfo Source #

Everything you need to establish a MySQL connection.

To setup a TLS connection, use module Database.MySQL.TLS or Database.MySQL.OpenSSL.

defaultConnectInfo :: ConnectInfo Source #

A simple ConnectInfo targeting localhost with user=root and empty password.

Default charset is set to utf8_general_ci to support older(< 5.5.3) MySQL versions, but be aware this is a partial utf8 encoding, you may want to use defaultConnectInfoMB4 instead to support full utf8 charset(emoji, etc.). You can query your server's support with SELECT id, collation_name FROM information_schema.collations ORDER BY id;

defaultConnectInfoMB4 :: ConnectInfo Source #

defaultConnectInfo with charset set to utf8mb4_unicode_ci

This is recommanded on any MySQL server version >= 5.5.3.

bUFSIZE :: Int Source #

Socket buffer size.

maybe exposed to ConnectInfo laster?

connect :: ConnectInfo -> IO MySQLConn Source #

Establish a MySQL connection.

connectDetail :: ConnectInfo -> IO (Greeting, MySQLConn) Source #

Establish a MySQL connection with Greeting back, so you can find server's version .etc.

close :: MySQLConn -> IO () Source #

Close a MySQL connection.

command :: MySQLConn -> Command -> IO OK Source #

Send a Command which don't return a resultSet.

writeIORef' :: IORef a -> a -> IO () Source #