groundhog-mysql-0.3.0: MySQL backend for the groundhog library.

Safe HaskellNone

Database.Groundhog.MySQL

Synopsis

Documentation

withMySQLPoolSource

Arguments

:: (MonadBaseControl IO m, MonadIO m) 
=> ConnectInfo 
-> Int

number of connections to open

-> (Pool MySQL -> m a) 
-> m a 

runDbConn :: (MonadBaseControl IO m, MonadIO m, ConnectionManager cm conn) => DbPersist conn m a -> cm -> m a

Runs action within connection. It can handle a simple connection, a pool of them, etc.

data SSLInfo

Constructors

SSLInfo 

Fields

sslKey :: FilePath
 
sslCert :: FilePath
 
sslCA :: FilePath
 
sslCAPath :: FilePath
 
sslCiphers :: String

Comma-separated list of cipher names.

defaultConnectInfo :: ConnectInfo

Default information for setting up a connection.

Defaults are as follows:

  • Server on localhost
  • User root
  • No password
  • Database test
  • Character set utf8

Use as in the following example:

 connect defaultConnectInfo { connectHost = "db.example.com" }

defaultSSLInfo :: SSLInfo

Default (empty) information for setting up an SSL connection.