<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>DTN Reference Implementation: dtn::MysqlSQLImplementation Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1MysqlSQLImplementation.html">MysqlSQLImplementation</a> </div> </div> <div class="contents"> <h1>dtn::MysqlSQLImplementation Class Reference</h1><!-- doxytag: class="dtn::MysqlSQLImplementation" --><code>#include <<a class="el" href="MysqlSQLImplementation_8h-source.html">MysqlSQLImplementation.h</a>></code> <p> <p> <a href="classdtn_1_1MysqlSQLImplementation-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Mysql based implementation of SQL database. <p>Definition at line <a class="el" href="MysqlSQLImplementation_8h-source.html#l00029">29</a> of file <a class="el" href="MysqlSQLImplementation_8h-source.html">MysqlSQLImplementation.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#3b95e1e37b1a90646689f06b65f733bd">MysqlSQLImplementation</a> ()</td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#55e3beb5a1f5b9f5fff8396af9689fc5">connect</a> (const char *dbname)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#e17659a65261562dbc9ccc9c7141a64e">close</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#ae9b20c43a1dd7654664b2d48a1aef06">has_table</a> (const char *tablename)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#4ebce3ca7226ab31dedbd1110ace8be1">exec_query</a> (const char *query)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#c3099994236bd60676b328f7f32e06be">num_tuples</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#63fc501408a95669e50f8f3c3fdd4fd9">get_value</a> (int tuple_no, int field_no)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#5fd44b104478ee8d5df306f360db7c9d">binary_datatype</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#9ac511f9688218e1dbcaf20eb296cda3">escape_string</a> (const char *from)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const u_char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#04b49f652997e0b8e342310bdf5e84ca">escape_binary</a> (const u_char *from, int from_length)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const u_char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#e866efe15a03bfdf6ba3c88c4b08a0c2">unescape_binary</a> (const u_char *from)</td></tr> <tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">MYSQL * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#a5c8dc0ebf6509ed65a3743b4618ca77">db_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">the db connection <a href="#a5c8dc0ebf6509ed65a3743b4618ca77"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">MYSQL_RES * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1MysqlSQLImplementation.html#e04e19caca70f793dac9501a5c1aadfa">query_result_</a></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="3b95e1e37b1a90646689f06b65f733bd"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::MysqlSQLImplementation" ref="3b95e1e37b1a90646689f06b65f733bd" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::MysqlSQLImplementation::MysqlSQLImplementation </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="55e3beb5a1f5b9f5fff8396af9689fc5"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::connect" ref="55e3beb5a1f5b9f5fff8396af9689fc5" args="(const char *dbname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::MysqlSQLImplementation::connect </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>dbname</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="e17659a65261562dbc9ccc9c7141a64e"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::close" ref="e17659a65261562dbc9ccc9c7141a64e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::MysqlSQLImplementation::close </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="ae9b20c43a1dd7654664b2d48a1aef06"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::has_table" ref="ae9b20c43a1dd7654664b2d48a1aef06" args="(const char *tablename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::MysqlSQLImplementation::has_table </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>tablename</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="4ebce3ca7226ab31dedbd1110ace8be1"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::exec_query" ref="4ebce3ca7226ab31dedbd1110ace8be1" args="(const char *query)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::MysqlSQLImplementation::exec_query </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>query</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="c3099994236bd60676b328f7f32e06be"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::num_tuples" ref="c3099994236bd60676b328f7f32e06be" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::MysqlSQLImplementation::num_tuples </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="63fc501408a95669e50f8f3c3fdd4fd9"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::get_value" ref="63fc501408a95669e50f8f3c3fdd4fd9" args="(int tuple_no, int field_no)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::MysqlSQLImplementation::get_value </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>tuple_no</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>field_no</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="5fd44b104478ee8d5df306f360db7c9d"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::binary_datatype" ref="5fd44b104478ee8d5df306f360db7c9d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::MysqlSQLImplementation::binary_datatype </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="9ac511f9688218e1dbcaf20eb296cda3"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::escape_string" ref="9ac511f9688218e1dbcaf20eb296cda3" args="(const char *from)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::MysqlSQLImplementation::escape_string </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>from</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="04b49f652997e0b8e342310bdf5e84ca"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::escape_binary" ref="04b49f652997e0b8e342310bdf5e84ca" args="(const u_char *from, int from_length)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const u_char* dtn::MysqlSQLImplementation::escape_binary </td> <td>(</td> <td class="paramtype">const u_char * </td> <td class="paramname"> <em>from</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>from_length</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <a class="anchor" name="e866efe15a03bfdf6ba3c88c4b08a0c2"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::unescape_binary" ref="e866efe15a03bfdf6ba3c88c4b08a0c2" args="(const u_char *from)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const u_char* dtn::MysqlSQLImplementation::unescape_binary </td> <td>(</td> <td class="paramtype">const u_char * </td> <td class="paramname"> <em>from</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual functions inherited from SQLImplementation </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="a5c8dc0ebf6509ed65a3743b4618ca77"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::db_" ref="a5c8dc0ebf6509ed65a3743b4618ca77" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MYSQL* <a class="el" href="classdtn_1_1MysqlSQLImplementation.html#a5c8dc0ebf6509ed65a3743b4618ca77">dtn::MysqlSQLImplementation::db_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> the db connection <p> <p>Definition at line <a class="el" href="MysqlSQLImplementation_8h-source.html#l00052">52</a> of file <a class="el" href="MysqlSQLImplementation_8h-source.html">MysqlSQLImplementation.h</a>.</p> </div> </div><p> <a class="anchor" name="e04e19caca70f793dac9501a5c1aadfa"></a><!-- doxytag: member="dtn::MysqlSQLImplementation::query_result_" ref="e04e19caca70f793dac9501a5c1aadfa" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MYSQL_RES* <a class="el" href="classdtn_1_1MysqlSQLImplementation.html#e04e19caca70f793dac9501a5c1aadfa">dtn::MysqlSQLImplementation::query_result_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="MysqlSQLImplementation_8h-source.html#l00053">53</a> of file <a class="el" href="MysqlSQLImplementation_8h-source.html">MysqlSQLImplementation.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="MysqlSQLImplementation_8h-source.html">MysqlSQLImplementation.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:55 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>