-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Backend for the persistent library using MySQL database server. -- @package persistent-mysql @version 2.3 -- | 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 -> (SqlBackend -> m a) -> m a -- | Create a MySQL connection pool. Note that it's your responsibility 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 -- | Comma-separated list of cipher names. sslCiphers :: SSLInfo -> String -- | Default information for setting up a connection. -- -- Defaults are as follows: -- -- -- -- Use as in the following example: -- --
--   connect defaultConnectInfo { connectHost = "db.example.com" }
--   
defaultConnectInfo :: ConnectInfo -- | Default (empty) information for setting up an SSL connection. 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 -- | Mock a migration even when the database is not present. This function -- will mock the migration for a database even when the actual database -- isn't already present in the system. mockMigration :: Migration -> IO () instance Show MySQLConf instance PersistConfig MySQLConf instance FromJSON MySQLConf instance Param P