/usr/share/doc/libghc-persistent-postgresql-doc/html/Database-Persist-Postgresql.html is in libghc-persistent-postgresql-doc 2.2.1.2-1build1.
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 | <!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.Persist.Postgresql</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-Persist-Postgresql.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-Persist-Postgresql.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">persistent-postgresql-2.2.1.2: Backend for the persistent library using postgresql.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Database.Persist.Postgresql</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A postgresql backend for persistent.</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"><a href="#v:withPostgresqlPool">withPostgresqlPool</a> :: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a> -> m a) -> m a</li><li class="src short"><a href="#v:withPostgresqlConn">withPostgresqlConn</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a> -> m a) -> m a</li><li class="src short"><a href="#v:createPostgresqlPool">createPostgresqlPool</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> m <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></li><li class="src short"><a href="#v:createPostgresqlPoolModified">createPostgresqlPoolModified</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m) => (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> m <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></li><li class="src short">module <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html">Database.Persist.Sql</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ConnectionString">ConnectionString</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PostgresConf">PostgresConf</a> = <a href="#v:PostgresConf">PostgresConf</a> {<ul class="subs"><li><a href="#v:pgConnStr">pgConnStr</a> :: <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></li><li><a href="#v:pgPoolSize">pgPoolSize</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:openSimpleConn">openSimpleConn</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:LogFunc">LogFunc</a> -> <a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a></li><li class="src short"><a href="#v:tableName">tableName</a> :: <span class="keyword">forall</span> record. (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> record ~ <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a>) => record -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:fieldName">fieldName</a> :: <span class="keyword">forall</span> record typ. (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> record ~ <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a>) => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:EntityField">EntityField</a> record typ -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:mockMigration">mockMigration</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:Migration">Migration</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:withPostgresqlPool" class="def">withPostgresqlPool</a> <a href="src/Database-Persist-Postgresql.html#withPostgresqlPool" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in
the pool.</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a> -> m a)</td><td class="doc"><p>Action to be executed that uses the
connection pool.</p></td></tr><tr><td class="src">-> m a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a PostgreSQL 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
<code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></code> outside the action since it may be already
been released.</p></div></div><div class="top"><p class="src"><a name="v:withPostgresqlConn" class="def">withPostgresqlConn</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m) => <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a> -> (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a> -> m a) -> m a <a href="src/Database-Persist-Postgresql.html#withPostgresqlConn" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code>, but instead of opening a pool
of connections, only one connection is opened.</p></div></div><div class="top"><p class="src"><a name="v:createPostgresqlPool" class="def">createPostgresqlPool</a> <a href="src/Database-Persist-Postgresql.html#createPostgresqlPool" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open
in the pool.</p></td></tr><tr><td class="src">-> m <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a PostgreSQL connection pool. Note that it's your
responsibility to properly close the connection pool when
unneeded. Use <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code> for an automatic resource
control.</p></div></div><div class="top"><p class="src"><a name="v:createPostgresqlPoolModified" class="def">createPostgresqlPoolModified</a> <a href="src/Database-Persist-Postgresql.html#createPostgresqlPoolModified" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.4.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> m, <a href="file:///usr/share/doc/libghc-monad-logger-doc/html/Control-Monad-Logger.html#t:MonadLogger">MonadLogger</a> m)</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>action to perform after connection is created</p></td></tr><tr><td class="src">-> <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></td><td class="doc"><p>Connection string to the database.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of connections to be kept open in the pool.</p></td></tr><tr><td class="src">-> m <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Same as <code><a href="Database-Persist-Postgresql.html#v:createPostgresqlPool">createPostgresqlPool</a></code>, but additionally takes a callback function
for some connection-specific tweaking to be performed after connection
creation. This could be used, for example, to change the schema. For more
information, see:</p><p><a href="https://groups.google.com/d/msg/yesodweb/qUXrEN_swEo/O0pFwqwQIdcJ">https://groups.google.com/d/msg/yesodweb/qUXrEN_swEo/O0pFwqwQIdcJ</a></p><p>Since 2.1.3</p></div></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html">Database.Persist.Sql</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ConnectionString" class="def">ConnectionString</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Database-Persist-Postgresql.html#ConnectionString" class="link">Source</a></p><div class="doc"><p>A <code>libpq</code> connection string. A simple example of connection
string would be <code>"host=localhost port=5432 user=test
dbname=test password=test"</code>. Please read libpq's
documentation at
<a href="http://www.postgresql.org/docs/9.1/static/libpq-connect.html">http://www.postgresql.org/docs/9.1/static/libpq-connect.html</a>
for more details on how to create such strings.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PostgresConf" class="def">PostgresConf</a> <a href="src/Database-Persist-Postgresql.html#PostgresConf" class="link">Source</a></p><div class="doc"><p>Information required to connect to a PostgreSQL database
using <code>persistent</code>'s generic facilities. These values are the
same that are given to <code><a href="Database-Persist-Postgresql.html#v:withPostgresqlPool">withPostgresqlPool</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PostgresConf" class="def">PostgresConf</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:pgConnStr" class="def">pgConnStr</a> :: <a href="Database-Persist-Postgresql.html#t:ConnectionString">ConnectionString</a></dt><dd class="doc"><p>The connection string.</p></dd><dt class="src"><a name="v:pgPoolSize" class="def">pgPoolSize</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>How many connections should be held on the connection pool.</p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:PostgresConf" class="caption collapser" onclick="toggleSection('i:PostgresConf')">Instances</p><div id="section.i:PostgresConf" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-932" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-932" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-932" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:FromJSON">FromJSON</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-934" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfig">PersistConfig</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a></span> <a href="src/Database-Persist-Postgresql.html#line-952" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigPool">PersistConfigPool</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> = <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:ConnectionPool">ConnectionPool</a></span> <a href="src/Database-Persist-Postgresql.html#line-954" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistConfigBackend">PersistConfigBackend</a> <a href="Database-Persist-Postgresql.html#t:PostgresConf">PostgresConf</a> = <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlPersistT">SqlPersistT</a></span> <a href="src/Database-Persist-Postgresql.html#line-953" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:openSimpleConn" class="def">openSimpleConn</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:LogFunc">LogFunc</a> -> <a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a> <a href="src/Database-Persist-Postgresql.html#openSimpleConn" class="link">Source</a></p><div class="doc"><p>Generate a <code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:Connection">Connection</a></code> from a <code><a href="file:///usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Internal.html#t:Connection">Connection</a></code></p></div></div><div class="top"><p class="src"><a name="v:tableName" class="def">tableName</a> :: <span class="keyword">forall</span> record. (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> record ~ <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a>) => record -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Database-Persist-Postgresql.html#tableName" class="link">Source</a></p><div class="doc"><p>get the SQL string for the table that a PeristEntity represents
Useful for raw SQL queries</p></div></div><div class="top"><p class="src"><a name="v:fieldName" class="def">fieldName</a> :: <span class="keyword">forall</span> record typ. (<a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntity">PersistEntity</a> record, <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:PersistEntityBackend">PersistEntityBackend</a> record ~ <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:SqlBackend">SqlBackend</a>) => <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Class.html#t:EntityField">EntityField</a> record typ -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Database-Persist-Postgresql.html#fieldName" class="link">Source</a></p><div class="doc"><p>get the SQL string for the field that an EntityField represents
Useful for raw SQL queries</p></div></div><div class="top"><p class="src"><a name="v:mockMigration" class="def">mockMigration</a> :: <a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#t:Migration">Migration</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Database-Persist-Postgresql.html#mockMigration" class="link">Source</a></p><div class="doc"><p>Mock a migration even when the database is not present.
This function performs the same functionality of <code><a href="file:///usr/share/doc/libghc-persistent-doc/html/Database-Persist-Sql.html#v:printMigration">printMigration</a></code>
with the difference that an actualy database isn't needed for it.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|