blob: 4807a5dc665fc4e0e99b3e33b93b1bac1d200bca [file] [log] [blame]
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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>Kudu C++ client API: kudu::client::KuduWriteOperation Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</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">
<img id="MSearchSelect" src="search/search.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)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
<div class="navpath"><b>kudu</b>::<b>client</b>::<a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html">KuduWriteOperation</a>
</div>
</div>
<div class="contents">
<h1>kudu::client::KuduWriteOperation Class Reference</h1><!-- doxytag: class="kudu::client::KuduWriteOperation" -->
<p>A single-row write operation to be sent to a Kudu table.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="write__op_8h_source.html">write_op.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for kudu::client::KuduWriteOperation:</div>
<div class="dynsection">
<div class="center">
<img src="classkudu_1_1client_1_1KuduWriteOperation.gif" usemap="#kudu::client::KuduWriteOperation_map" alt=""/>
<map id="kudu::client::KuduWriteOperation_map" name="kudu::client::KuduWriteOperation_map">
<area href="classkudu_1_1client_1_1KuduDelete.html" alt="kudu::client::KuduDelete" shape="rect" coords="0,56,195,80"/>
<area href="classkudu_1_1client_1_1KuduInsert.html" alt="kudu::client::KuduInsert" shape="rect" coords="205,56,400,80"/>
<area href="classkudu_1_1client_1_1KuduUpdate.html" alt="kudu::client::KuduUpdate" shape="rect" coords="410,56,605,80"/>
<area href="classkudu_1_1client_1_1KuduUpsert.html" alt="kudu::client::KuduUpsert" shape="rect" coords="615,56,810,80"/>
</map>
</div>
</div>
<p><a href="classkudu_1_1client_1_1KuduWriteOperation-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a87d94ee5801a6b16fc6d1f44ee2e4357">Type</a> { <b>INSERT</b> = 1,
<b>UPDATE</b> = 2,
<b>DELETE</b> = 3,
<b>UPSERT</b> = 4
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Write operation types. </p>
<br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classkudu_1_1KuduPartialRow.html">KuduPartialRow</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a973b342ced786b23754b57fd83b34aa3">row</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classkudu_1_1KuduPartialRow.html">KuduPartialRow</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a8889770ce62e2ca0ce5d55c9c90af6bc">mutable_row</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a50b5405c4dfc7af038daa4780aea6e19">ToString</a> () const =0</td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada57057f15990c8cc54770c782fa9ad4"></a><!-- doxytag: member="kudu::client::KuduWriteOperation::internal::Batcher" ref="ada57057f15990c8cc54770c782fa9ad4" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::Batcher</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8241e8597925b7121abc27b5024c9773"></a><!-- doxytag: member="kudu::client::KuduWriteOperation::internal::WriteRpc" ref="a8241e8597925b7121abc27b5024c9773" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><b>internal::WriteRpc</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A single-row write operation to be sent to a Kudu table. </p>
<p>This is the abstract base class from which the particular row operations (<a class="el" href="classkudu_1_1client_1_1KuduInsert.html" title="A single row insert to be sent to the cluster.">KuduInsert</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpdate.html" title="A single row update to be sent to the cluster.">KuduUpdate</a>, etc) are derived. These subclasses are instantiated by <a class="el" href="classkudu_1_1client_1_1KuduTable.html#a0c78f86c5d0fbf53437c2c9db26f92b6">KuduTable::NewInsert()</a>, etc.</p>
<p>The row key, as well as the columns to be inserted or updated are set using the embedded <a class="el" href="classkudu_1_1KuduPartialRow.html" title="A row which may only contain values for a subset of the columns.">KuduPartialRow</a> object accessible via <a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a8889770ce62e2ca0ce5d55c9c90af6bc">mutable_row()</a>.</p>
<p>Typical usage example: </p>
<div class="fragment"><pre class="fragment"> KuduInsert* t = table-&gt;NewInsert();
<a class="code" href="status_8h.html#ac503ba85e942147294cdc82087da60f6" title="If the status is bad, CHECK immediately, appending the status to the logged message...">KUDU_CHECK_OK</a>(t-&gt;mutable_row()-&gt;SetInt32(<span class="stringliteral">&quot;key&quot;</span>, 1234));
<a class="code" href="status_8h.html#ac503ba85e942147294cdc82087da60f6" title="If the status is bad, CHECK immediately, appending the status to the logged message...">KUDU_CHECK_OK</a>(t-&gt;mutable_row()-&gt;SetStringCopy(<span class="stringliteral">&quot;foo&quot;</span>, <span class="stringliteral">&quot;bar&quot;</span>));
session-&gt;Apply(t);
</pre></div> <hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8889770ce62e2ca0ce5d55c9c90af6bc"></a><!-- doxytag: member="kudu::client::KuduWriteOperation::mutable_row" ref="a8889770ce62e2ca0ce5d55c9c90af6bc" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classkudu_1_1KuduPartialRow.html">KuduPartialRow</a>* kudu::client::KuduWriteOperation::mutable_row </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="note"><dt><b>Note:</b></dt><dd>To work with a row, use the <a class="el" href="classkudu_1_1KuduPartialRow.html" title="A row which may only contain values for a subset of the columns.">KuduPartialRow</a> API for field setters, etc. </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to the corresponding row-like object. </dd></dl>
</div>
</div>
<a class="anchor" id="a973b342ced786b23754b57fd83b34aa3"></a><!-- doxytag: member="kudu::client::KuduWriteOperation::row" ref="a973b342ced786b23754b57fd83b34aa3" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classkudu_1_1KuduPartialRow.html">KuduPartialRow</a>&amp; kudu::client::KuduWriteOperation::row </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="note"><dt><b>Note:</b></dt><dd>To work with a row, use the <a class="el" href="classkudu_1_1KuduPartialRow.html" title="A row which may only contain values for a subset of the columns.">KuduPartialRow</a> API for field getters, etc. </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Immutable reference to the corresponding row-like object. </dd></dl>
</div>
</div>
<a class="anchor" id="a50b5405c4dfc7af038daa4780aea6e19"></a><!-- doxytag: member="kudu::client::KuduWriteOperation::ToString" ref="a50b5405c4dfc7af038daa4780aea6e19" args="() const =0" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual std::string kudu::client::KuduWriteOperation::ToString </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td> const<code> [pure virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>String representation of the operation. </dd></dl>
<p>Implemented in <a class="el" href="classkudu_1_1client_1_1KuduInsert.html#a7c0fb45a5bfa96574b6328be392ba240">kudu::client::KuduInsert</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpsert.html#a0608280ef5b4eb2a53c0b303db7401c8">kudu::client::KuduUpsert</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpdate.html#af05d202ea529554b6d033d51ec942718">kudu::client::KuduUpdate</a>, and <a class="el" href="classkudu_1_1client_1_1KuduDelete.html#a586dc46e1d10118465e3b834ac578de0">kudu::client::KuduDelete</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/kudu/client/<a class="el" href="write__op_8h_source.html">write_op.h</a></li>
</ul>
</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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>Generated for Kudu version 1.0.1 on Tue Oct 11 08:52:01 2016 by Doxygen 1.6.1</small>
<br>
<small>Copyright © 2016 The Apache Software Foundation.</small>
</address>
</body>
</html>