Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 1179

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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>Wt: Wt::Dbo::QueryModel&lt; Result &gt; Class Template Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</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">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="namespaceWt_1_1Dbo.html">Dbo</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">QueryModel</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::Dbo::QueryModel&lt; Result &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__dbo.html">Database Objects (Wt::Dbo)</a> &#124; <a class="el" href="group__modelview.html">Model/view system</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::Dbo::QueryModel" --><!-- doxytag: inherits="Wt::WAbstractTableModel" -->
<p>A Wt MVC Model to view/edit query results.  
 <a href="classWt_1_1Dbo_1_1QueryModel.html#details">More...</a></p>

<p><code>#include &lt;Wt/Dbo/QueryModel&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::Dbo::QueryModel&lt; Result &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1Dbo_1_1QueryModel__inherit__graph.png" border="0" usemap="#Wt_1_1Dbo_1_1QueryModel_3_01Result_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1Dbo_1_1QueryModel_3_01Result_01_4_inherit__map" id="Wt_1_1Dbo_1_1QueryModel_3_01Result_01_4_inherit__map">
<area shape="rect" href="classWt_1_1WAbstractTableModel.html" title="An abstract table model for use with Wt&#39;s view classes." alt="" coords="23,155,196,181"/><area shape="rect" href="classWt_1_1WAbstractItemModel.html" title="An abstract model for use with Wt&#39;s view classes." alt="" coords="25,80,193,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="61,5,157,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1Dbo_1_1QueryModel-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a5257f4e831c2d37b826c251faf2f6e9f">QueryModel</a> (<a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new query model.  <a href="#a5257f4e831c2d37b826c251faf2f6e9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a9453700573e37d02a69a77ac6f57dfa5">setQuery</a> (const <a class="el" href="classWt_1_1Dbo_1_1Query.html">Query</a>&lt; Result &gt; &amp;query, bool keepColumns=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the query.  <a href="#a9453700573e37d02a69a77ac6f57dfa5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classWt_1_1Dbo_1_1Query.html">Query</a>&lt; Result &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a13e498b0e58709939dbb301316d0b163">query</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the query.  <a href="#a13e498b0e58709939dbb301316d0b163"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ad0e8bde05d5a73800d91d9d83021a4b7">addColumn</a> (const std::string &amp;field, const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;header, WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; flags=ItemIsSelectable)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a column.  <a href="#ad0e8bde05d5a73800d91d9d83021a4b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1bc893df2791f0b3c063c43c373b37d8">addColumn</a> (const std::string &amp;field, WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; flags=ItemIsSelectable)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a column.  <a href="#a1bc893df2791f0b3c063c43c373b37d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6448c762a7e8e28051d21d58b600e5ca">setColumnFlags</a> (int column, WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; flags)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets column item flags.  <a href="#a6448c762a7e8e28051d21d58b600e5ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aecc1fdd499c6b994829e0f7f24ead164">columnFlags</a> (int column) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns column item flags.  <a href="#aecc1fdd499c6b994829e0f7f24ead164"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#afa1bbf12d2b58ae91481f6d09c1dd8db">addAllFieldsAsColumns</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds all the columns from the field list.  <a href="#afa1bbf12d2b58ae91481f6d09c1dd8db"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Result&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ab653110a99e534fb7904da1faf59f9d2">stableResultRow</a> (int row) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a stable result row.  <a href="#ab653110a99e534fb7904da1faf59f9d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const Result &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a">resultRow</a> (int row) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a result row.  <a href="#a70c60d0d81d1c41c1b8f29de0172935a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Result &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a08c73dc6b9e382a46e7bda2ffe01376a">resultRow</a> (int row)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a result row.  <a href="#a08c73dc6b9e382a46e7bda2ffe01376a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ade0f8644e13de16e326b7d679f87add1">reload</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Rereads the data from the database.  <a href="#ade0f8644e13de16e326b7d679f87add1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6871c2e7be184bfd2339320812387f81">setBatchSize</a> (int count)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the batch size for fetching results.  <a href="#a6871c2e7be184bfd2339320812387f81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6a887454166e332f401e9d9b16ff3bb7">batchSize</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the batch size for fetching results.  <a href="#a6a887454166e332f401e9d9b16ff3bb7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="classWt_1_1Dbo_1_1FieldInfo.html">FieldInfo</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aced97c84f2ecee0e1c535b6b1e132b62">fields</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the query field list.  <a href="#aced97c84f2ecee0e1c535b6b1e132b62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeacfa3bc386a38353e5278cbfc48b19d"></a><!-- doxytag: member="Wt::Dbo::QueryModel::fieldInfo" ref="aeacfa3bc386a38353e5278cbfc48b19d" args="(int column) const " -->
const <a class="el" href="classWt_1_1Dbo_1_1FieldInfo.html">FieldInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aeacfa3bc386a38353e5278cbfc48b19d">fieldInfo</a> (int column) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="classWt_1_1Dbo_1_1FieldInfo.html" title="Description of a field.">FieldInfo</a> structure for a column. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a266eb0c77e3dcad8b440d6438e2de218"></a><!-- doxytag: member="Wt::Dbo::QueryModel::fieldName" ref="a266eb0c77e3dcad8b440d6438e2de218" args="(int column) const " -->
const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a266eb0c77e3dcad8b440d6438e2de218">fieldName</a> (int column) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the field name for the a column. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#adb59d34c46c47a5aeb7606af8b882ee1">columnCount</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of columns.  <a href="#adb59d34c46c47a5aeb7606af8b882ee1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aef02f2ff4377322475c25a8c2dfaffb1">rowCount</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of rows.  <a href="#aef02f2ff4377322475c25a8c2dfaffb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a5d2504dad0a417346a8229faa4fa1182">flags</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the flags for an item.  <a href="#a5d2504dad0a417346a8229faa4fa1182"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual boost::any&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe">data</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index, int role=DisplayRole) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the data for an item.  <a href="#a459f6560b1345dc27d2d037a10e46cfe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1ea1331951d8bcef98caec5ac291a945">setData</a> (const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;index, const boost::any &amp;value, int role=EditRole)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets data at the given model index.  <a href="#a1ea1331951d8bcef98caec5ac291a945"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a7fcf4f35898f3808fdc650427173bf96">sort</a> (int column, <a class="el" href="group__modelview.html#ga4173856040cf108a9c7360927a43ebac">SortOrder</a> order=AscendingOrder)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorts the model according to a particular column.  <a href="#a7fcf4f35898f3808fdc650427173bf96"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1fa3a689470e89d103ae4eadd2c88ae9">insertRows</a> (int row, int count, const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts one or more rows.  <a href="#a1fa3a689470e89d103ae4eadd2c88ae9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aedeb2af32798348d92ee0f7e9ec7daf8">removeRows</a> (int row, int count, const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;parent=<a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>())</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes one or more rows.  <a href="#aedeb2af32798348d92ee0f7e9ec7daf8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a3dbc22ccd31427afbcb69a7fe85254ab">setHeaderData</a> (int column, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation, const boost::any &amp;value, int role=EditRole)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets header data for a column.  <a href="#a3dbc22ccd31427afbcb69a7fe85254ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual boost::any&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ae1db722a013d021eed3f71cb8e1995f6">headerData</a> (int section, <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a> orientation=Horizontal, int role=DisplayRole) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns header data.  <a href="#ae1db722a013d021eed3f71cb8e1995f6"></a><br/></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">virtual Result&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a122165a0eaad6573172181d5eeefcbe0">createRow</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new row.  <a href="#a122165a0eaad6573172181d5eeefcbe0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a76080f5f01a7404d525259b352e7829b">addRow</a> (Result &amp;result)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a row to the session.  <a href="#a76080f5f01a7404d525259b352e7829b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a4a6c45d5b17f382f2e0927490107208b">deleteRow</a> (Result &amp;result)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a row from the session.  <a href="#a4a6c45d5b17f382f2e0927490107208b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a32fbfb85be4ca3272fb7a067e1c37266">resultId</a> (const Result &amp;result) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a unique id for a result.  <a href="#a32fbfb85be4ca3272fb7a067e1c37266"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Result&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#af5b3646c6ea0e60e2eae732467bd6436">resultById</a> (long long id) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a result by id.  <a href="#af5b3646c6ea0e60e2eae732467bd6436"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;class Result&gt;<br/>
class Wt::Dbo::QueryModel&lt; Result &gt;</h3>

<p>A Wt MVC Model to view/edit query results. </p>
<p>The model fetches results from the query and presents the data in a table. It supports sorting the underlying SQL query using <a class="el" href="classWt_1_1Dbo_1_1Query.html#a411e77f4aad2447f067b4c20153fa1ad" title="Sets the result order.">Query::orderBy()</a>.</p>
<p>The default implementation of <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe" title="Returns the data for an item.">data()</a> converts Query results to model data using <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#a62ad66f0b19a9afa554cbe6f8fa24ea5" title="Returns result values.">query_result_traits&lt;Result&gt;::getValues()</a>. You may define your own data presentation using the underlying <code>Result</code> by specializing <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe" title="Returns the data for an item.">data()</a> and accessing data from <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow()</a>.</p>
<p>You may selectively add fields that you want to display using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ad0e8bde05d5a73800d91d9d83021a4b7" title="Adds a column.">addColumn()</a>, or you can also add all columns based on the query using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#afa1bbf12d2b58ae91481f6d09c1dd8db" title="Adds all the columns from the field list.">addAllFieldsAsColumns()</a>.</p>
<p>The model supports editing of the underlying data (even if the underlying query fetches results from multiple tables!). Values in columns that correspond to fields that have been mapped (and are writable) in a Database Object can be edited. The default implementation of <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1ea1331951d8bcef98caec5ac291a945" title="Sets data at the given model index.">setData()</a> uses <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#a31f67f41ac5ac491d59e911a46fe4238" title="Sets a result value.">query_result_traits&lt;Result&gt;::setValue()</a> to manipulate the database object, and thus uses the same write-behind properties as <a class="el" href="classWt_1_1Dbo_1_1ptr.html#ac14d20e52b5cd9eee356488c7416c044" title="Dereference operator, for writing.">ptr&lt;C&gt;::modify()</a>. To customize editing, you can specialize <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1ea1331951d8bcef98caec5ac291a945" title="Sets data at the given model index.">setData()</a> and use <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow()</a> to modify the result object directly.</p>
<p>The model supports also inserting rows (only at the end), and removing rows, which are reflected in object additions and removals from the <a class="el" href="classWt_1_1Dbo_1_1Session.html" title="A database session.">Session</a>.</p>
<p>Editing is directly to the underlying database objects (change, insert and remove). Note that these changes will be flushed to the database whenever a transaction is committed, or before a query is run. The model will not explicitly create a transaction for the modification, but since the model uses a query for reading data, the change may be committed to the database depending on how the model is loading data. Still, this implies that usually inserting a row and setting its data happens within a single SQL <code>"insert"</code> statement. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5257f4e831c2d37b826c251faf2f6e9f"></a><!-- doxytag: member="Wt::Dbo::QueryModel::QueryModel" ref="a5257f4e831c2d37b826c251faf2f6e9f" args="(WObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::<a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">QueryModel</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classWt_1_1WObject.html">WObject</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new query model. </p>
<p>You need to seed the model with a query using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a9453700573e37d02a69a77ac6f57dfa5" title="Sets the query.">setQuery()</a>. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afa1bbf12d2b58ae91481f6d09c1dd8db"></a><!-- doxytag: member="Wt::Dbo::QueryModel::addAllFieldsAsColumns" ref="afa1bbf12d2b58ae91481f6d09c1dd8db" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::addAllFieldsAsColumns </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds all the columns from the field list. </p>
<p>All fields are added as columns. Fields that are mutable are marked as editable columns.</p>
<p>This is a convenient alternative to selectively adding columns using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ad0e8bde05d5a73800d91d9d83021a4b7" title="Adds a column.">addColumn()</a>.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aced97c84f2ecee0e1c535b6b1e132b62" title="Returns the query field list.">fields()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad0e8bde05d5a73800d91d9d83021a4b7"></a><!-- doxytag: member="Wt::Dbo::QueryModel::addColumn" ref="ad0e8bde05d5a73800d91d9d83021a4b7" args="(const std::string &amp;field, const WString &amp;header, WFlags&lt; ItemFlag &gt; flags=ItemIsSelectable)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::addColumn </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&#160;</td>
          <td class="paramname"><em>header</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td>
          <td class="paramname"><em>flags</em> = <code>ItemIsSelectable</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a column. </p>
<p>The <code>field</code> name may be a qualified or unqualified field name. The list of available fields can be inspected using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aced97c84f2ecee0e1c535b6b1e132b62" title="Returns the query field list.">fields()</a>.</p>
<p>The <code>header</code> is used as <a class="el" href="group__modelview.html#gga0ae864e12320f9f89172735e075ed068a5ed17aded8a0e3b712698cf85a218f1f" title="Role for textual representation.">Wt::DisplayRole</a> for the column header data.</p>
<p>For the column items, <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a5d2504dad0a417346a8229faa4fa1182" title="Returns the flags for an item.">flags()</a> will returned the given <code>flags</code>. For example, to indicate that a field is editable, you can set the <a class="el" href="group__modelview.html#gga1d77c4de293aebfacbdde124de06b8b0a8664c482d721bbcb73539a924c7a9fab" title="Item can be edited.">Wt::ItemIsEditable</a> flag.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aced97c84f2ecee0e1c535b6b1e132b62" title="Returns the query field list.">fields()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1bc893df2791f0b3c063c43c373b37d8"></a><!-- doxytag: member="Wt::Dbo::QueryModel::addColumn" ref="a1bc893df2791f0b3c063c43c373b37d8" args="(const std::string &amp;field, WFlags&lt; ItemFlag &gt; flags=ItemIsSelectable)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::addColumn </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td>
          <td class="paramname"><em>flags</em> = <code>ItemIsSelectable</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a column. </p>
<p>This is an overloaded function for convenience, which uses the field name as the header value.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a3dbc22ccd31427afbcb69a7fe85254ab" title="Sets header data for a column.">setHeaderData()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a76080f5f01a7404d525259b352e7829b"></a><!-- doxytag: member="Wt::Dbo::QueryModel::addRow" ref="a76080f5f01a7404d525259b352e7829b" args="(Result &amp;result)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::addRow </td>
          <td>(</td>
          <td class="paramtype">Result &amp;&#160;</td>
          <td class="paramname"><em>result</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a row to the session. </p>
<p>This method is called from within <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1fa3a689470e89d103ae4eadd2c88ae9" title="Inserts one or more rows.">insertRows()</a> to add (and save) a new result row to the <a class="el" href="classWt_1_1Dbo_1_1Dbo.html" title="A base class for database objects.">Dbo</a> session.</p>
<p>The default implementation uses <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#af54fbd95d2319077cacbb718d6f33f1b" title="Adds a new result to the session.">query_result_traits&lt;Result&gt;::add()</a>. </p>

</div>
</div>
<a class="anchor" id="a6a887454166e332f401e9d9b16ff3bb7"></a><!-- doxytag: member="Wt::Dbo::QueryModel::batchSize" ref="a6a887454166e332f401e9d9b16ff3bb7" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::batchSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the batch size for fetching results. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6871c2e7be184bfd2339320812387f81" title="Sets the batch size for fetching results.">setBatchSize()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="adb59d34c46c47a5aeb7606af8b882ee1"></a><!-- doxytag: member="Wt::Dbo::QueryModel::columnCount" ref="adb59d34c46c47a5aeb7606af8b882ee1" args="(const WModelIndex &amp;parent=WModelIndex()) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::columnCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of columns. </p>
<p>Returns the number of columns that have been added using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ad0e8bde05d5a73800d91d9d83021a4b7" title="Adds a column.">addColumn()</a> or <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#afa1bbf12d2b58ae91481f6d09c1dd8db" title="Adds all the columns from the field list.">addAllFieldsAsColumns()</a>.</p>
<p>Since the query model implements a flat table model, this returns 0 when <code>parent</code> is valid. </p>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#abcf7912a95a0a60f8e9b1c37d30b8383">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="aecc1fdd499c6b994829e0f7f24ead164"></a><!-- doxytag: member="Wt::Dbo::QueryModel::columnFlags" ref="aecc1fdd499c6b994829e0f7f24ead164" args="(int column) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::columnFlags </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns column item flags. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6448c762a7e8e28051d21d58b600e5ca" title="Sets column item flags.">setColumnFlags()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a122165a0eaad6573172181d5eeefcbe0"></a><!-- doxytag: member="Wt::Dbo::QueryModel::createRow" ref="a122165a0eaad6573172181d5eeefcbe0" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Result <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::createRow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new row. </p>
<p>This method is called from within <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1fa3a689470e89d103ae4eadd2c88ae9" title="Inserts one or more rows.">insertRows()</a> to create a new row.</p>
<p>The default implementation uses <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#ad5ff66197006a5daef3ce806ad29ddf7" title="Creates a new result.">query_result_traits&lt;Result&gt;::create()</a>. </p>

</div>
</div>
<a class="anchor" id="a459f6560b1345dc27d2d037a10e46cfe"></a><!-- doxytag: member="Wt::Dbo::QueryModel::data" ref="a459f6560b1345dc27d2d037a10e46cfe" args="(const WModelIndex &amp;index, int role=DisplayRole) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">boost::any <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::data </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>role</em> = <code>DisplayRole</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the data for an item. </p>
<p>Returns data of type <a class="el" href="group__modelview.html#gga0ae864e12320f9f89172735e075ed068a5ed17aded8a0e3b712698cf85a218f1f" title="Role for textual representation.">Wt::DisplayRole</a> or <a class="el" href="group__modelview.html#gga0ae864e12320f9f89172735e075ed068a6bc0da3ea683a06ee293a5a15f903cde" title="Role for the edited value.">Wt::EditRole</a> based on the field value corresponding to the index. If necessary, this fetches a batch of results from the underlying database.</p>
<p>The default implementation of <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe" title="Returns the data for an item.">data()</a> converts Query results to model data using <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#a62ad66f0b19a9afa554cbe6f8fa24ea5" title="Returns result values.">query_result_traits&lt;Result&gt;::getValues()</a>. You may define your own data presentation using the underlying <code>Result</code> by specializing <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe" title="Returns the data for an item.">data()</a> and accessing data from <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow()</a>. </p>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#a9112b74d160f916ef75fb6c1c09dd8fe">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a4a6c45d5b17f382f2e0927490107208b"></a><!-- doxytag: member="Wt::Dbo::QueryModel::deleteRow" ref="a4a6c45d5b17f382f2e0927490107208b" args="(Result &amp;result)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::deleteRow </td>
          <td>(</td>
          <td class="paramtype">Result &amp;&#160;</td>
          <td class="paramname"><em>result</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Deletes a row from the session. </p>
<p>This method is called from within <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aedeb2af32798348d92ee0f7e9ec7daf8" title="Removes one or more rows.">removeRows()</a> to remove (and delete) a new result row from the <a class="el" href="classWt_1_1Dbo_1_1Dbo.html" title="A base class for database objects.">Dbo</a> session.</p>
<p>The default implementation uses <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#ae60de38f7bbffad41f60bd80df2ad8ca" title="Removes a result from the session.">query_result_traits&lt;Result&gt;::remove()</a>. </p>

</div>
</div>
<a class="anchor" id="aced97c84f2ecee0e1c535b6b1e132b62"></a><!-- doxytag: member="Wt::Dbo::QueryModel::fields" ref="aced97c84f2ecee0e1c535b6b1e132b62" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const std::vector&lt; <a class="el" href="classWt_1_1Dbo_1_1FieldInfo.html">FieldInfo</a> &gt; &amp; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::fields </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the query field list. </p>
<p>This returns the field list from the underlying query. </p>

</div>
</div>
<a class="anchor" id="a5d2504dad0a417346a8229faa4fa1182"></a><!-- doxytag: member="Wt::Dbo::QueryModel::flags" ref="a5d2504dad0a417346a8229faa4fa1182" args="(const WModelIndex &amp;index) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::flags </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the flags for an item. </p>
<p>Returns the flags set for the column using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6448c762a7e8e28051d21d58b600e5ca" title="Sets column item flags.">setColumnFlags()</a>. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#ab5e60f81be797c0553a010eff5b9a592">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="ae1db722a013d021eed3f71cb8e1995f6"></a><!-- doxytag: member="Wt::Dbo::QueryModel::headerData" ref="ae1db722a013d021eed3f71cb8e1995f6" args="(int section, Orientation orientation=Horizontal, int role=DisplayRole) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">boost::any <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::headerData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>section</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a>&#160;</td>
          <td class="paramname"><em>orientation</em> = <code>Horizontal</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>role</em> = <code>DisplayRole</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns header data. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a3dbc22ccd31427afbcb69a7fe85254ab" title="Sets header data for a column.">setHeaderData()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a86bbab7c809fce4de9b5cb543b2fb124">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a1fa3a689470e89d103ae4eadd2c88ae9"></a><!-- doxytag: member="Wt::Dbo::QueryModel::insertRows" ref="a1fa3a689470e89d103ae4eadd2c88ae9" args="(int row, int count, const WModelIndex &amp;parent=WModelIndex())" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::insertRows </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Inserts one or more rows. </p>
<p>Row insertions are only supported at the end (<code>row</code> == <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aef02f2ff4377322475c25a8c2dfaffb1" title="Returns the number of rows.">rowCount()</a>). For each added row, a new result is added to the underlying database. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#abcafc38dc24fd9edf70eafe834ca411d">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a13e498b0e58709939dbb301316d0b163"></a><!-- doxytag: member="Wt::Dbo::QueryModel::query" ref="a13e498b0e58709939dbb301316d0b163" args="() const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classWt_1_1Dbo_1_1Query.html">Query</a>&lt;Result&gt;&amp; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::query </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the query. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a9453700573e37d02a69a77ac6f57dfa5" title="Sets the query.">setQuery()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ade0f8644e13de16e326b7d679f87add1"></a><!-- doxytag: member="Wt::Dbo::QueryModel::reload" ref="ade0f8644e13de16e326b7d679f87add1" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::reload </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rereads the data from the database. </p>
<p>This invalidates the current (cached) data and informs views that they should rerender.</p>
<p>The model keeps the following data cached:</p>
<ul>
<li><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#aef02f2ff4377322475c25a8c2dfaffb1" title="Returns the number of rows.">rowCount()</a></li>
<li>a batch of data, controlled by <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a6871c2e7be184bfd2339320812387f81" title="Sets the batch size for fetching results.">setBatchSize()</a> </li>
</ul>

</div>
</div>
<a class="anchor" id="aedeb2af32798348d92ee0f7e9ec7daf8"></a><!-- doxytag: member="Wt::Dbo::QueryModel::removeRows" ref="aedeb2af32798348d92ee0f7e9ec7daf8" args="(int row, int count, const WModelIndex &amp;parent=WModelIndex())" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::removeRows </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Removes one or more rows. </p>
<p>For each removed row, the result is removed from the underlying database. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a29cf3003ee8f97b2b5de9c52af27361a">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="af5b3646c6ea0e60e2eae732467bd6436"></a><!-- doxytag: member="Wt::Dbo::QueryModel::resultById" ref="af5b3646c6ea0e60e2eae732467bd6436" args="(long long id) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Result <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::resultById </td>
          <td>(</td>
          <td class="paramtype">long long&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a result by id. </p>
<p>This should be the inverse of the <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a32fbfb85be4ca3272fb7a067e1c37266" title="Returns a unique id for a result.">resultId()</a> function.</p>
<p>The default implementation uses <a class="el" href="structWt_1_1Dbo_1_1query__result__traits.html#a14af7eff41790d5f0328d09a5fb57748" title="Find a result by id.">query_result_traits&lt;Result&gt;::findById()</a>. </p>

</div>
</div>
<a class="anchor" id="a32fbfb85be4ca3272fb7a067e1c37266"></a><!-- doxytag: member="Wt::Dbo::QueryModel::resultId" ref="a32fbfb85be4ca3272fb7a067e1c37266" args="(const Result &amp;result) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">long long <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::resultId </td>
          <td>(</td>
          <td class="paramtype">const Result &amp;&#160;</td>
          <td class="paramname"><em>result</em></td><td>)</td>
          <td> const<code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a unique id for a result. </p>
<p>This should, if possible, identify the result using a unique long long id, and otherwise return -1.</p>
<p>The default implementation uses <a class="el" href="group__dbo.html#ga42c50bd3bfc38ad8c810b30b279b0ba6" title="Maps a natural primary key (id) field.">query_result_traits&lt;Result&gt;::id()</a>.</p>
<p>This is required for a working <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ab653110a99e534fb7904da1faf59f9d2" title="Returns a stable result row.">stableResultRow()</a> implementation.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#af5b3646c6ea0e60e2eae732467bd6436" title="Returns a result by id.">resultById()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a70c60d0d81d1c41c1b8f29de0172935a"></a><!-- doxytag: member="Wt::Dbo::QueryModel::resultRow" ref="a70c60d0d81d1c41c1b8f29de0172935a" args="(int row) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const Result &amp; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::resultRow </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a result row. </p>
<p>This returns the result corresponding to a particular row, and could be used to customize the model behaviour, e.g. by specializing <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a459f6560b1345dc27d2d037a10e46cfe" title="Returns the data for an item.">data()</a> for certain columns.</p>
<p>Returns a const reference to an entry in the result cache. </p>

</div>
</div>
<a class="anchor" id="a08c73dc6b9e382a46e7bda2ffe01376a"></a><!-- doxytag: member="Wt::Dbo::QueryModel::resultRow" ref="a08c73dc6b9e382a46e7bda2ffe01376a" args="(int row)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Result &amp; <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::resultRow </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a result row. </p>
<p>This returns the result corresponding to a particular row, and could be used to customize the model behaviour, e.g. by specializing <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a1ea1331951d8bcef98caec5ac291a945" title="Sets data at the given model index.">setData()</a> for certain columns.</p>
<p>Returns a reference to an entry in the result cache.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow(int row) const</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aef02f2ff4377322475c25a8c2dfaffb1"></a><!-- doxytag: member="Wt::Dbo::QueryModel::rowCount" ref="aef02f2ff4377322475c25a8c2dfaffb1" args="(const WModelIndex &amp;parent=WModelIndex()) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::rowCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>parent</em> = <code><a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a>()</code></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of rows. </p>
<p>Returns the number of rows return from the underlying query.</p>
<p>Since the query model implements a flat table model, this returns 0 when <code>parent</code> is valid. </p>

<p>Implements <a class="el" href="classWt_1_1WAbstractItemModel.html#ab0709a8f71fd5df882f29bb29fd055f0">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a6871c2e7be184bfd2339320812387f81"></a><!-- doxytag: member="Wt::Dbo::QueryModel::setBatchSize" ref="a6871c2e7be184bfd2339320812387f81" args="(int count)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::setBatchSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the batch size for fetching results. </p>
<p>The model fetches results from the query in batch, and caches these in memory to avoid repetitive querying of the database.</p>
<p>The default batch size is 40. </p>

</div>
</div>
<a class="anchor" id="a6448c762a7e8e28051d21d58b600e5ca"></a><!-- doxytag: member="Wt::Dbo::QueryModel::setColumnFlags" ref="a6448c762a7e8e28051d21d58b600e5ca" args="(int column, WFlags&lt; ItemFlag &gt; flags)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::setColumnFlags </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WFlags&lt; <a class="el" href="group__modelview.html#ga1d77c4de293aebfacbdde124de06b8b0">ItemFlag</a> &gt;&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets column item flags. </p>
<p>For items in column <code>column</code>, <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a5d2504dad0a417346a8229faa4fa1182" title="Returns the flags for an item.">flags()</a> will returned the given <code>flags</code>. For example, to indicate that a field is editable, you can set the <a class="el" href="group__modelview.html#gga1d77c4de293aebfacbdde124de06b8b0a8664c482d721bbcb73539a924c7a9fab" title="Item can be edited.">Wt::ItemIsEditable</a> flag. </p>

</div>
</div>
<a class="anchor" id="a1ea1331951d8bcef98caec5ac291a945"></a><!-- doxytag: member="Wt::Dbo::QueryModel::setData" ref="a1ea1331951d8bcef98caec5ac291a945" args="(const WModelIndex &amp;index, const boost::any &amp;value, int role=EditRole)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::setData </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WModelIndex.html">WModelIndex</a> &amp;&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const boost::any &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>role</em> = <code>EditRole</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets data at the given model index. </p>
<p>If <code>role</code> = <a class="el" href="group__modelview.html#gga0ae864e12320f9f89172735e075ed068a6bc0da3ea683a06ee293a5a15f903cde" title="Role for the edited value.">Wt::EditRole</a>, sets the value for the field corresponding to the index. All other editing is ignored.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>setCachedResult() </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a70856db8c322be8c7f397a932165a943">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a3dbc22ccd31427afbcb69a7fe85254ab"></a><!-- doxytag: member="Wt::Dbo::QueryModel::setHeaderData" ref="a3dbc22ccd31427afbcb69a7fe85254ab" args="(int column, Orientation orientation, const boost::any &amp;value, int role=EditRole)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::setHeaderData </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912">Orientation</a>&#160;</td>
          <td class="paramname"><em>orientation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const boost::any &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>role</em> = <code>EditRole</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets header data for a column. </p>
<p>The model will return this data in <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ae1db722a013d021eed3f71cb8e1995f6" title="Returns header data.">headerData()</a>. Only column headers are supported (orientation == <a class="el" href="namespaceWt.html#a2a8d45559e16a0185bf61bfad0a67912ac2ebf22b096a22b18eef23e736aa2e28" title="Horizontal.">Wt::Horizontal</a>). </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a57f5d417f933440db0d38ece7dd370f4">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="a9453700573e37d02a69a77ac6f57dfa5"></a><!-- doxytag: member="Wt::Dbo::QueryModel::setQuery" ref="a9453700573e37d02a69a77ac6f57dfa5" args="(const Query&lt; Result &gt; &amp;query, bool keepColumns=false)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::setQuery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1Dbo_1_1Query.html">Query</a>&lt; Result &gt; &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>keepColumns</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the query. </p>
<p>The <code>query</code> is used to query the database.</p>
<p>Unless <code>keepColumns</code> is <code>true</code>, this resets the column list, so you will need to (re-)add one or more columns using <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ad0e8bde05d5a73800d91d9d83021a4b7" title="Adds a column.">addColumn()</a>.</p>
<p>When keeping the current columns, a LayoutChange rather than a Reset is emitted by the model, allowing views to keep their column geometry as well. </p>

</div>
</div>
<a class="anchor" id="a7fcf4f35898f3808fdc650427173bf96"></a><!-- doxytag: member="Wt::Dbo::QueryModel::sort" ref="a7fcf4f35898f3808fdc650427173bf96" args="(int column, SortOrder order=AscendingOrder)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::sort </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>column</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__modelview.html#ga4173856040cf108a9c7360927a43ebac">SortOrder</a>&#160;</td>
          <td class="paramname"><em>order</em> = <code>AscendingOrder</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sorts the model according to a particular column. </p>
<p>This sorts the model by changing the query using <a class="el" href="classWt_1_1Dbo_1_1Query.html#a411e77f4aad2447f067b4c20153fa1ad" title="Sets the result order.">Query&lt;BindStrategy&gt;::orderBy()</a>. </p>

<p>Reimplemented from <a class="el" href="classWt_1_1WAbstractItemModel.html#a133931424d4daa8422bcdea911cda713">Wt::WAbstractItemModel</a>.</p>

</div>
</div>
<a class="anchor" id="ab653110a99e534fb7904da1faf59f9d2"></a><!-- doxytag: member="Wt::Dbo::QueryModel::stableResultRow" ref="ab653110a99e534fb7904da1faf59f9d2" args="(int row) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Result &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Result <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html">Wt::Dbo::QueryModel</a>&lt; Result &gt;::stableResultRow </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a stable result row. </p>
<p>This return the same result row as was previously returned by <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow()</a>, even if there were database inserts going on.</p>
<p>This requires suitable implementations for <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a32fbfb85be4ca3272fb7a067e1c37266" title="Returns a unique id for a result.">resultId()</a> and <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#af5b3646c6ea0e60e2eae732467bd6436" title="Returns a result by id.">resultById()</a> functions.</p>
<p>If the row wasn't fetched before (or since a <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#ade0f8644e13de16e326b7d679f87add1" title="Rereads the data from the database.">reload()</a>), then the result of <a class="el" href="classWt_1_1Dbo_1_1QueryModel.html#a70c60d0d81d1c41c1b8f29de0172935a" title="Returns a result row.">resultRow()</a> is returned instead. </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>