<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libgdamm: Gnome::Gda::Statement Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libgdamm  <span id="projectnumber">4.99.6</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1-20110925 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</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> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGnome.html">Gnome</a> </li> <li class="navelem"><a class="el" href="namespaceGnome_1_1Gda.html">Gda</a> </li> <li class="navelem"><a class="el" href="classGnome_1_1Gda_1_1Statement.html">Statement</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <div class="title">Gnome::Gda::Statement Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="Gnome::Gda::Statement" --><!-- doxytag: inherits="Glib::Object" --> <p>Single SQL statement. <a href="classGnome_1_1Gda_1_1Statement.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for Gnome::Gda::Statement:</div> <div class="dyncontent"> <div class="center"><img src="classGnome_1_1Gda_1_1Statement__inherit__graph.png" border="0" usemap="#Gnome_1_1Gda_1_1Statement_inherit__map" alt="Inheritance graph"/></div> <map name="Gnome_1_1Gda_1_1Statement_inherit__map" id="Gnome_1_1Gda_1_1Statement_inherit__map"> <area shape="rect" id="node2" /></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for Gnome::Gda::Statement:</div> <div class="dyncontent"> <div class="center"><img src="classGnome_1_1Gda_1_1Statement__coll__graph.png" border="0" usemap="#Gnome_1_1Gda_1_1Statement_coll__map" alt="Collaboration graph"/></div> <map name="Gnome_1_1Gda_1_1Statement_coll__map" id="Gnome_1_1Gda_1_1Statement_coll__map"> <area shape="rect" id="node2" /></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGnome_1_1Gda_1_1Statement-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-types"></a> Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="elRef" /> <a class="elRef" >HolderVector</a></td></tr> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#ae5ee3af3f8a6e43f2d593b31eaf73cad">~Statement</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GdaStatement* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a9388295d810f81813bec555a275ba6fb">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a9388295d810f81813bec555a275ba6fb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GdaStatement* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a514c389041a51a92603068954cc8a55f">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a514c389041a51a92603068954cc8a55f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GdaStatement* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a65eb073c5a29d24d6997ffc2a2f88b3d">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#a65eb073c5a29d24d6997ffc2a2f88b3d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >copy</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="#a1623882f5e0bb7d565a07a5aec8f5e71"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >serialize</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a string representing the contents of <em>stmt</em>. <a href="#ac80368722ef328c6c623694a6c4ec94d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a8dad51a8ddb41ae5d1f67b81e777471c">get_parameters</a> (<a class="elRef" >Set</a> >& out_params)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a new <a class="el" href="classGnome_1_1Gda_1_1Set.html" title="Container for several values.">Gda::Set</a> object which groups all the execution parameters which <em>stmt</em> needs. <a href="#a8dad51a8ddb41ae5d1f67b81e777471c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >to_sql</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >Set</a> >& params) const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >HolderVector</a>& params_used) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Renders <em>stmt</em> as an SQL statement, with some control on how it is rendered. <a href="#a2c25f84481cefa8b887f298483eff5e2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__libgdammEnums.html#ga6486682ec362b106fb5ad2807a68b155">SqlStatementType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a743226b2c98d269aca41c44a16a36ba2">get_statement_type</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the type of statement held by <em>stmt</em>. <a href="#a743226b2c98d269aca41c44a16a36ba2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a7f8e6128737394e10bcd883e55c81631">is_useless</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tells if <em>stmt</em> is composed only of spaces (that is it has no real SQL code), and is completely useless as such. <a href="#a7f8e6128737394e10bcd883e55c81631"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#ae6975ee84ef0e618f1ff2ba016d57f45">check_structure</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks that <em>stmt's</em> structure is correct. <a href="#ae6975ee84ef0e618f1ff2ba016d57f45"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#ac2348f0cf35f52fdc22e4f7cd0469a38">check_validity</a> (const <a class="elRef" >Connection</a> >& cnc) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">If <em>cnc</em> is not <code>0</code> then checks that every object (table, field, function) used in <em>stmt</em> actually exists in <em>cnc's</em> database. <a href="#ac2348f0cf35f52fdc22e4f7cd0469a38"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#af9100e035d3b1112bbad8e101e6ce34c">normalize</a> (const <a class="elRef" >Connection</a> >& cnc)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">"Normalizes" some parts of <em>stmt</em>, see gda_sql_statement_normalize() for more information. <a href="#af9100e035d3b1112bbad8e101e6ce34c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >property_structure</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">You rarely need to use properties because there are get_ and set_ methods for almost all of them. <a href="#a9d6c9f25e6116e7a45b2bf9e26c25020"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" /> < gpointer > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a5c052eaa9bf3a35454eb3147a6a07e0b">property_structure</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">You rarely need to use properties because there are get_ and set_ methods for almost all of them. <a href="#a5c052eaa9bf3a35454eb3147a6a07e0b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" /> const <a class="elRef" /> &, bool > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a1c2aa2e008a973eb0ed8227ebd5dbfc2">signal_checked</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >signal_reset</a> ()</td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" >create</a> ()</td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#aee0cefa8a3bcf0f43a562d037ce036a9">Statement</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a6caa6ce89c63fa08017e32f457932dd6">on_checked</a> (const <a class="elRef" >Connection</a> >& cnc, bool valid)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a01f715fa0529d35522d41ad9021bd21f">on_reset</a> ()</td></tr> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p> </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" /> < <a class="el" href="classGnome_1_1Gda_1_1Statement.html">Gnome::Gda::Statement</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1Statement.html#a24c790ac366af8523e267708b182a91c">wrap</a> (GdaStatement* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" ></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Single SQL statement. </p> <p>The <a class="el" href="classGnome_1_1Gda_1_1Statement.html" title="Single SQL statement.">Gda::Statement</a> represents a single SQL statement (multiple statements can be grouped in a <a class="el" href="classGnome_1_1Gda_1_1Batch.html" title="Multiple SQL statements grouped together.">Batch</a> object).</p> <p>A <a class="el" href="classGnome_1_1Gda_1_1Statement.html" title="Single SQL statement.">Gda::Statement</a> can either be built "manually" by building a <a class="el" href="classGnome_1_1Gda_1_1SqlStatement.html" title="Every SQL statement can be decomposed in the SqlStatement tree structure.">Gda::SqlStatement</a> structure, or from an SQL statement using a <a class="el" href="classGnome_1_1Gda_1_1SqlParser.html" title="SQL parser.">Gda::SqlParser</a> object. A GdaConnection can use a GdaStatement to:</p> <ul> <li>prepare it for a future execution, the preparation step involves converting the GdaStatement object into a structure used by the database's own API, see <a class="el" href="classGnome_1_1Gda_1_1Connection.html#a8e1e9564b4276863200c7247c08b9bf9" title="Ask the database accessed through the cnc connection to prepare the usage of stmt.">Gda::Connection::statement_prepare()</a></li> <li>execute it using <a class="el" href="classGnome_1_1Gda_1_1Connection.html#a2940cb7e83054daa66afe1cbc81e0d6d" title="Executes a selection command on the given connection.">Gda::Connection::statement_execute_select()</a> if it is known that the statement is a selection statement, <a class="el" href="classGnome_1_1Gda_1_1Connection.html#a6f227e6cd8ccb533f550c166fde71e84" title="Executes a non-selection statement on the given connection.">Gda::Connection::statement_execute_non_select()</a> if it is not a selection statement, or <a class="el" href="classGnome_1_1Gda_1_1Connection.html#af37c928698ef044666772544f8652ec9" title="Executes stmt.">Gda::Connection::statement_execute()</a> when the type of expected result is unknown. Note that it is possible to use the same <a class="el" href="classGnome_1_1Gda_1_1Statement.html" title="Single SQL statement.">Gda::Statement</a> object at the same time with several <a class="el" href="classGnome_1_1Gda_1_1Connection.html" title="Manages a connection to a data source.">Gda::Connection</a> objects. </li> </ul> </div><hr/><h2>Member Typedef Documentation</h2> <a class="anchor" id="ad99d9f69a6d6caefe73bf39645bd78f5"></a><!-- doxytag: member="Gnome::Gda::Statement::HolderVector" ref="ad99d9f69a6d6caefe73bf39645bd78f5" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="elRef" >Gnome::Gda::Statement::HolderVector</a></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="ae5ee3af3f8a6e43f2d593b31eaf73cad"></a><!-- doxytag: member="Gnome::Gda::Statement::~Statement" ref="ae5ee3af3f8a6e43f2d593b31eaf73cad" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gnome::Gda::Statement::~Statement </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aee0cefa8a3bcf0f43a562d037ce036a9"></a><!-- doxytag: member="Gnome::Gda::Statement::Statement" ref="aee0cefa8a3bcf0f43a562d037ce036a9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gnome::Gda::Statement::Statement </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ae6975ee84ef0e618f1ff2ba016d57f45"></a><!-- doxytag: member="Gnome::Gda::Statement::check_structure" ref="ae6975ee84ef0e618f1ff2ba016d57f45" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gnome::Gda::Statement::check_structure </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Checks that <em>stmt's</em> structure is correct. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if <em>stmt's</em> structure is correct. </dd></dl> </div> </div> <a class="anchor" id="ac2348f0cf35f52fdc22e4f7cd0469a38"></a><!-- doxytag: member="Gnome::Gda::Statement::check_validity" ref="ac2348f0cf35f52fdc22e4f7cd0469a38" args="(const Glib::RefPtr< Connection > &cnc) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gnome::Gda::Statement::check_validity </td> <td>(</td> <td class="paramtype">const <a class="elRef" >Connection</a> >& </td> <td class="paramname"><em>cnc</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>If <em>cnc</em> is not <code>0</code> then checks that every object (table, field, function) used in <em>stmt</em> actually exists in <em>cnc's</em> database. </p> <p>If <em>cnc</em> is <code>0</code>, then cleans anything related to <em>cnc</em> in <em>stmt</em>.</p> <p>See gda_sql_statement_check_validity() for more information. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cnc</td><td>A <a class="el" href="classGnome_1_1Gda_1_1Connection.html" title="Manages a connection to a data source.">Gda::Connection</a> object, or <code>0</code>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if every object actually exists in <em>cnc's</em> database. </dd></dl> </div> </div> <a class="anchor" id="a1623882f5e0bb7d565a07a5aec8f5e71"></a><!-- doxytag: member="Gnome::Gda::Statement::copy" ref="a1623882f5e0bb7d565a07a5aec8f5e71" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Statement</a>> Gnome::Gda::Statement::copy </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Copy constructor. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A the new copy of <em>orig</em>. </dd></dl> </div> </div> <a class="anchor" id="abe40ab1168945178d9ab0d5502c25bb1"></a><!-- doxytag: member="Gnome::Gda::Statement::create" ref="abe40ab1168945178d9ab0d5502c25bb1" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="elRef" >Statement</a>> Gnome::Gda::Statement::create </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a8dad51a8ddb41ae5d1f67b81e777471c"></a><!-- doxytag: member="Gnome::Gda::Statement::get_parameters" ref="a8dad51a8ddb41ae5d1f67b81e777471c" args="(Glib::RefPtr< Set > &out_params)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gnome::Gda::Statement::get_parameters </td> <td>(</td> <td class="paramtype"><a class="elRef" >Set</a> >& </td> <td class="paramname"><em>out_params</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get a new <a class="el" href="classGnome_1_1Gda_1_1Set.html" title="Container for several values.">Gda::Set</a> object which groups all the execution parameters which <em>stmt</em> needs. </p> <p>This new object is returned though <em>out_params</em>.</p> <p>Note that if <em>stmt</em> does not need any parameter, then <em>out_params</em> is set to <code>0</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">out_params</td><td>A place to store a new <a class="el" href="classGnome_1_1Gda_1_1Set.html" title="Container for several values.">Gda::Set</a> object, or <code>0</code>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if no error occurred. </dd></dl> </div> </div> <a class="anchor" id="a743226b2c98d269aca41c44a16a36ba2"></a><!-- doxytag: member="Gnome::Gda::Statement::get_statement_type" ref="a743226b2c98d269aca41c44a16a36ba2" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__libgdammEnums.html#ga6486682ec362b106fb5ad2807a68b155">SqlStatementType</a> Gnome::Gda::Statement::get_statement_type </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get the type of statement held by <em>stmt</em>. </p> <p>It returns GDA_SQL_STATEMENT_NONE if <em>stmt</em> does not hold any statement </p> <dl class="return"><dt><b>Returns:</b></dt><dd>The statement type. </dd></dl> </div> </div> <a class="anchor" id="a9388295d810f81813bec555a275ba6fb"></a><!-- doxytag: member="Gnome::Gda::Statement::gobj" ref="a9388295d810f81813bec555a275ba6fb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GdaStatement* Gnome::Gda::Statement::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="elRef" >Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="a514c389041a51a92603068954cc8a55f"></a><!-- doxytag: member="Gnome::Gda::Statement::gobj" ref="a514c389041a51a92603068954cc8a55f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GdaStatement* Gnome::Gda::Statement::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="elRef" >Glib::ObjectBase</a>.</p> </div> </div> <a class="anchor" id="a65eb073c5a29d24d6997ffc2a2f88b3d"></a><!-- doxytag: member="Gnome::Gda::Statement::gobj_copy" ref="a65eb073c5a29d24d6997ffc2a2f88b3d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GdaStatement* Gnome::Gda::Statement::gobj_copy </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="a7f8e6128737394e10bcd883e55c81631"></a><!-- doxytag: member="Gnome::Gda::Statement::is_useless" ref="a7f8e6128737394e10bcd883e55c81631" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gnome::Gda::Statement::is_useless </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Tells if <em>stmt</em> is composed only of spaces (that is it has no real SQL code), and is completely useless as such. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if executing <em>stmt</em> does nothing. </dd></dl> </div> </div> <a class="anchor" id="af9100e035d3b1112bbad8e101e6ce34c"></a><!-- doxytag: member="Gnome::Gda::Statement::normalize" ref="af9100e035d3b1112bbad8e101e6ce34c" args="(const Glib::RefPtr< Connection > &cnc)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gnome::Gda::Statement::normalize </td> <td>(</td> <td class="paramtype">const <a class="elRef" >Connection</a> >& </td> <td class="paramname"><em>cnc</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>"Normalizes" some parts of <em>stmt</em>, see gda_sql_statement_normalize() for more information. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cnc</td><td>A <a class="el" href="classGnome_1_1Gda_1_1Connection.html" title="Manages a connection to a data source.">Gda::Connection</a> object. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if no error occurred. </dd></dl> </div> </div> <a class="anchor" id="a6caa6ce89c63fa08017e32f457932dd6"></a><!-- doxytag: member="Gnome::Gda::Statement::on_checked" ref="a6caa6ce89c63fa08017e32f457932dd6" args="(const Glib::RefPtr< Connection > &cnc, bool valid)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Gda::Statement::on_checked </td> <td>(</td> <td class="paramtype">const <a class="elRef" >Connection</a> >& </td> <td class="paramname"><em>cnc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>valid</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a01f715fa0529d35522d41ad9021bd21f"></a><!-- doxytag: member="Gnome::Gda::Statement::on_reset" ref="a01f715fa0529d35522d41ad9021bd21f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gnome::Gda::Statement::on_reset </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a9d6c9f25e6116e7a45b2bf9e26c25020"></a><!-- doxytag: member="Gnome::Gda::Statement::property_structure" ref="a9d6c9f25e6116e7a45b2bf9e26c25020" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::PropertyProxy</a><gpointer> Gnome::Gda::Statement::property_structure </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>You rarely need to use properties because there are get_ and set_ methods for almost all of them. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div> <a class="anchor" id="a5c052eaa9bf3a35454eb3147a6a07e0b"></a><!-- doxytag: member="Gnome::Gda::Statement::property_structure" ref="a5c052eaa9bf3a35454eb3147a6a07e0b" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::PropertyProxy_ReadOnly</a><gpointer> Gnome::Gda::Statement::property_structure </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>You rarely need to use properties because there are get_ and set_ methods for almost all of them. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div> <a class="anchor" id="ac80368722ef328c6c623694a6c4ec94d"></a><!-- doxytag: member="Gnome::Gda::Statement::serialize" ref="ac80368722ef328c6c623694a6c4ec94d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::ustring</a> Gnome::Gda::Statement::serialize </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Creates a string representing the contents of <em>stmt</em>. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A string containing the serialized version of <em>stmt</em>. </dd></dl> </div> </div> <a class="anchor" id="a1c2aa2e008a973eb0ed8227ebd5dbfc2"></a><!-- doxytag: member="Gnome::Gda::Statement::signal_checked" ref="a1c2aa2e008a973eb0ed8227ebd5dbfc2" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Connection</a>>&,bool > Gnome::Gda::Statement::signal_checked </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <dl class="user"><dt><b>Prototype:</b></dt><dd><code>void on_my_checked(const Glib::RefPtr<Connection>& cnc, bool valid)</code> </dd></dl> </div> </div> <a class="anchor" id="a3738ee6023e097884d080d2d5d5d1b08"></a><!-- doxytag: member="Gnome::Gda::Statement::signal_reset" ref="a3738ee6023e097884d080d2d5d5d1b08" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::SignalProxy0</a>< void > Gnome::Gda::Statement::signal_reset </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <dl class="user"><dt><b>Prototype:</b></dt><dd><code>void on_my_reset()</code> </dd></dl> </div> </div> <a class="anchor" id="a1a0ef3ab526bef5ac27e04b50ec146af"></a><!-- doxytag: member="Gnome::Gda::Statement::to_sql" ref="a1a0ef3ab526bef5ac27e04b50ec146af" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::ustring</a> Gnome::Gda::Statement::to_sql </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ae98ba28beec948078841e50d5a501399"></a><!-- doxytag: member="Gnome::Gda::Statement::to_sql" ref="ae98ba28beec948078841e50d5a501399" args="(const Glib::RefPtr< const Set > &params) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::ustring</a> Gnome::Gda::Statement::to_sql </td> <td>(</td> <td class="paramtype">const <a class="elRef" >Set</a> >& </td> <td class="paramname"><em>params</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a2c25f84481cefa8b887f298483eff5e2"></a><!-- doxytag: member="Gnome::Gda::Statement::to_sql" ref="a2c25f84481cefa8b887f298483eff5e2" args="(const Glib::RefPtr< Connection > &cnc, const Glib::RefPtr< const Set > &params, StatementSqlFlag flags, const HolderVector &params_used) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::ustring</a> Gnome::Gda::Statement::to_sql </td> <td>(</td> <td class="paramtype">const <a class="elRef" >Connection</a> >& </td> <td class="paramname"><em>cnc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" >Set</a> >& </td> <td class="paramname"><em>params</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__libgdammEnums.html#gaf9664fcac77f427348868b9502623c1d">StatementSqlFlag</a> </td> <td class="paramname"><em>flags</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGnome_1_1Gda_1_1Statement.html#ad99d9f69a6d6caefe73bf39645bd78f5">HolderVector</a>& </td> <td class="paramname"><em>params_used</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Renders <em>stmt</em> as an SQL statement, with some control on how it is rendered. </p> <p>If <em>cnc</em> is not <code>0</code>, then the rendered SQL will better be suited to be used by <em>cnc</em> (in particular it may include some SQL tweaks and/or proprietary extensions specific to the database engine used by <em>cnc</em>): in this case the result is similar to calling <a class="el" href="classGnome_1_1Gda_1_1Connection.html#afb5799c274d0eee018095b78c0ef4273" title="Renders stmt as an SQL statement, adapted to the SQL dialect used by cnc.">Gda::Connection::statement_to_sql()</a>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cnc</td><td>A <a class="el" href="classGnome_1_1Gda_1_1Connection.html" title="Manages a connection to a data source.">Gda::Connection</a> object, or <code>0</code>. </td></tr> <tr><td class="paramname">params</td><td>Parameters contained in a single <a class="el" href="classGnome_1_1Gda_1_1Set.html" title="Container for several values.">Gda::Set</a> object. </td></tr> <tr><td class="paramname">flags</td><td>A set of flags to control the rendering. </td></tr> <tr><td class="paramname">params_used</td><td>A place to store the list of actual <a class="el" href="classGnome_1_1Gda_1_1Holder.html" title="Container for a single Gda::Value.">Gda::Holder</a> objects in used to do the rendering, or <code>0</code>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new string if no error occurred. </dd></dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="a24c790ac366af8523e267708b182a91c"></a><!-- doxytag: member="Gnome::Gda::Statement::wrap" ref="a24c790ac366af8523e267708b182a91c" args="(GdaStatement *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Gnome::Gda::Statement</a> > wrap </td> <td>(</td> <td class="paramtype">GdaStatement * </td> <td class="paramname"><em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>take_copy</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="elRef" >Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>libgdamm/statement.h</li> </ul> </div> <hr class="footer"/><address class="footer"><small> Generated on Sun Nov 20 2011 22:38:13 for libgdamm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.7.5.1-20110925 </small></address> </body> </html>