blob: 899f338e2b579024b7ba7c427dc83a83827bcd72 [file] [log] [blame]
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Kudu C++ client API: kudu::client::KuduWriteOperation Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Kudu C++ client API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>kudu</b></li><li class="navelem"><b>client</b></li><li class="navelem"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html">KuduWriteOperation</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classkudu_1_1client_1_1KuduWriteOperation-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">kudu::client::KuduWriteOperation Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>A single-row write operation to be sent to a Kudu table.
<a href="classkudu_1_1client_1_1KuduWriteOperation.html#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="dyncontent">
<div class="center"><img src="classkudu_1_1client_1_1KuduWriteOperation__inherit__graph.png" border="0" usemap="#kudu_1_1client_1_1KuduWriteOperation_inherit__map" alt="Inheritance graph"/></div>
<map name="kudu_1_1client_1_1KuduWriteOperation_inherit__map" id="kudu_1_1client_1_1KuduWriteOperation_inherit__map">
<area shape="rect" id="node2" href="classkudu_1_1client_1_1KuduDelete.html" title="A single row delete to be sent to the cluster. " alt="" coords="270,5,435,32"/>
<area shape="rect" id="node3" href="classkudu_1_1client_1_1KuduInsert.html" title="A single row insert to be sent to the cluster. " alt="" coords="273,56,433,83"/>
<area shape="rect" id="node4" href="classkudu_1_1client_1_1KuduUpdate.html" title="A single row update to be sent to the cluster. " alt="" coords="268,107,437,133"/>
<area shape="rect" id="node5" href="classkudu_1_1client_1_1KuduUpsert.html" title="A single row upsert to be sent to the cluster. " alt="" coords="269,157,436,184"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a87d94ee5801a6b16fc6d1f44ee2e4357"><td class="memItemLeft" align="right" valign="top"><a id="a87d94ee5801a6b16fc6d1f44ee2e4357"></a>enum &#160;</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
}<tr class="memdesc:a87d94ee5801a6b16fc6d1f44ee2e4357"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write operation types. <br /></td></tr>
</td></tr>
<tr class="separator:a87d94ee5801a6b16fc6d1f44ee2e4357"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab73a467a979bc76bb4738ba038d7f0bd"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classKuduPartialRow.html">KuduPartialRow</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#ab73a467a979bc76bb4738ba038d7f0bd">row</a> () const</td></tr>
<tr class="separator:ab73a467a979bc76bb4738ba038d7f0bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8889770ce62e2ca0ce5d55c9c90af6bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classKuduPartialRow.html">KuduPartialRow</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a8889770ce62e2ca0ce5d55c9c90af6bc">mutable_row</a> ()</td></tr>
<tr class="separator:a8889770ce62e2ca0ce5d55c9c90af6bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50b5405c4dfc7af038daa4780aea6e19"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a50b5405c4dfc7af038daa4780aea6e19">ToString</a> () const =0</td></tr>
<tr class="separator:a50b5405c4dfc7af038daa4780aea6e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><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="classKuduPartialRow.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"><div class="line">KuduInsert* t = table-&gt;<a class="code" href="classkudu_1_1client_1_1KuduTable.html#a0c78f86c5d0fbf53437c2c9db26f92b6">NewInsert</a>();</div><div class="line"><a class="code" href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a>(t-&gt;mutable_row()-&gt;SetInt32(<span class="stringliteral">&quot;key&quot;</span>, 1234));</div><div class="line"><a class="code" href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a>(t-&gt;mutable_row()-&gt;SetStringCopy(<span class="stringliteral">&quot;foo&quot;</span>, <span class="stringliteral">&quot;bar&quot;</span>));</div><div class="line">session-&gt;Apply(t);</div></div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8889770ce62e2ca0ce5d55c9c90af6bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8889770ce62e2ca0ce5d55c9c90af6bc">&#9670;&nbsp;</a></span>mutable_row()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classKuduPartialRow.html">KuduPartialRow</a>* kudu::client::KuduWriteOperation::mutable_row </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>To work with a row, use the <a class="el" href="classKuduPartialRow.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="section return"><dt>Returns</dt><dd>Pointer to the corresponding row-like object. </dd></dl>
</div>
</div>
<a id="ab73a467a979bc76bb4738ba038d7f0bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab73a467a979bc76bb4738ba038d7f0bd">&#9670;&nbsp;</a></span>row()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classKuduPartialRow.html">KuduPartialRow</a>&amp; kudu::client::KuduWriteOperation::row </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section note"><dt>Note</dt><dd>To work with a row, use the <a class="el" href="classKuduPartialRow.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="section return"><dt>Returns</dt><dd>Immutable reference to the corresponding row-like object. </dd></dl>
</div>
</div>
<a id="a50b5405c4dfc7af038daa4780aea6e19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50b5405c4dfc7af038daa4780aea6e19">&#9670;&nbsp;</a></span>ToString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::string kudu::client::KuduWriteOperation::ToString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>String representation of the operation. </dd></dl>
<p>Implemented in <a class="el" href="classkudu_1_1client_1_1KuduDelete.html#a586dc46e1d10118465e3b834ac578de0">kudu::client::KuduDelete</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpdate.html#af05d202ea529554b6d033d51ec942718">kudu::client::KuduUpdate</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpsert.html#a0608280ef5b4eb2a53c0b303db7401c8">kudu::client::KuduUpsert</a>, and <a class="el" href="classkudu_1_1client_1_1KuduInsert.html#a7c0fb45a5bfa96574b6328be392ba240">kudu::client::KuduInsert</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><!-- contents -->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>Generated for Kudu version 1.11.1 on Tue Nov 19 2019 23:11:03 by Doxygen 1.8.13</small>
<br>
<small>Copyright © 2019 The Apache Software Foundation.</small>
</address>
</body>
</html>