Sophie

Sophie

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

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>NdbOperation 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="contents">
<h1>NdbOperation Class Reference</h1><!-- doxytag: class="NdbOperation" --><code>#include &lt;NdbOperation.hpp&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for NdbOperation:</div>
<div class="dynsection">

<p><center><img src="classNdbOperation.png" usemap="#NdbOperation_map" border="0" alt=""></center>
<map name="NdbOperation_map">
<area href="classNdbIndexOperation.html" alt="NdbIndexOperation" shape="rect" coords="0,56,150,80">
<area href="classNdbScanOperation.html" alt="NdbScanOperation" shape="rect" coords="160,56,310,80">
<area href="classNdbIndexScanOperation.html" alt="NdbIndexScanOperation" shape="rect" coords="160,112,310,136">
</map>
</div>

<p>
<a href="classNdbOperation-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Class of operations for use in transactions. <h2>Define Standard Operation Type</h2>
<ul>
<li>enum <a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68">Type</a> { <a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68d63cf1deeefe844eea88cdfb384bd02c">PrimaryKeyAccess</a>, 
<a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68e8ebdeab0c685e130af2b81d510b422a">UniqueIndexAccess</a>, 
<a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68b1f430c645e91c175715ba1cf24282a5">TableScan</a>, 
<a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a688c7d42c9e59a030f1ea312fc9712da01">OrderedIndexScan</a>
 }
<li>enum <a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">LockMode</a> { <a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f455103b3e1f6d331193a0ff6aeb4831435890">LM_Read</a>, 
<a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f455103e2072829a61fb6cf156e33fd7891e5c">LM_Exclusive</a>, 
<a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f4551011c069d10beb6f430fddd23cacf09ce1">LM_CommittedRead</a>
 }
<li>virtual int <a class="el" href="classNdbOperation.html#1e06cf9bb1ce1c5357004c32b1e89b15">insertTuple</a> ()
<li>virtual int <a class="el" href="classNdbOperation.html#6c6466bb68499cb0e78b015b9dc28ac9">updateTuple</a> ()
<li>virtual int <a class="el" href="classNdbOperation.html#38211ca5fa0f8ca48fffe2e1d2dfe623">writeTuple</a> ()
<li>virtual int <a class="el" href="classNdbOperation.html#7acba2e8fcab683e6829bbf6bd942c6c">deleteTuple</a> ()
<li>virtual int <a class="el" href="classNdbOperation.html#64aee1ff7083d96bfd66686c32b44c46">readTuple</a> (<a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">LockMode</a>)
</ul>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">LockMode</a> <a class="el" href="classNdbOperation.html#bdbb5c66ca8776cd9846d82c7d1cde2c">getLockMode</a> () const 
</ul>
<tr><td colspan="2"><div class="groupHeader">Specify Search Conditions</div></td></tr>
<ul>
<li>int <a class="el" href="classNdbOperation.html#2839b64df3a181f6023fb36a9fe8ab74">equal</a> (const char *anAttrName, const char *aValue, Uint32 len=0)
<li><a class="anchor" name="e86b434de36ab8675de4ddc81c249c93"></a><!-- doxytag: member="NdbOperation::equal" ref="e86b434de36ab8675de4ddc81c249c93" args="(const char *anAttrName, Uint32 aValue)" -->
int <b>equal</b> (const char *anAttrName, Uint32 aValue)
<li><a class="anchor" name="85d29aa694568e4c3e98bf3e6b236592"></a><!-- doxytag: member="NdbOperation::equal" ref="85d29aa694568e4c3e98bf3e6b236592" args="(const char *anAttrName, Int32 aValue)" -->
int <b>equal</b> (const char *anAttrName, Int32 aValue)
<li><a class="anchor" name="61df1ef9e09715acbd2eab09d63c559a"></a><!-- doxytag: member="NdbOperation::equal" ref="61df1ef9e09715acbd2eab09d63c559a" args="(const char *anAttrName, Int64 aValue)" -->
int <b>equal</b> (const char *anAttrName, Int64 aValue)
<li><a class="anchor" name="eb72703bbb19a54b2c29e6c01787f200"></a><!-- doxytag: member="NdbOperation::equal" ref="eb72703bbb19a54b2c29e6c01787f200" args="(const char *anAttrName, Uint64 aValue)" -->
int <b>equal</b> (const char *anAttrName, Uint64 aValue)
<li><a class="anchor" name="5365edbd69f322626c401d95708f6934"></a><!-- doxytag: member="NdbOperation::equal" ref="5365edbd69f322626c401d95708f6934" args="(Uint32 anAttrId, const char *aValue, Uint32 len=0)" -->
int <b>equal</b> (Uint32 anAttrId, const char *aValue, Uint32 len=0)
<li><a class="anchor" name="a8339fb3621b080c3c2e8876654e3341"></a><!-- doxytag: member="NdbOperation::equal" ref="a8339fb3621b080c3c2e8876654e3341" args="(Uint32 anAttrId, Int32 aValue)" -->
int <b>equal</b> (Uint32 anAttrId, Int32 aValue)
<li><a class="anchor" name="7b179d46d09b0faf8e94a79ad827f977"></a><!-- doxytag: member="NdbOperation::equal" ref="7b179d46d09b0faf8e94a79ad827f977" args="(Uint32 anAttrId, Uint32 aValue)" -->
int <b>equal</b> (Uint32 anAttrId, Uint32 aValue)
<li><a class="anchor" name="dd31a6f0e8fa395b0d5d58cf31d35534"></a><!-- doxytag: member="NdbOperation::equal" ref="dd31a6f0e8fa395b0d5d58cf31d35534" args="(Uint32 anAttrId, Int64 aValue)" -->
int <b>equal</b> (Uint32 anAttrId, Int64 aValue)
<li><a class="anchor" name="942dd4b8a67058fff6c8e0af6fff543d"></a><!-- doxytag: member="NdbOperation::equal" ref="942dd4b8a67058fff6c8e0af6fff543d" args="(Uint32 anAttrId, Uint64 aValue)" -->
int <b>equal</b> (Uint32 anAttrId, Uint64 aValue)
</ul>
<tr><td colspan="2"><div class="groupHeader">Specify Attribute Actions for Operations</div></td></tr>
<ul>
<li><a class="el" href="classNdbRecAttr.html">NdbRecAttr</a> * <a class="el" href="classNdbOperation.html#644b56e6e5dbe4d4cc414a7c1ec13cc4">getValue</a> (const char *anAttrName, char *aValue=0)
<li><a class="anchor" name="9c6edf534d83338f683a8da5c567cba4"></a><!-- doxytag: member="NdbOperation::getValue" ref="9c6edf534d83338f683a8da5c567cba4" args="(Uint32 anAttrId, char *aValue=0)" -->
<a class="el" href="classNdbRecAttr.html">NdbRecAttr</a> * <b>getValue</b> (Uint32 anAttrId, char *aValue=0)
<li><a class="anchor" name="d79eeb8aaa939483960424b37bc1cc0b"></a><!-- doxytag: member="NdbOperation::getValue" ref="d79eeb8aaa939483960424b37bc1cc0b" args="(const NdbDictionary::Column *, char *val=0)" -->
<a class="el" href="classNdbRecAttr.html">NdbRecAttr</a> * <b>getValue</b> (const <a class="el" href="classNdbDictionary_1_1Column.html">NdbDictionary::Column</a> *, char *val=0)
<li>virtual int <a class="el" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">setValue</a> (const char *anAttrName, const char *aValue, Uint32 len=0)
<li><a class="anchor" name="4b31f2aaeccfb2fac870a1b9444616c8"></a><!-- doxytag: member="NdbOperation::setValue" ref="4b31f2aaeccfb2fac870a1b9444616c8" args="(const char *anAttrName, Int32 aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, Int32 aValue)
<li><a class="anchor" name="17bc6567a883e5e7079a8c926aeb10e7"></a><!-- doxytag: member="NdbOperation::setValue" ref="17bc6567a883e5e7079a8c926aeb10e7" args="(const char *anAttrName, Uint32 aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, Uint32 aValue)
<li><a class="anchor" name="ab675e13b81851d22c97a84cb3356754"></a><!-- doxytag: member="NdbOperation::setValue" ref="ab675e13b81851d22c97a84cb3356754" args="(const char *anAttrName, Uint64 aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, Uint64 aValue)
<li><a class="anchor" name="7bd5ecfe8f974f6381fa4c85fe14e23a"></a><!-- doxytag: member="NdbOperation::setValue" ref="7bd5ecfe8f974f6381fa4c85fe14e23a" args="(const char *anAttrName, Int64 aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, Int64 aValue)
<li><a class="anchor" name="7f4ac19715117e99a774720c2b12bcb9"></a><!-- doxytag: member="NdbOperation::setValue" ref="7f4ac19715117e99a774720c2b12bcb9" args="(const char *anAttrName, float aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, float aValue)
<li><a class="anchor" name="b21a92ca37ec011a601e84017d33fcf1"></a><!-- doxytag: member="NdbOperation::setValue" ref="b21a92ca37ec011a601e84017d33fcf1" args="(const char *anAttrName, double aValue)" -->
virtual int <b>setValue</b> (const char *anAttrName, double aValue)
<li><a class="anchor" name="28623db7b503a19e36833e3bba2e6e93"></a><!-- doxytag: member="NdbOperation::setValue" ref="28623db7b503a19e36833e3bba2e6e93" args="(Uint32 anAttrId, const char *aValue, Uint32 len=0)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, const char *aValue, Uint32 len=0)
<li><a class="anchor" name="82579487c5cecd4eeed4a1f132d94750"></a><!-- doxytag: member="NdbOperation::setValue" ref="82579487c5cecd4eeed4a1f132d94750" args="(Uint32 anAttrId, Int32 aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, Int32 aValue)
<li><a class="anchor" name="6ccfbf7d74b3740290b0d25ed631516f"></a><!-- doxytag: member="NdbOperation::setValue" ref="6ccfbf7d74b3740290b0d25ed631516f" args="(Uint32 anAttrId, Uint32 aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, Uint32 aValue)
<li><a class="anchor" name="53e29fe5ac07d961d971bb8ded558bfa"></a><!-- doxytag: member="NdbOperation::setValue" ref="53e29fe5ac07d961d971bb8ded558bfa" args="(Uint32 anAttrId, Uint64 aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, Uint64 aValue)
<li><a class="anchor" name="3f1a82974041edc0de301c9cac035e7e"></a><!-- doxytag: member="NdbOperation::setValue" ref="3f1a82974041edc0de301c9cac035e7e" args="(Uint32 anAttrId, Int64 aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, Int64 aValue)
<li><a class="anchor" name="96bcbc4f1f0aea85e8ff34447636c0c3"></a><!-- doxytag: member="NdbOperation::setValue" ref="96bcbc4f1f0aea85e8ff34447636c0c3" args="(Uint32 anAttrId, float aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, float aValue)
<li><a class="anchor" name="f2ae0e98617cc58682a51cd4402f0736"></a><!-- doxytag: member="NdbOperation::setValue" ref="f2ae0e98617cc58682a51cd4402f0736" args="(Uint32 anAttrId, double aValue)" -->
virtual int <b>setValue</b> (Uint32 anAttrId, double aValue)
<li>virtual <a class="el" href="classNdbBlob.html">NdbBlob</a> * <a class="el" href="classNdbOperation.html#3b6aa22db7ef8923f75c6b83fefa8c2a">getBlobHandle</a> (const char *anAttrName)
<li><a class="anchor" name="b56b4a074514fd703c90e6533262e40f"></a><!-- doxytag: member="NdbOperation::getBlobHandle" ref="b56b4a074514fd703c90e6533262e40f" args="(Uint32 anAttrId)" -->
virtual <a class="el" href="classNdbBlob.html">NdbBlob</a> * <b>getBlobHandle</b> (Uint32 anAttrId)
</ul>
<tr><td colspan="2"><div class="groupHeader">Error Handling</div></td></tr>
<ul>
<li>const <a class="el" href="structNdbError.html">NdbError</a> &amp; <a class="el" href="classNdbOperation.html#9e9aa90dcdbdc02066f3b386ebb79d04">getNdbError</a> () const 
<li>int <a class="el" href="classNdbOperation.html#3e93d982f26fc222812daddc79b053f1">getNdbErrorLine</a> ()
<li>const char * <a class="el" href="classNdbOperation.html#440b6d63db9754c98fdbc1d2ccc256c9">getTableName</a> () const 
<li>const <a class="el" href="classNdbDictionary_1_1Table.html">NdbDictionary::Table</a> * <a class="el" href="classNdbOperation.html#d9fd9ca67e0a3b774964a39621a84fe0">getTable</a> () const 
<li>const <a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68">Type</a> <a class="el" href="classNdbOperation.html#528ca9ba8d613f242f8dac06c12c72d9">getType</a> () const 
</ul>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="e80ac8555bdbfddf8bbf6b477eb09a68"></a><!-- doxytag: member="NdbOperation::Type" ref="e80ac8555bdbfddf8bbf6b477eb09a68" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68">NdbOperation::Type</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Different access types (supported by sub-classes of <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a>) <dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="e80ac8555bdbfddf8bbf6b477eb09a68d63cf1deeefe844eea88cdfb384bd02c"></a><!-- doxytag: member="PrimaryKeyAccess" ref="e80ac8555bdbfddf8bbf6b477eb09a68d63cf1deeefe844eea88cdfb384bd02c" args="" -->PrimaryKeyAccess</em>&nbsp;</td><td>
Read, insert, update, or delete using pk. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e80ac8555bdbfddf8bbf6b477eb09a68e8ebdeab0c685e130af2b81d510b422a"></a><!-- doxytag: member="UniqueIndexAccess" ref="e80ac8555bdbfddf8bbf6b477eb09a68e8ebdeab0c685e130af2b81d510b422a" args="" -->UniqueIndexAccess</em>&nbsp;</td><td>
Read, update, or delete using unique index. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e80ac8555bdbfddf8bbf6b477eb09a68b1f430c645e91c175715ba1cf24282a5"></a><!-- doxytag: member="TableScan" ref="e80ac8555bdbfddf8bbf6b477eb09a68b1f430c645e91c175715ba1cf24282a5" args="" -->TableScan</em>&nbsp;</td><td>
Full table scan. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="e80ac8555bdbfddf8bbf6b477eb09a688c7d42c9e59a030f1ea312fc9712da01"></a><!-- doxytag: member="OrderedIndexScan" ref="e80ac8555bdbfddf8bbf6b477eb09a688c7d42c9e59a030f1ea312fc9712da01" args="" -->OrderedIndexScan</em>&nbsp;</td><td>
Ordered index scan. </td></tr>
</table>
</dl>

</div>
</div><p>
<a class="anchor" name="bb62acf3797243787ce5814417f45510"></a><!-- doxytag: member="NdbOperation::LockMode" ref="bb62acf3797243787ce5814417f45510" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">NdbOperation::LockMode</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Lock when performing read <dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="bb62acf3797243787ce5814417f455103b3e1f6d331193a0ff6aeb4831435890"></a><!-- doxytag: member="LM_Read" ref="bb62acf3797243787ce5814417f455103b3e1f6d331193a0ff6aeb4831435890" args="" -->LM_Read</em>&nbsp;</td><td>
Read with shared lock. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="bb62acf3797243787ce5814417f455103e2072829a61fb6cf156e33fd7891e5c"></a><!-- doxytag: member="LM_Exclusive" ref="bb62acf3797243787ce5814417f455103e2072829a61fb6cf156e33fd7891e5c" args="" -->LM_Exclusive</em>&nbsp;</td><td>
Read with exclusive lock. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="bb62acf3797243787ce5814417f4551011c069d10beb6f430fddd23cacf09ce1"></a><!-- doxytag: member="LM_CommittedRead" ref="bb62acf3797243787ce5814417f4551011c069d10beb6f430fddd23cacf09ce1" args="" -->LM_CommittedRead</em>&nbsp;</td><td>
Ignore locks, read last committed value. </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="1e06cf9bb1ce1c5357004c32b1e89b15"></a><!-- doxytag: member="NdbOperation::insertTuple" ref="1e06cf9bb1ce1c5357004c32b1e89b15" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::insertTuple           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a> to be a standard operation of type insertTuple. When calling <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>, this operation adds a new tuple to the table.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful otherwise -1. </dd></dl>

<p>Reimplemented in <a class="el" href="classNdbIndexOperation.html#0800b312c2c5b6365423190d2767722a">NdbIndexOperation</a>.</p>

</div>
</div><p>
<a class="anchor" name="6c6466bb68499cb0e78b015b9dc28ac9"></a><!-- doxytag: member="NdbOperation::updateTuple" ref="6c6466bb68499cb0e78b015b9dc28ac9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::updateTuple           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a> to be a standard operation of type updateTuple. When calling <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>, this operation updates a tuple in the table.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful otherwise -1. </dd></dl>

<p>Reimplemented in <a class="el" href="classNdbIndexOperation.html#efeb83f626e8b724da4651c3558f73bd">NdbIndexOperation</a>.</p>

</div>
</div><p>
<a class="anchor" name="38211ca5fa0f8ca48fffe2e1d2dfe623"></a><!-- doxytag: member="NdbOperation::writeTuple" ref="38211ca5fa0f8ca48fffe2e1d2dfe623" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::writeTuple           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a> to be a standard operation of type writeTuple. When calling <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>, this operation writes a tuple to the table. If the tuple exists, it updates it, otherwise an insert takes place.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful otherwise -1. </dd></dl>

</div>
</div><p>
<a class="anchor" name="7acba2e8fcab683e6829bbf6bd942c6c"></a><!-- doxytag: member="NdbOperation::deleteTuple" ref="7acba2e8fcab683e6829bbf6bd942c6c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::deleteTuple           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a> to be a standard operation of type deleteTuple. When calling <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>, this operation delete a tuple.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful otherwise -1. </dd></dl>

<p>Reimplemented in <a class="el" href="classNdbIndexOperation.html#3136d688a30f773d69348cec6abac391">NdbIndexOperation</a>.</p>

</div>
</div><p>
<a class="anchor" name="64aee1ff7083d96bfd66686c32b44c46"></a><!-- doxytag: member="NdbOperation::readTuple" ref="64aee1ff7083d96bfd66686c32b44c46" args="(LockMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::readTuple           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">LockMode</a>&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define the <a class="el" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a> to be a standard operation of type readTuple. When calling <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>, this operation reads a tuple.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful otherwise -1. </dd></dl>

<p>Reimplemented in <a class="el" href="classNdbIndexOperation.html#e23deeff5448755c80494159ac61e84d">NdbIndexOperation</a>.</p>

</div>
</div><p>
<a class="anchor" name="2839b64df3a181f6023fb36a9fe8ab74"></a><!-- doxytag: member="NdbOperation::equal" ref="2839b64df3a181f6023fb36a9fe8ab74" args="(const char *anAttrName, const char *aValue, Uint32 len=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbOperation::equal           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>anAttrName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>aValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Uint32&nbsp;</td>
          <td class="paramname"> <em>len</em> = <code>0</code></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>
Define a search condition with equality. The condition is true if the attribute has the given value. To set search conditions on multiple attributes, use several equals (then all of them must be satisfied for the tuple to be selected).<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>For <a class="el" href="classNdbOperation.html#1e06cf9bb1ce1c5357004c32b1e89b15">insertTuple()</a> it is also allowed to define the search key by using <a class="el" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">setValue()</a>.<p>
There are 10 versions of <a class="el" href="classNdbOperation.html#2839b64df3a181f6023fb36a9fe8ab74">equal()</a> with slightly different parameters.<p>
When using <a class="el" href="classNdbOperation.html#2839b64df3a181f6023fb36a9fe8ab74">equal()</a> with a string (char *) as second argument, the string needs to be padded with zeros in the following sense: <div class="fragment"><pre class="fragment">       <span class="comment">// Equal needs strings to be padded with zeros</span>
       strncpy(buf, str, <span class="keyword">sizeof</span>(buf));
       <a class="code" href="classNdbOperation.html" title="Class of operations for use in transactions.">NdbOperation</a>-&gt;equal(<span class="stringliteral">"Attr1"</span>, buf);
</pre></div></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>anAttrName</em>&nbsp;</td><td>Attribute name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aValue</em>&nbsp;</td><td>Attribute value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Attribute length expressed in bytes. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>-1 if unsuccessful. </dd></dl>

</div>
</div><p>
<a class="anchor" name="644b56e6e5dbe4d4cc414a7c1ec13cc4"></a><!-- doxytag: member="NdbOperation::getValue" ref="644b56e6e5dbe4d4cc414a7c1ec13cc4" args="(const char *anAttrName, char *aValue=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classNdbRecAttr.html">NdbRecAttr</a>* NdbOperation::getValue           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>anAttrName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>aValue</em> = <code>0</code></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>
Defines a retrieval operation of an attribute value. The NDB API allocate memory for the <a class="el" href="classNdbRecAttr.html" title="Contains value of an attribute.">NdbRecAttr</a> object that will hold the returned attribute value.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>Note that it is the applications responsibility to allocate enough memory for aValue (if non-NULL). The buffer aValue supplied by the application must be aligned appropriately. The buffer is used directly (avoiding a copy penalty) only if it is aligned on a 4-byte boundary and the attribute size in bytes (i.e. <a class="el" href="classNdbRecAttr.html#0aa299fd70609460fd958f70da1464a4">NdbRecAttr::attrSize</a> times <a class="el" href="classNdbRecAttr.html#59c1679126b5e349512b52bd5e1a1382">NdbRecAttr::arraySize</a> is a multiple of 4).<p>
There are two versions of <a class="el" href="classNdbOperation.html#644b56e6e5dbe4d4cc414a7c1ec13cc4">NdbOperation::getValue</a> with slightly different parameters.<p>
This method does not fetch the attribute value from the database! The <a class="el" href="classNdbRecAttr.html" title="Contains value of an attribute.">NdbRecAttr</a> object returned by this method is <em>not</em> readable/printable before the transaction has been executed with <a class="el" href="classNdbTransaction.html#361d5a82078f86a5d18923f56d43cc84">NdbTransaction::execute</a>.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>anAttrName</em>&nbsp;</td><td>Attribute name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aValue</em>&nbsp;</td><td>If this is non-NULL, then the attribute value will be returned in this parameter.<br>
 If NULL, then the attribute value will only be stored in the returned <a class="el" href="classNdbRecAttr.html" title="Contains value of an attribute.">NdbRecAttr</a> object. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An <a class="el" href="classNdbRecAttr.html" title="Contains value of an attribute.">NdbRecAttr</a> object to hold the value of the attribute, or a NULL pointer (indicating error). </dd></dl>

</div>
</div><p>
<a class="anchor" name="e6fd36220eca78873d1d9b59539ab192"></a><!-- doxytag: member="NdbOperation::setValue" ref="e6fd36220eca78873d1d9b59539ab192" args="(const char *anAttrName, const char *aValue, Uint32 len=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int NdbOperation::setValue           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>anAttrName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>aValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Uint32&nbsp;</td>
          <td class="paramname"> <em>len</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define an attribute to set or update in query.<p>
To set a NULL value, use the following construct: <div class="fragment"><pre class="fragment">   <a class="code" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">setValue</a>(<span class="stringliteral">"ATTR_NAME"</span>, (<span class="keywordtype">char</span>*)NULL);
</pre></div><p>
There are a number of <a class="el" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">NdbOperation::setValue</a> methods that take a certain type as input (pass by value rather than passing a pointer). As the interface is currently implemented it is the responsibility of the application programmer to use the correct types.<p>
The NDB API will however check that the application sends a correct length to the interface as given in the length parameter. The passing of char* as the value can contain any type or any type of array. If length is not provided or set to zero, then the API will assume that the pointer is correct and not bother with checking it.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>For <a class="el" href="classNdbOperation.html#1e06cf9bb1ce1c5357004c32b1e89b15">insertTuple()</a> the NDB API will automatically detect that it is supposed to use <a class="el" href="classNdbOperation.html#2839b64df3a181f6023fb36a9fe8ab74">equal()</a> instead.<p>
For <a class="el" href="classNdbOperation.html#1e06cf9bb1ce1c5357004c32b1e89b15">insertTuple()</a> it is not necessary to use <a class="el" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">setValue()</a> on key attributes before other attributes.<p>
There are 14 versions of <a class="el" href="classNdbOperation.html#e6fd36220eca78873d1d9b59539ab192">NdbOperation::setValue</a> with slightly different parameters.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>anAttrName</em>&nbsp;</td><td>Name (or Id) of attribute. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aValue</em>&nbsp;</td><td>Attribute value to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>Attribute length expressed in bytes. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>-1 if unsuccessful. </dd></dl>

</div>
</div><p>
<a class="anchor" name="3b6aa22db7ef8923f75c6b83fefa8c2a"></a><!-- doxytag: member="NdbOperation::getBlobHandle" ref="3b6aa22db7ef8923f75c6b83fefa8c2a" args="(const char *anAttrName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classNdbBlob.html">NdbBlob</a>* NdbOperation::getBlobHandle           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>anAttrName</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This method replaces getValue/setValue for blobs. It creates a blob handle <a class="el" href="classNdbBlob.html" title="Blob handle.">NdbBlob</a>. A second call with same argument returns the previously created handle. The handle is linked to the operation and is maintained automatically.<p>
See <a class="el" href="classNdbBlob.html" title="Blob handle.">NdbBlob</a> for details. 
</div>
</div><p>
<a class="anchor" name="9e9aa90dcdbdc02066f3b386ebb79d04"></a><!-- doxytag: member="NdbOperation::getNdbError" ref="9e9aa90dcdbdc02066f3b386ebb79d04" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structNdbError.html">NdbError</a>&amp; NdbOperation::getNdbError           </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 latest error code.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>error code. </dd></dl>

</div>
</div><p>
<a class="anchor" name="3e93d982f26fc222812daddc79b053f1"></a><!-- doxytag: member="NdbOperation::getNdbErrorLine" ref="3e93d982f26fc222812daddc79b053f1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NdbOperation::getNdbErrorLine           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the method number where the error occured.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>method number where the error occured. </dd></dl>

</div>
</div><p>
<a class="anchor" name="440b6d63db9754c98fdbc1d2ccc256c9"></a><!-- doxytag: member="NdbOperation::getTableName" ref="440b6d63db9754c98fdbc1d2ccc256c9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* NdbOperation::getTableName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get table name of this operation. 
</div>
</div><p>
<a class="anchor" name="d9fd9ca67e0a3b774964a39621a84fe0"></a><!-- doxytag: member="NdbOperation::getTable" ref="d9fd9ca67e0a3b774964a39621a84fe0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classNdbDictionary_1_1Table.html">NdbDictionary::Table</a>* NdbOperation::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 table object for this operation 
</div>
</div><p>
<a class="anchor" name="528ca9ba8d613f242f8dac06c12c72d9"></a><!-- doxytag: member="NdbOperation::getType" ref="528ca9ba8d613f242f8dac06c12c72d9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classNdbOperation.html#e80ac8555bdbfddf8bbf6b477eb09a68">Type</a> NdbOperation::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 the type of access for this operation 
</div>
</div><p>
<a class="anchor" name="bdbb5c66ca8776cd9846d82c7d1cde2c"></a><!-- doxytag: member="NdbOperation::getLockMode" ref="bdbb5c66ca8776cd9846d82c7d1cde2c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classNdbOperation.html#bb62acf3797243787ce5814417f45510">LockMode</a> NdbOperation::getLockMode           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return lock mode for operation 
</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>