Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 91128064e1b251eab84e1c0e3ea0dd7a > files > 115

lib64mysql-devel-5.0.51a-8mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>NdbDictionary::Index Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
  <div class="navpath"><a class="el" href="classNdbDictionary.html">NdbDictionary</a>::<a class="el" href="classNdbDictionary_1_1Index.html">Index</a>
  </div>
<div class="contents">
<h1>NdbDictionary::Index Class Reference</h1><!-- doxytag: class="NdbDictionary::Index" --><!-- doxytag: inherits="NdbDictionary::Object" --><code>#include &lt;NdbDictionary.hpp&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for NdbDictionary::Index:</div>
<div class="dynsection">

<p><center><img src="classNdbDictionary_1_1Index.png" usemap="#NdbDictionary::Index_map" border="0" alt=""></center>
<map name="NdbDictionary::Index_map">
<area href="classNdbDictionary_1_1Object.html" alt="NdbDictionary::Object" shape="rect" coords="0,0,136,24">
</map>
</div>

<p>
<a href="classNdbDictionary_1_1Index-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Represents an index in an NDB Cluster. <h2>Getting Index properties</h2>
<ul>
<li>enum <a class="el" href="classNdbDictionary_1_1Index.html#3a4c31f39e0901955b4edf6a0f71eb0d">Type</a> { <a class="el" href="classNdbDictionary_1_1Index.html#3a4c31f39e0901955b4edf6a0f71eb0d1bfbe034cea49aef8f910f215d953a87">Undefined</a> =  0, 
<a class="el" href="classNdbDictionary_1_1Index.html#3a4c31f39e0901955b4edf6a0f71eb0d72dea57d5ff1b45181268446d6a6a799">UniqueHashIndex</a> =  3, 
<a class="el" href="classNdbDictionary_1_1Index.html#3a4c31f39e0901955b4edf6a0f71eb0d04f4e2a7fb06b1b47c189c658a7cb251">OrderedIndex</a> =  6
 }
<li>const char * <a class="el" href="classNdbDictionary_1_1Index.html#a659b525941550890e6f6de268750221">getName</a> () const 
<li>const char * <a class="el" href="classNdbDictionary_1_1Index.html#1bcb08db60e3f3a99c17acd7a056bf20">getTable</a> () const 
<li>unsigned <a class="el" href="classNdbDictionary_1_1Index.html#91bb0945189b8e26177f32265cc9642a">getNoOfColumns</a> () const 
<li>const <a class="el" href="classNdbDictionary_1_1Column.html">Column</a> * <a class="el" href="classNdbDictionary_1_1Index.html#450aa8e480d59f6c8cb6349192d5e04b">getColumn</a> (unsigned no) const 
<li><a class="el" href="classNdbDictionary_1_1Object.html#3475c4ad2d1adfc812609223f23a9a3c">Type</a> <a class="el" href="classNdbDictionary_1_1Index.html#e345328259d59d895ffdf32f6743700c">getType</a> () const 
<li>bool <a class="el" href="classNdbDictionary_1_1Index.html#cbd63c3a95ee5383e480cb2f819ff642">getLogging</a> () const 
<li>virtual <a class="el" href="classNdbDictionary_1_1Object.html#7339e20d45ceb6b08ee4c36f270ed9bd">Object::Status</a> <a class="el" href="classNdbDictionary_1_1Index.html#821e53e2e1246587d1139655751e94f7">getObjectStatus</a> () const 
<li>virtual int <a class="el" href="classNdbDictionary_1_1Index.html#5f8ea1e7dafbb350da74eb2f206d2370">getObjectVersion</a> () const 
</ul>
<h2>Public Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Index creation</div></td></tr>
<tr><td colspan="2"><div class="groupText">These methods should normally not be used in an application as the result will not be visible from the MySQL Server <br><br></div></td></tr>
<ul>
<li><a class="el" href="classNdbDictionary_1_1Index.html#a53d9efb8026c37016c2dd6f7edb6d13">Index</a> (const char *name=&quot;&quot;)
<li><a class="anchor" name="dec511fb94bff4f74d99603fb2c631bb"></a><!-- doxytag: member="NdbDictionary::Index::~Index" ref="dec511fb94bff4f74d99603fb2c631bb" args="()" -->
virtual <b>~Index</b> ()
<li>int <a class="el" href="classNdbDictionary_1_1Index.html#741c2da33e216342e96ce43885b631d3">setName</a> (const char *name)
<li>int <a class="el" href="classNdbDictionary_1_1Index.html#c9fea2ab1918feeacabb4cc396590484">setTable</a> (const char *name)
<li>int <a class="el" href="classNdbDictionary_1_1Index.html#0f66e3e113ed661adca552e6c086279c">addColumn</a> (const <a class="el" href="classNdbDictionary_1_1Column.html">Column</a> &amp;c)
<li>int <a class="el" href="classNdbDictionary_1_1Index.html#0fc72158a9373583799fea51911546da">addColumnName</a> (const char *name)
<li>int <a class="el" href="classNdbDictionary_1_1Index.html#1eb625f604a76637c59b5fd3feb10759">addColumnNames</a> (unsigned noOfNames, const char **names)
<li>void <a class="el" href="classNdbDictionary_1_1Index.html#119f593fe5a1bb858f092b1555201e2c">setType</a> (<a class="el" href="classNdbDictionary_1_1Object.html#3475c4ad2d1adfc812609223f23a9a3c">Type</a> type)
<li>void <a class="el" href="classNdbDictionary_1_1Index.html#e1db069349c1154db264ca6e119b1c13">setLogging</a> (bool enable)
</ul>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="3a4c31f39e0901955b4edf6a0f71eb0d"></a><!-- doxytag: member="NdbDictionary::Index::Type" ref="3a4c31f39e0901955b4edf6a0f71eb0d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classNdbDictionary_1_1Index.html#3a4c31f39e0901955b4edf6a0f71eb0d">NdbDictionary::Index::Type</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Represents type of index <dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="3a4c31f39e0901955b4edf6a0f71eb0d1bfbe034cea49aef8f910f215d953a87"></a><!-- doxytag: member="Undefined" ref="3a4c31f39e0901955b4edf6a0f71eb0d1bfbe034cea49aef8f910f215d953a87" args="" -->Undefined</em>&nbsp;</td><td>
Undefined object type (initial value). </td></tr>
<tr><td valign="top"><em><a class="anchor" name="3a4c31f39e0901955b4edf6a0f71eb0d72dea57d5ff1b45181268446d6a6a799"></a><!-- doxytag: member="UniqueHashIndex" ref="3a4c31f39e0901955b4edf6a0f71eb0d72dea57d5ff1b45181268446d6a6a799" args="" -->UniqueHashIndex</em>&nbsp;</td><td>
Unique un-ordered hash index (only one currently supported) </td></tr>
<tr><td valign="top"><em><a class="anchor" name="3a4c31f39e0901955b4edf6a0f71eb0d04f4e2a7fb06b1b47c189c658a7cb251"></a><!-- doxytag: member="OrderedIndex" ref="3a4c31f39e0901955b4edf6a0f71eb0d04f4e2a7fb06b1b47c189c658a7cb251" args="" -->OrderedIndex</em>&nbsp;</td><td>
Non-unique ordered index. </td></tr>
</table>
</dl>

<p>Reimplemented from <a class="el" href="classNdbDictionary_1_1Object.html#3475c4ad2d1adfc812609223f23a9a3c">NdbDictionary::Object</a>.</p>

</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a53d9efb8026c37016c2dd6f7edb6d13"></a><!-- doxytag: member="NdbDictionary::Index::Index" ref="a53d9efb8026c37016c2dd6f7edb6d13" args="(const char *name=&quot;&quot;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NdbDictionary::Index::Index           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>&quot;&quot;</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name of index </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a659b525941550890e6f6de268750221"></a><!-- doxytag: member="NdbDictionary::Index::getName" ref="a659b525941550890e6f6de268750221" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* NdbDictionary::Index::getName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the name of an index 
</div>
</div><p>
<a class="anchor" name="1bcb08db60e3f3a99c17acd7a056bf20"></a><!-- doxytag: member="NdbDictionary::Index::getTable" ref="1bcb08db60e3f3a99c17acd7a056bf20" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* NdbDictionary::Index::getTable           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the name of the table being indexed 
</div>
</div><p>
<a class="anchor" name="91bb0945189b8e26177f32265cc9642a"></a><!-- doxytag: member="NdbDictionary::Index::getNoOfColumns" ref="91bb0945189b8e26177f32265cc9642a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned NdbDictionary::Index::getNoOfColumns           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the number of columns in the index 
</div>
</div><p>
<a class="anchor" name="450aa8e480d59f6c8cb6349192d5e04b"></a><!-- doxytag: member="NdbDictionary::Index::getColumn" ref="450aa8e480d59f6c8cb6349192d5e04b" args="(unsigned no) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classNdbDictionary_1_1Column.html">Column</a>* NdbDictionary::Index::getColumn           </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>no</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a specific column in the index 
</div>
</div><p>
<a class="anchor" name="e345328259d59d895ffdf32f6743700c"></a><!-- doxytag: member="NdbDictionary::Index::getType" ref="e345328259d59d895ffdf32f6743700c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classNdbDictionary_1_1Object.html#3475c4ad2d1adfc812609223f23a9a3c">Type</a> NdbDictionary::Index::getType           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get index type of the index 
</div>
</div><p>
<a class="anchor" name="cbd63c3a95ee5383e480cb2f819ff642"></a><!-- doxytag: member="NdbDictionary::Index::getLogging" ref="cbd63c3a95ee5383e480cb2f819ff642" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NdbDictionary::Index::getLogging           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if index is set to be stored on disk<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>if true then logging id enabled</dd></dl>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Non-logged indexes are rebuilt at system restart. <p>
Ordered index does not currently support logging. </dd></dl>

</div>
</div><p>
<a class="anchor" name="821e53e2e1246587d1139655751e94f7"></a><!-- doxytag: member="NdbDictionary::Index::getObjectStatus" ref="821e53e2e1246587d1139655751e94f7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classNdbDictionary_1_1Object.html#7339e20d45ceb6b08ee4c36f270ed9bd">Object::Status</a> NdbDictionary::Index::getObjectStatus           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get object status 
<p>Implements <a class="el" href="classNdbDictionary_1_1Object.html#5f19d2340709e0db4ca46f3c82e6fab0">NdbDictionary::Object</a>.</p>

</div>
</div><p>
<a class="anchor" name="5f8ea1e7dafbb350da74eb2f206d2370"></a><!-- doxytag: member="NdbDictionary::Index::getObjectVersion" ref="5f8ea1e7dafbb350da74eb2f206d2370" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbDictionary::Index::getObjectVersion           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get object version 
<p>Implements <a class="el" href="classNdbDictionary_1_1Object.html#263e76f87b7f3b3b5e7e6de8169a6328">NdbDictionary::Object</a>.</p>

</div>
</div><p>
<a class="anchor" name="741c2da33e216342e96ce43885b631d3"></a><!-- doxytag: member="NdbDictionary::Index::setName" ref="741c2da33e216342e96ce43885b631d3" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbDictionary::Index::setName           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the name of an index 
</div>
</div><p>
<a class="anchor" name="c9fea2ab1918feeacabb4cc396590484"></a><!-- doxytag: member="NdbDictionary::Index::setTable" ref="c9fea2ab1918feeacabb4cc396590484" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbDictionary::Index::setTable           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the name of the table to be indexed 
</div>
</div><p>
<a class="anchor" name="0f66e3e113ed661adca552e6c086279c"></a><!-- doxytag: member="NdbDictionary::Index::addColumn" ref="0f66e3e113ed661adca552e6c086279c" args="(const Column &amp;c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbDictionary::Index::addColumn           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classNdbDictionary_1_1Column.html">Column</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a column to the index definition Note that the order of columns will be in the order they are added (only matters for ordered indexes). 
</div>
</div><p>
<a class="anchor" name="0fc72158a9373583799fea51911546da"></a><!-- doxytag: member="NdbDictionary::Index::addColumnName" ref="0fc72158a9373583799fea51911546da" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbDictionary::Index::addColumnName           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a column name to the index definition Note that the order of indexes will be in the order they are added (only matters for ordered indexes). 
</div>
</div><p>
<a class="anchor" name="1eb625f604a76637c59b5fd3feb10759"></a><!-- doxytag: member="NdbDictionary::Index::addColumnNames" ref="1eb625f604a76637c59b5fd3feb10759" args="(unsigned noOfNames, const char **names)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbDictionary::Index::addColumnNames           </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>noOfNames</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&nbsp;</td>
          <td class="paramname"> <em>names</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add several column names to the index definition Note that the order of indexes will be in the order they are added (only matters for ordered indexes). 
</div>
</div><p>
<a class="anchor" name="119f593fe5a1bb858f092b1555201e2c"></a><!-- doxytag: member="NdbDictionary::Index::setType" ref="119f593fe5a1bb858f092b1555201e2c" args="(Type type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NdbDictionary::Index::setType           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classNdbDictionary_1_1Object.html#3475c4ad2d1adfc812609223f23a9a3c">Type</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set index type of the index 
</div>
</div><p>
<a class="anchor" name="e1db069349c1154db264ca6e119b1c13"></a><!-- doxytag: member="NdbDictionary::Index::setLogging" ref="e1db069349c1154db264ca6e119b1c13" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NdbDictionary::Index::setLogging           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>enable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enable/Disable index storage on disk<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>enable</em>&nbsp;</td><td>If enable is set to true, then logging becomes enabled</td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classNdbDictionary_1_1Index.html#cbd63c3a95ee5383e480cb2f819ff642">NdbDictionary::Index::getLogging</a> </dd></dl>

</div>
</div><p>
</div>
<hr>
<address>
<small>
<center>
Documentation generated Sun Apr 20 06:25:31 2008 from mysql source files.<br>
&copy; 2003-2004 
<a href="http://www.mysql.com">MySQL AB</a>
<br>
</center>
</small></address>
</body>
</html>