<!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::SQLStore 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_1SQLStore.html">SQLStore</a> </div> </div> <div class="contents"> <h1>dtn::SQLStore Class Reference</h1><!-- doxytag: class="dtn::SQLStore" --><!-- doxytag: inherits="dtn::PersistentStore" --><code>#include <<a class="el" href="SQLStore_8h-source.html">SQLStore.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for dtn::SQLStore:</div> <div class="dynsection"> <p><center><img src="classdtn_1_1SQLStore.png" usemap="#dtn::SQLStore_map" border="0" alt=""></center> <map name="dtn::SQLStore_map"> <area href="classdtn_1_1PersistentStore.html" alt="dtn::PersistentStore" shape="rect" coords="0,0,120,24"> </map> </div> <p> <a href="classdtn_1_1SQLStore-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> Implementation of a StorageManager with an underlying SQL database. <p>Definition at line <a class="el" href="SQLStore_8h-source.html#l00033">33</a> of file <a class="el" href="SQLStore_8h-source.html">SQLStore.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></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_1SQLStore.html#88b491808f01bb924556bc45d0bcd1d5">table_name_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <a href="#88b491808f01bb924556bc45d0bcd1d5"></a><br></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_1SQLStore.html#d45884fe2aef26d9bb21c70cd403a171">key_name_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Field name by which the objects are keyed. <a href="#d45884fe2aef26d9bb21c70cd403a171"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::SQLImplementation * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#3ac21b1c7b83baa5bacbcac387356477">sql_impl_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <a href="#3ac21b1c7b83baa5bacbcac387356477"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#e658972b34f6e008a90b58b1d97761da">close</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Close the table. <a href="#e658972b34f6e008a90b58b1d97761da"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#d6c75ed93ee9f1bad1dd63b782fc55ac">get</a> (oasys::SerializableObject *obj, const int key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get an obj (identified by key) from the sql store. <a href="#d6c75ed93ee9f1bad1dd63b782fc55ac"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#88ab4d56c234a37399ce8a0be748e095">put</a> (oasys::SerializableObject *obj, const int key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Store the object with the given key. <a href="#88ab4d56c234a37399ce8a0be748e095"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#a21ab0951e38b471c533401c79dbe087">add</a> (oasys::SerializableObject *obj, const int key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Put an obj in the sql store. <a href="#a21ab0951e38b471c533401c79dbe087"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#bbaa6642234705adf3fe5a2e0d157bb2">update</a> (oasys::SerializableObject *obj, const int key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Update the object's state in the sql store. <a href="#bbaa6642234705adf3fe5a2e0d157bb2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#ef53bb4baf876f7d747ad7d0ae3b7889">del</a> (const int key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Delete an obj (identified by key). <a href="#ef53bb4baf876f7d747ad7d0ae3b7889"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#57f01f62cff0806c2b9a895f8ce6d430">num_elements</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return number of elements in the store. <a href="#57f01f62cff0806c2b9a895f8ce6d430"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#6e58acdb3c6d58d1e8578d6346a0fe74">keys</a> (std::vector< int > *l)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return list of keys for all elements in the store. <a href="#6e58acdb3c6d58d1e8578d6346a0fe74"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#f2c2581a726c6ff3d7a24effac94013c">exists</a> (const int id)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <a href="#f2c2581a726c6ff3d7a24effac94013c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#a139f635213aaf30dfe70661592cc9ab">elements</a> (oasys::SerializableObjectVector *elements)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract all elements from the store, potentially matching the "where" clause. <a href="#a139f635213aaf30dfe70661592cc9ab"></a><br></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_1SQLStore.html#6d8cec258be1296e5dc3a0d23180cecc">table_name</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the table name associated with this store. <a href="#6d8cec258be1296e5dc3a0d23180cecc"></a><br></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_1SQLStore.html#c776c04ade8e2aabd2525bbd62fd1530">has_table</a> (const char *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks if the table already exists. <a href="#c776c04ade8e2aabd2525bbd62fd1530"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#f62b2fe2426008579d36c59c021396a4">create_table</a> (oasys::SerializableObject *obj)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates table a table in the store for objects which has the same type as obj. <a href="#f62b2fe2426008579d36c59c021396a4"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#bb5d4d8859c45b952824464ece27aaec">exec_query</a> (const char *query)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Executes the given query. <a href="#bb5d4d8859c45b952824464ece27aaec"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1SQLStore.html#82fe00e1e7773a5b1ffe9aa16c01ba54">set_key_name</a> (const char *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set's the key name. <a href="#82fe00e1e7773a5b1ffe9aa16c01ba54"></a><br></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_1SQLStore.html#b030b66affcf610886797093d65242b0">SQLStore</a> (const char *table_name, oasys::SQLImplementation *db)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> with specfied table_name. <a href="#b030b66affcf610886797093d65242b0"></a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="b030b66affcf610886797093d65242b0"></a><!-- doxytag: member="dtn::SQLStore::SQLStore" ref="b030b66affcf610886797093d65242b0" args="(const char *table_name, oasys::SQLImplementation *db)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::SQLStore::SQLStore </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>table_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">oasys::SQLImplementation * </td> <td class="paramname"> <em>db</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Create a <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> with specfied table_name. <p> Parameter db, points to the actual implementation to which different queries are forwarded </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="e658972b34f6e008a90b58b1d97761da"></a><!-- doxytag: member="dtn::SQLStore::close" ref="e658972b34f6e008a90b58b1d97761da" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::close </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Close the table. <p> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#a978192e43db411366df9d21496034ef">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="d6c75ed93ee9f1bad1dd63b782fc55ac"></a><!-- doxytag: member="dtn::SQLStore::get" ref="d6c75ed93ee9f1bad1dd63b782fc55ac" args="(oasys::SerializableObject *obj, const int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::get </td> <td>(</td> <td class="paramtype">oasys::SerializableObject * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"> <em>key</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get an obj (identified by key) from the sql store. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#5ada8bde2488710e184c0110f9e25d70">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="88ab4d56c234a37399ce8a0be748e095"></a><!-- doxytag: member="dtn::SQLStore::put" ref="88ab4d56c234a37399ce8a0be748e095" args="(oasys::SerializableObject *obj, const int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::put </td> <td>(</td> <td class="paramtype">oasys::SerializableObject * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"> <em>key</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Store the object with the given key. <p> </div> </div><p> <a class="anchor" name="a21ab0951e38b471c533401c79dbe087"></a><!-- doxytag: member="dtn::SQLStore::add" ref="a21ab0951e38b471c533401c79dbe087" args="(oasys::SerializableObject *obj, const int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::add </td> <td>(</td> <td class="paramtype">oasys::SerializableObject * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"> <em>key</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Put an obj in the sql store. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#6229ffd0247027c890ba928744d38996">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="bbaa6642234705adf3fe5a2e0d157bb2"></a><!-- doxytag: member="dtn::SQLStore::update" ref="bbaa6642234705adf3fe5a2e0d157bb2" args="(oasys::SerializableObject *obj, const int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::update </td> <td>(</td> <td class="paramtype">oasys::SerializableObject * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"> <em>key</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Update the object's state in the sql store. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>number updated on success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#7006bf2e5f1224f23878954832bfd3b6">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="ef53bb4baf876f7d747ad7d0ae3b7889"></a><!-- doxytag: member="dtn::SQLStore::del" ref="ef53bb4baf876f7d747ad7d0ae3b7889" args="(const int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::del </td> <td>(</td> <td class="paramtype">const int </td> <td class="paramname"> <em>key</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Delete an obj (identified by key). <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#a61eb5143c8adf19c8d4fe33b26c21ad">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="57f01f62cff0806c2b9a895f8ce6d430"></a><!-- doxytag: member="dtn::SQLStore::num_elements" ref="57f01f62cff0806c2b9a895f8ce6d430" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::num_elements </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return number of elements in the store. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>number of elements if success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#78c30bf1080f18bb2b17601b49ec490b">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="6e58acdb3c6d58d1e8578d6346a0fe74"></a><!-- doxytag: member="dtn::SQLStore::keys" ref="6e58acdb3c6d58d1e8578d6346a0fe74" args="(std::vector< int > *l)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::SQLStore::keys </td> <td>(</td> <td class="paramtype">std::vector< int > * </td> <td class="paramname"> <em>l</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return list of keys for all elements in the store. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> <p>Implements <a class="el" href="classdtn_1_1PersistentStore.html#aef07688ef23ad3e0904198cf7ba142a">dtn::PersistentStore</a>.</p> </div> </div><p> <a class="anchor" name="f2c2581a726c6ff3d7a24effac94013c"></a><!-- doxytag: member="dtn::SQLStore::exists" ref="f2c2581a726c6ff3d7a24effac94013c" args="(const int id)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::exists </td> <td>(</td> <td class="paramtype">const int </td> <td class="paramname"> <em>id</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <p> </div> </div><p> <a class="anchor" name="a139f635213aaf30dfe70661592cc9ab"></a><!-- doxytag: member="dtn::SQLStore::elements" ref="a139f635213aaf30dfe70661592cc9ab" args="(oasys::SerializableObjectVector *elements)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::elements </td> <td>(</td> <td class="paramtype">oasys::SerializableObjectVector * </td> <td class="paramname"> <em>elements</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Extract all elements from the store, potentially matching the "where" clause. <p> For each matching element, initialize the corresponding object in the vector with the values from the database.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>count of extracted elements, or -1 on error </dd></dl> </div> </div><p> <a class="anchor" name="6d8cec258be1296e5dc3a0d23180cecc"></a><!-- doxytag: member="dtn::SQLStore::table_name" ref="6d8cec258be1296e5dc3a0d23180cecc" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* dtn::SQLStore::table_name </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the table name associated with this store. <p> </div> </div><p> <a class="anchor" name="c776c04ade8e2aabd2525bbd62fd1530"></a><!-- doxytag: member="dtn::SQLStore::has_table" ref="c776c04ade8e2aabd2525bbd62fd1530" args="(const char *name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::SQLStore::has_table </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Checks if the table already exists. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>true if table exits, false otherwise </dd></dl> </div> </div><p> <a class="anchor" name="f62b2fe2426008579d36c59c021396a4"></a><!-- doxytag: member="dtn::SQLStore::create_table" ref="f62b2fe2426008579d36c59c021396a4" args="(oasys::SerializableObject *obj)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::create_table </td> <td>(</td> <td class="paramtype">oasys::SerializableObject * </td> <td class="paramname"> <em>obj</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Creates table a table in the store for objects which has the same type as obj. <p> Checks if the table already exists. <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> </div> </div><p> <a class="anchor" name="bb5d4d8859c45b952824464ece27aaec"></a><!-- doxytag: member="dtn::SQLStore::exec_query" ref="bb5d4d8859c45b952824464ece27aaec" args="(const char *query)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int dtn::SQLStore::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> Executes the given query. <p> Essentially forwards the query to data_base_pointer_ <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if success, -1 on error </dd></dl> </div> </div><p> <a class="anchor" name="82fe00e1e7773a5b1ffe9aa16c01ba54"></a><!-- doxytag: member="dtn::SQLStore::set_key_name" ref="82fe00e1e7773a5b1ffe9aa16c01ba54" args="(const char *name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::SQLStore::set_key_name </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Set's the key name. <p> The key name is used in all functions which need to create a query which refers to key. Must be initialized for proper operation. </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="88b491808f01bb924556bc45d0bcd1d5"></a><!-- doxytag: member="dtn::SQLStore::table_name_" ref="88b491808f01bb924556bc45d0bcd1d5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* <a class="el" href="classdtn_1_1SQLStore.html#88b491808f01bb924556bc45d0bcd1d5">dtn::SQLStore::table_name_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <p> <p>Definition at line <a class="el" href="SQLStore_8h-source.html#l00143">143</a> of file <a class="el" href="SQLStore_8h-source.html">SQLStore.h</a>.</p> </div> </div><p> <a class="anchor" name="d45884fe2aef26d9bb21c70cd403a171"></a><!-- doxytag: member="dtn::SQLStore::key_name_" ref="d45884fe2aef26d9bb21c70cd403a171" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* <a class="el" href="classdtn_1_1SQLStore.html#d45884fe2aef26d9bb21c70cd403a171">dtn::SQLStore::key_name_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Field name by which the objects are keyed. <p> <p>Definition at line <a class="el" href="SQLStore_8h-source.html#l00148">148</a> of file <a class="el" href="SQLStore_8h-source.html">SQLStore.h</a>.</p> </div> </div><p> <a class="anchor" name="3ac21b1c7b83baa5bacbcac387356477"></a><!-- doxytag: member="dtn::SQLStore::sql_impl_" ref="3ac21b1c7b83baa5bacbcac387356477" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">oasys::SQLImplementation* <a class="el" href="classdtn_1_1SQLStore.html#3ac21b1c7b83baa5bacbcac387356477">dtn::SQLStore::sql_impl_</a><code> [private]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> Name of the table in the database to which this <a class="el" href="classdtn_1_1SQLStore.html" title="Implementation of a StorageManager with an underlying SQL database.">SQLStore</a> corresponds. <p> <p>Definition at line <a class="el" href="SQLStore_8h-source.html#l00150">150</a> of file <a class="el" href="SQLStore_8h-source.html">SQLStore.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="SQLStore_8h-source.html">SQLStore.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>