/usr/share/doc/libghc-haskelldb-doc/html/Database-HaskellDB-DriverAPI.html is in libghc-haskelldb-doc 2.1.1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Database.HaskellDB.DriverAPI</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-HaskellDB-DriverAPI.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-HaskellDB-DriverAPI.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">haskelldb-2.1.1: A library of combinators for generating and executing SQL statements.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>chucky@dtek.chalmers.se</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Database.HaskellDB.DriverAPI</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This exports an API that all drivers must conform to. It
is used by the end user to load drivers either dynamically
or statically.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:DriverInterface">DriverInterface</a> = <a href="#v:DriverInterface">DriverInterface</a> {<ul class="subs"><li><a href="#v:connect">connect</a> :: <span class="keyword">forall</span> m a. <a href="Database-HaskellDB-DriverAPI.html#t:MonadIO">MonadIO</a> m => [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> (<a href="Database-HaskellDB-Database.html#t:Database">Database</a> -> m a) -> m a</li><li><a href="#v:requiredOptions">requiredOptions</a> :: [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="#t:MonadIO">MonadIO</a> m </li><li class="src short"><a href="#v:defaultdriver">defaultdriver</a> :: <a href="Database-HaskellDB-DriverAPI.html#t:DriverInterface">DriverInterface</a></li><li class="src short"><a href="#v:getOptions">getOptions</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>] -> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> m [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:getAnnotatedOptions">getAnnotatedOptions</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> m [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:getGenerator">getGenerator</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> m <a href="Database-HaskellDB-Sql-Generate.html#t:SqlGenerator">SqlGenerator</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:DriverInterface" class="def">DriverInterface</a> <a href="src/Database-HaskellDB-DriverAPI.html#DriverInterface" class="link">Source</a></p><div class="doc"><p>Interface which drivers should implement.
The <code><a href="Database-HaskellDB-DriverAPI.html#v:connect">connect</a></code> function takes some driver specific name, value pairs
use to setup the database connection, and a database action to run.
<code><a href="Database-HaskellDB-DriverAPI.html#v:requiredOptions">requiredOptions</a></code> lists all required options with a short description,
that is printed as help in the DBDirect program.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:DriverInterface" class="def">DriverInterface</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:connect" class="def">connect</a> :: <span class="keyword">forall</span> m a. <a href="Database-HaskellDB-DriverAPI.html#t:MonadIO">MonadIO</a> m => [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)] -> (<a href="Database-HaskellDB-Database.html#t:Database">Database</a> -> m a) -> m a</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:requiredOptions" class="def">requiredOptions</a> :: [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a name="t:MonadIO" class="def">MonadIO</a> m </p><div class="doc"><p>Monads in which <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a></code> computations may be embedded.
Any monad built by applying a sequence of monad transformers to the
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a></code> monad will be an instance of this class.
</p><p>Instances should satisfy the following laws, which state that <code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code>
is a transformer of monads:
</p><ul><li><pre><code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code> . <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#v:return">return</a></code> = <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#v:return">return</a></code></pre></li><li><pre><code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code> (m >>= f) = <code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code> m >>= (<code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code> . f)</pre></li></ul></div><div class="subs instances"><p id="control.i:MonadIO" class="caption collapser" onclick="toggleSection('i:MonadIO')">Instances</p><div id="section.i:MonadIO" class="show"><table><tr><td class="src"><a href="Database-HaskellDB-DriverAPI.html#t:MonadIO">MonadIO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a></td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:Error">Error</a> e, <a href="Database-HaskellDB-DriverAPI.html#t:MonadIO">MonadIO</a> m) => <a href="Database-HaskellDB-DriverAPI.html#t:MonadIO">MonadIO</a> (<a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:defaultdriver" class="def">defaultdriver</a> :: <a href="Database-HaskellDB-DriverAPI.html#t:DriverInterface">DriverInterface</a><a href="src/Database-HaskellDB-DriverAPI.html#defaultdriver" class="link">Source</a></p><div class="doc"><p>Default dummy driver, real drivers should overload this
</p></div></div><div class="top"><p class="src"><a name="v:getOptions" class="def">getOptions</a><a href="src/Database-HaskellDB-DriverAPI.html#getOptions" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</td><td class="doc"><p>names of options to get
</p></td></tr><tr><td class="src">-> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</td><td class="doc"><p>options given
</p></td></tr><tr><td class="src">-> m [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</td><td class="doc"><p>a list of the same length as the first argument
with the values of each option. Fails in the given
monad if any options is not found.
</p></td></tr></table></div><div class="doc"><p>Can be used by drivers to get option values from the given
list of name, value pairs.
</p></div></div><div class="top"><p class="src"><a name="v:getAnnotatedOptions" class="def">getAnnotatedOptions</a><a href="src/Database-HaskellDB-DriverAPI.html#getAnnotatedOptions" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</td><td class="doc"><p>names and descriptions of options to get
</p></td></tr><tr><td class="src">-> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</td><td class="doc"><p>options given
</p></td></tr><tr><td class="src">-> m [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>]</td><td class="doc"><p>a list of the same length as the first argument
with the values of each option. Fails in the given
monad if any options is not found.
</p></td></tr></table></div><div class="doc"><p>Can be used by drivers to get option values from the given
list of name, value pairs.
It is intended for use with the <code><a href="Database-HaskellDB-DriverAPI.html#v:requiredOptions">requiredOptions</a></code> value of the driver.
</p></div></div><div class="top"><p class="src"><a name="v:getGenerator" class="def">getGenerator</a><a href="src/Database-HaskellDB-DriverAPI.html#getGenerator" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)]</td><td class="doc"><p>options given
</p></td></tr><tr><td class="src">-> m <a href="Database-HaskellDB-Sql-Generate.html#t:SqlGenerator">SqlGenerator</a></td><td class="doc"><p>An SQL generator. If there was no
<a href="generator.html">generator</a> option, the default is used.
Fails if the generator is unknown
</p></td></tr></table></div><div class="doc"><p>Gets an <code><a href="Database-HaskellDB-Sql-Generate.html#t:SqlGenerator">SqlGenerator</a></code> from the <a href="generator.html">generator</a> option in the given list.
Currently available generators: <a href="mysql.html">mysql</a>, <a href="postgresql.html">postgresql</a>, <a href="sqlite.html">sqlite</a>, <a href="default.html">default</a>
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>
|