Packages

MySQL native client is written in Erlang and provides API that is very close to Connector/C library.

Current section

Files

Jump to
mysql_client doc connection_factory.html
Raw

doc/connection_factory.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module connection_factory</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>
<h1>Module connection_factory</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
The module is a factory of resources - factory of mysql connections.
<p>Copyright © 2010-2014 Alexei Krasnopolski</p>
<p><b>Version:</b> 1.2.8</p>
<p><b>Introduced in:</b> 2012-12-11</p>
<p><b>Behaviours:</b> <a href="/Users/alexei/eclipse/data/workspace-Erlang/mysql_client/_build/default/lib/rsrc_pool/doc/resource_factory.html"><tt>resource_factory</tt></a>.</p>
<p><b>Authors:</b> Alexei Krasnopolski (<a href="mailto:krasnop@bellsouth.net"><tt>krasnop@bellsouth.net</tt></a>) [<em>web site:</em> <tt><a href="http://krasnopolski.org/" target="_top">http://krasnopolski.org/</a></tt>].</p>
<h2><a name="description">Description</a></h2>
The module is a factory of resources - factory of mysql connections.
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#create-1">create/1</a></td><td>Creates new connection to MySQL server.</td></tr>
<tr><td valign="top"><a href="#destroy-2">destroy/2</a></td><td>Destroyes resource - connection to server.</td></tr>
<tr><td valign="top"><a href="#validate-2">validate/2</a></td><td>Validate connection: if connection is alive returns true, otherwise - false.</td></tr>
<tr><td valign="top"><a href="#activate-2">activate/2</a></td><td>Some action during activation of connection before moving resource from pool to client.</td></tr>
<tr><td valign="top"><a href="#passivate-2">passivate/2</a></td><td>Some action during passivation of connection after returning resource from use to pool.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="create-1">create/1</a></h3>
<div class="spec">
<p><tt>create(Resource_metadata::term()) -&gt; pid()</tt><br></p>
<p> </p>
</div><p>Creates new connection to MySQL server.</p>
<h3 class="function"><a name="destroy-2">destroy/2</a></h3>
<div class="spec">
<p><tt>destroy(Resource_metadata::term(), _Resource::pid()) -&gt; <a href="#type-noreturn">noreturn()</a></tt><br></p>
<p> </p>
</div><p>Destroyes resource - connection to server.</p>
<h3 class="function"><a name="validate-2">validate/2</a></h3>
<div class="spec">
<p><tt>validate(Resource_metadata::term(), _Resource::pid()) -&gt; boolean()</tt><br></p>
<p> </p>
</div><p>Validate connection: if connection is alive returns true, otherwise - false.</p>
<h3 class="function"><a name="activate-2">activate/2</a></h3>
<div class="spec">
<p><tt>activate(Resource_metadata::term(), _Resource::pid()) -&gt; ok</tt><br></p>
<p> </p>
</div><p>Some action during activation of connection before moving resource from pool to client.</p>
<h3 class="function"><a name="passivate-2">passivate/2</a></h3>
<div class="spec">
<p><tt>passivate(Resource_metadata::term(), _Resource::pid()) -&gt; ok</tt><br></p>
<p> </p>
</div><p>Some action during passivation of connection after returning resource from use to pool.</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc</i></p>
</body>
</html>