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 helper_connection.html
Raw

doc/helper_connection.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 helper_connection</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 helper_connection</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>This module incapsulates functions these are responsible for connection to MySQL server.
<p>Copyright © 2010-2014 Alexei Krasnopolski</p>
<p><b>Version:</b> 1.2.8</p>
<p><b>Introduced in:</b> 2010-10-08</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>This module incapsulates functions these are responsible for connection to MySQL server.
Function open_connection establishes socket connection to server and proceedes handshake with authorization.
Function change_user keeps connection opened but it changes authorization.
<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="#open_connection-1">open_connection/1</a></td><td>
Open ip/tcp socket connection to remote MySQL server.</td></tr>
<tr><td valign="top"><a href="#change_user-4">change_user/4</a></td><td>Changes user for the connection.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="open_connection-1">open_connection/1</a></h3>
<div class="spec">
<p><tt>open_connection(Datasource_definition::#datasource{}) -&gt; #connection{} | #mysql_error{}</tt><br></p>
<p> </p>
</div><p>
Open ip/tcp socket connection to remote MySQL server. The function returns a record
that contains all information about the connection or error message if request is failed.</p>
<h3 class="function"><a name="change_user-4">change_user/4</a></h3>
<div class="spec">
<p><tt>change_user(Connection::#connection{}, User::string(), Password::string(), Db::string) -&gt; #connection{} | #mysql_error{}</tt><br></p>
<p> </p>
</div><p>Changes user for the connection. Returns new Connection record or error record.</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>