<!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::PostgresSQLImplementation Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <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_1PostgresSQLImplementation.html">PostgresSQLImplementation</a> </div> </div> <div class="contents"> <h1>dtn::PostgresSQLImplementation Class Reference</h1><!-- doxytag: class="dtn::PostgresSQLImplementation" -->Postgres based implementation of SQL database. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="PostgresSQLImplementation_8h-source.html">PostgresSQLImplementation.h</a>></code> <p> <p> <a href="classdtn_1_1PostgresSQLImplementation-members.html">List of all members.</a><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_1PostgresSQLImplementation.html#319849abe65b627c99f76acfcffc2dc0">PostgresSQLImplementation</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_1PostgresSQLImplementation.html#db3dcaa6c882fc12231583f41ad604ee">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_1PostgresSQLImplementation.html#6fd02b3e466ade1afac0fbe530df9573">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_1PostgresSQLImplementation.html#b00fe01dcb7b230f089983b590c5ebf4">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_1PostgresSQLImplementation.html#33050e56684da7b1dc881fd3b603eb55">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_1PostgresSQLImplementation.html#d9121d84452c1329a854ed8441af1fb1">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_1PostgresSQLImplementation.html#9be4e918a737e9ca7546e8a306aaf3d3">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_1PostgresSQLImplementation.html#8e69ddb49e323810a933731351b69dac">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_1PostgresSQLImplementation.html#67f16791075d40ef1a9dfda51e0a41fa">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_1PostgresSQLImplementation.html#e4dca282c3ff70c518adadf03b0f6efd">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">PGconn * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1PostgresSQLImplementation.html#0eb33bd99e86b035f80f02e3f9478ef7">db_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">the db connection <a href="#0eb33bd99e86b035f80f02e3f9478ef7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">PGresult * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1PostgresSQLImplementation.html#9a2643c906576953393644dddcf90cac">query_result_</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Postgres based implementation of SQL database. <p>Definition at line <a class="el" href="PostgresSQLImplementation_8h-source.html#l00029">29</a> of file <a class="el" href="PostgresSQLImplementation_8h-source.html">PostgresSQLImplementation.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="319849abe65b627c99f76acfcffc2dc0"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::PostgresSQLImplementation" ref="319849abe65b627c99f76acfcffc2dc0" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::PostgresSQLImplementation::PostgresSQLImplementation </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="6fd02b3e466ade1afac0fbe530df9573"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::close" ref="6fd02b3e466ade1afac0fbe530df9573" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::PostgresSQLImplementation::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="db3dcaa6c882fc12231583f41ad604ee"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::connect" ref="db3dcaa6c882fc12231583f41ad604ee" args="(const char *dbname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::PostgresSQLImplementation::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="67f16791075d40ef1a9dfda51e0a41fa"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::escape_binary" ref="67f16791075d40ef1a9dfda51e0a41fa" 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::PostgresSQLImplementation::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="8e69ddb49e323810a933731351b69dac"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::escape_string" ref="8e69ddb49e323810a933731351b69dac" args="(const char *from)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::PostgresSQLImplementation::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="33050e56684da7b1dc881fd3b603eb55"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::exec_query" ref="33050e56684da7b1dc881fd3b603eb55" args="(const char *query)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::PostgresSQLImplementation::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="9be4e918a737e9ca7546e8a306aaf3d3"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::get_value" ref="9be4e918a737e9ca7546e8a306aaf3d3" args="(int tuple_no, int field_no)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::PostgresSQLImplementation::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="b00fe01dcb7b230f089983b590c5ebf4"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::has_table" ref="b00fe01dcb7b230f089983b590c5ebf4" 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::PostgresSQLImplementation::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="d9121d84452c1329a854ed8441af1fb1"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::num_tuples" ref="d9121d84452c1329a854ed8441af1fb1" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::PostgresSQLImplementation::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="e4dca282c3ff70c518adadf03b0f6efd"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::unescape_binary" ref="e4dca282c3ff70c518adadf03b0f6efd" args="(const u_char *from)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const u_char* dtn::PostgresSQLImplementation::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="0eb33bd99e86b035f80f02e3f9478ef7"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::db_" ref="0eb33bd99e86b035f80f02e3f9478ef7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PGconn* <a class="el" href="classdtn_1_1PostgresSQLImplementation.html#0eb33bd99e86b035f80f02e3f9478ef7">dtn::PostgresSQLImplementation::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="PostgresSQLImplementation_8h-source.html#l00051">51</a> of file <a class="el" href="PostgresSQLImplementation_8h-source.html">PostgresSQLImplementation.h</a>.</p> </div> </div><p> <a class="anchor" name="9a2643c906576953393644dddcf90cac"></a><!-- doxytag: member="dtn::PostgresSQLImplementation::query_result_" ref="9a2643c906576953393644dddcf90cac" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PGresult* <a class="el" href="classdtn_1_1PostgresSQLImplementation.html#9a2643c906576953393644dddcf90cac">dtn::PostgresSQLImplementation::query_result_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="PostgresSQLImplementation_8h-source.html#l00052">52</a> of file <a class="el" href="PostgresSQLImplementation_8h-source.html">PostgresSQLImplementation.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="PostgresSQLImplementation_8h-source.html">PostgresSQLImplementation.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 30 09:27:05 2009 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.8 </small></address> </body> </html>