Packages
Erlang/Elixir Cloud Framework MySQL Service
Current section
Files
Jump to
Current section
Files
doc/cloudi_service_db_mysql.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 cloudi_service_db_mysql</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 cloudi_service_db_mysql</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>
<h3><a name="CloudI_MySQL_Data_Module">CloudI MySQL Data Module</a></h3>.
<p>Copyright © 2009-2014 Michael Truog</p>
<p><b>Version:</b> 1.4.0 Dec 20 2014 16:06:27
------------------------------------------------------------------------</p>
<p><b>Behaviours:</b> <a href="deps/cloudi_core/doc/cloudi_service.html"><tt>cloudi_service</tt></a>.</p>
<p><b>Authors:</b> Michael Truog (<a href="mailto:mjtruog [at] gmail (dot) com"><tt>mjtruog [at] gmail (dot) com</tt></a>).</p>
<h2><a name="description">Description</a></h2>
<h3><a name="CloudI_MySQL_Data_Module">CloudI MySQL Data Module</a></h3>
<h2><a name="types">Data Types</a></h2>
<h3 class="typedecl"><a name="type-common_result">common_result()</a></h3>
<p><tt>common_result() = {updated, <a href="#type-count">count()</a>} | {selected, <a href="#type-rows">rows()</a>} | {error, any()}</tt></p>
<h3 class="typedecl"><a name="type-count">count()</a></h3>
<p><tt>count() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-dispatcher">dispatcher()</a></h3>
<p><tt>dispatcher() = <a href="deps/cloudi_core/doc/cloudi_service.html#type-dispatcher">cloudi_service:dispatcher()</a> | <a href="deps/cloudi_core/doc/cloudi.html#type-context">cloudi:context()</a></tt></p>
<h3 class="typedecl"><a name="type-rows">rows()</a></h3>
<p><tt>rows() = [tuple()]</tt></p>
<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="#cloudi_service_handle_info-3">cloudi_service_handle_info/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#cloudi_service_handle_request-11">cloudi_service_handle_request/11</a></td><td></td></tr>
<tr><td valign="top"><a href="#cloudi_service_init-4">cloudi_service_init/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#cloudi_service_terminate-3">cloudi_service_terminate/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#equery-4">equery/4</a></td><td>
<h4><a name="Perform_an_extended_SQL_query_that_does_string_substitution_with_'?'s.">Perform an extended SQL query that does string substitution with '?'s.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#equery-5">equery/5</a></td><td>
<h4><a name="Perform_an_extended_SQL_query_that_does_string_substitution_with_'?'s_using_a_timeout.">Perform an extended SQL query that does string substitution with '?'s using a timeout.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#execute_query-4">execute_query/4</a></td><td>
<h4><a name="Execute_a_query_that_has_already_been_prepared.">Execute a query that has already been prepared.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#execute_query-5">execute_query/5</a></td><td>
<h4><a name="Execute_a_query_that_has_already_been_prepared_with_a_timeout.">Execute a query that has already been prepared with a timeout.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#prepare_query-4">prepare_query/4</a></td><td>
<h4><a name="Prepare_a_query_with_'?'s_for_dynamic_values.">Prepare a query with '?'s for dynamic values.</a></h4>
The query can be used in the future with the supplied Identifier atom.</td></tr>
<tr><td valign="top"><a href="#prepare_query-5">prepare_query/5</a></td><td>
<h4><a name="Prepare_a_query_with_'?'s_for_dynamic_values_using_a_timeout.">Prepare a query with '?'s for dynamic values using a timeout.</a></h4>
The query can be used in the future with the supplied Identifier atom.</td></tr>
<tr><td valign="top"><a href="#squery-3">squery/3</a></td><td>
<h4><a name="Perform_a_simple_SQL_string_query.">Perform a simple SQL string query.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#squery-4">squery/4</a></td><td>
<h4><a name="Perform_a_simple_SQL_string_query_with_a_timeout.">Perform a simple SQL string query with a timeout.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#transaction-3">transaction/3</a></td><td>
<h4><a name="A_list_of_SQL_simple_query_for_a_transaction.">A list of SQL simple query for a transaction.</a></h4>.</td></tr>
<tr><td valign="top"><a href="#transaction-4">transaction/4</a></td><td>
<h4><a name="A_list_of_SQL_simple_query_for_a_transaction_with_a_timeout.">A list of SQL simple query for a transaction with a timeout.</a></h4>.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="cloudi_service_handle_info-3">cloudi_service_handle_info/3</a></h3>
<div class="spec">
<p><tt>cloudi_service_handle_info(Request, State, Dispatcher) -> any()</tt></p>
</div>
<h3 class="function"><a name="cloudi_service_handle_request-11">cloudi_service_handle_request/11</a></h3>
<div class="spec">
<p><tt>cloudi_service_handle_request(Type, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()</tt></p>
</div>
<h3 class="function"><a name="cloudi_service_init-4">cloudi_service_init/4</a></h3>
<div class="spec">
<p><tt>cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()</tt></p>
</div>
<h3 class="function"><a name="cloudi_service_terminate-3">cloudi_service_terminate/3</a></h3>
<div class="spec">
<p><tt>cloudi_service_terminate(Reason, Timeout, State) -> any()</tt></p>
</div>
<h3 class="function"><a name="equery-4">equery/4</a></h3>
<div class="spec">
<p><tt>equery(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Query::string() | binary(), Parameters::list()) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Perform_an_extended_SQL_query_that_does_string_substitution_with_'?'s.">Perform an extended SQL query that does string substitution with '?'s.</a></h4>
</p>
<h3 class="function"><a name="equery-5">equery/5</a></h3>
<div class="spec">
<p><tt>equery(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Query::string() | binary(), Parameters::list(), Timeout::<a href="deps/cloudi_core/doc/cloudi_service.html#type-timeout_milliseconds">cloudi_service:timeout_milliseconds()</a>) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Perform_an_extended_SQL_query_that_does_string_substitution_with_'?'s_using_a_timeout.">Perform an extended SQL query that does string substitution with '?'s using a timeout.</a></h4>
</p>
<h3 class="function"><a name="execute_query-4">execute_query/4</a></h3>
<div class="spec">
<p><tt>execute_query(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Identifier::atom(), Arguments::list()) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Execute_a_query_that_has_already_been_prepared.">Execute a query that has already been prepared.</a></h4>
</p>
<h3 class="function"><a name="execute_query-5">execute_query/5</a></h3>
<div class="spec">
<p><tt>execute_query(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Identifier::atom(), Arguments::list(), Timeout::<a href="deps/cloudi_core/doc/cloudi_service.html#type-timeout_milliseconds">cloudi_service:timeout_milliseconds()</a>) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Execute_a_query_that_has_already_been_prepared_with_a_timeout.">Execute a query that has already been prepared with a timeout.</a></h4>
</p>
<h3 class="function"><a name="prepare_query-4">prepare_query/4</a></h3>
<div class="spec">
<p><tt>prepare_query(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Identifier::atom(), Query::string() | binary()) -> {ok, ok} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Prepare_a_query_with_'?'s_for_dynamic_values.">Prepare a query with '?'s for dynamic values.</a></h4>
The query can be used in the future with the supplied Identifier atom.</p>
<h3 class="function"><a name="prepare_query-5">prepare_query/5</a></h3>
<div class="spec">
<p><tt>prepare_query(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Identifier::atom(), Query::string() | binary(), Timeout::<a href="deps/cloudi_core/doc/cloudi_service.html#type-timeout_milliseconds">cloudi_service:timeout_milliseconds()</a>) -> {ok, ok} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Prepare_a_query_with_'?'s_for_dynamic_values_using_a_timeout.">Prepare a query with '?'s for dynamic values using a timeout.</a></h4>
The query can be used in the future with the supplied Identifier atom.</p>
<h3 class="function"><a name="squery-3">squery/3</a></h3>
<div class="spec">
<p><tt>squery(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Query::string() | binary()) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Perform_a_simple_SQL_string_query.">Perform a simple SQL string query.</a></h4>
</p>
<h3 class="function"><a name="squery-4">squery/4</a></h3>
<div class="spec">
<p><tt>squery(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, Query::string() | binary(), Timeout::<a href="deps/cloudi_core/doc/cloudi_service.html#type-timeout_milliseconds">cloudi_service:timeout_milliseconds()</a>) -> {ok, any()} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="Perform_a_simple_SQL_string_query_with_a_timeout.">Perform a simple SQL string query with a timeout.</a></h4>
</p>
<h3 class="function"><a name="transaction-3">transaction/3</a></h3>
<div class="spec">
<p><tt>transaction(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, QueryList::[string() | binary()]) -> {ok, ok | {error, any()}} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="A_list_of_SQL_simple_query_for_a_transaction.">A list of SQL simple query for a transaction.</a></h4>
</p>
<h3 class="function"><a name="transaction-4">transaction/4</a></h3>
<div class="spec">
<p><tt>transaction(Dispatcher::<a href="#type-dispatcher">dispatcher()</a>, Name::<a href="deps/cloudi_core/doc/cloudi_service.html#type-service_name">cloudi_service:service_name()</a>, QueryList::[string() | binary()], Timeout::<a href="deps/cloudi_core/doc/cloudi_service.html#type-timeout_milliseconds">cloudi_service:timeout_milliseconds()</a>) -> {ok, ok | {error, any()}} | {error, any()}</tt><br></p>
</div><p>
<h4><a name="A_list_of_SQL_simple_query_for_a_transaction_with_a_timeout.">A list of SQL simple query for a transaction with a timeout.</a></h4>
</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, Dec 20 2014, 16:06:27.</i></p>
</body>
</html>