-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Backend for the persistent library using MySQL database server.
--
-- This package contains a backend for persistent using the MySQL
-- database server. Internally it uses the mysql-simple and
-- mysql packages in order to access the database.
--
-- This package supports only MySQL 5.1 and above. However, it has been
-- tested only on MySQL 5.5.
--
-- Known problems:
--
--
-- - This package does not support statements inside other
-- statements.
--
@package persistent-mysql
@version 2.1.2
-- | A MySQL backend for persistent.
module Database.Persist.MySQL
-- | Create a MySQL connection pool and run the given action. The pool is
-- properly released after the action finishes using it. Note that you
-- should not use the given ConnectionPool outside the action
-- since it may be already been released.
withMySQLPool :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => ConnectInfo -> Int -> (ConnectionPool -> m a) -> m a
-- | Same as withMySQLPool, but instead of opening a pool of
-- connections, only one connection is opened.
withMySQLConn :: (MonadBaseControl IO m, MonadIO m, MonadLogger m) => ConnectInfo -> (Connection -> m a) -> m a
-- | Create a MySQL connection pool. Note that it's your responsability to
-- properly close the connection pool when unneeded. Use
-- withMySQLPool for automatic resource control.
createMySQLPool :: (MonadBaseControl IO m, MonadIO m, MonadLogger m) => ConnectInfo -> Int -> m ConnectionPool
data ConnectInfo :: *
ConnectInfo :: String -> Word16 -> String -> String -> String -> [Option] -> FilePath -> Maybe SSLInfo -> ConnectInfo
connectHost :: ConnectInfo -> String
connectPort :: ConnectInfo -> Word16
connectUser :: ConnectInfo -> String
connectPassword :: ConnectInfo -> String
connectDatabase :: ConnectInfo -> String
connectOptions :: ConnectInfo -> [Option]
connectPath :: ConnectInfo -> FilePath
connectSSL :: ConnectInfo -> Maybe SSLInfo
data SSLInfo :: *
SSLInfo :: FilePath -> FilePath -> FilePath -> FilePath -> String -> SSLInfo
sslKey :: SSLInfo -> FilePath
sslCert :: SSLInfo -> FilePath
sslCA :: SSLInfo -> FilePath
sslCAPath :: SSLInfo -> FilePath
sslCiphers :: SSLInfo -> String
defaultConnectInfo :: ConnectInfo
defaultSSLInfo :: SSLInfo
-- | Information required to connect to a MySQL database using
-- persistent's generic facilities. These values are the same
-- that are given to withMySQLPool.
data MySQLConf
MySQLConf :: ConnectInfo -> Int -> MySQLConf
-- | The connection information.
myConnInfo :: MySQLConf -> ConnectInfo
-- | How many connections should be held on the connection pool.
myPoolSize :: MySQLConf -> Int
instance PersistConfig MySQLConf
instance FromJSON MySQLConf
instance Param P