blob: 5a03655c7057079af0ff333534dd080e4460eff5 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<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 id="projectrow">
<td id="projectalign">
<div id="projectname">Kudu C++ client API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</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.png" 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" title="A single row delete to be sent to the cluster." alt="kudu::client::KuduDelete" shape="rect" coords="205,56,400,80"/>
<area href="classkudu_1_1client_1_1KuduDeleteIgnore.html" title="A single row delete ignore to be sent to the cluster." alt="kudu::client::KuduDeleteIgnore" shape="rect" coords="205,112,400,136"/>
<area href="classkudu_1_1client_1_1KuduInsert.html" title="A single row insert to be sent to the cluster." alt="kudu::client::KuduInsert" shape="rect" coords="205,168,400,192"/>
<area href="classkudu_1_1client_1_1KuduInsertIgnore.html" title="A single row insert ignore to be sent to the cluster, duplicate row errors are ignored." alt="kudu::client::KuduInsertIgnore" shape="rect" coords="205,224,400,248"/>
<area href="classkudu_1_1client_1_1KuduUpdate.html" title="A single row update to be sent to the cluster." alt="kudu::client::KuduUpdate" shape="rect" coords="205,280,400,304"/>
<area href="classkudu_1_1client_1_1KuduUpdateIgnore.html" title="A single row update ignore to be sent to the cluster, missing row errors and errors on updating immut..." alt="kudu::client::KuduUpdateIgnore" shape="rect" coords="205,336,400,360"/>
<area href="classkudu_1_1client_1_1KuduUpsert.html" title="A single row upsert to be sent to the cluster." alt="kudu::client::KuduUpsert" shape="rect" coords="205,392,400,416"/>
<area href="classkudu_1_1client_1_1KuduUpsertIgnore.html" title="A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored." alt="kudu::client::KuduUpsertIgnore" shape="rect" coords="205,448,400,472"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a87d94ee5801a6b16fc6d1f44ee2e4357" id="r_a87d94ee5801a6b16fc6d1f44ee2e4357"><td class="memItemLeft" align="right" valign="top"><a id="a87d94ee5801a6b16fc6d1f44ee2e4357" name="a87d94ee5801a6b16fc6d1f44ee2e4357"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#a87d94ee5801a6b16fc6d1f44ee2e4357">Type</a> { <br />
&#160;&#160;<b>INSERT</b> = 1
, <b>UPDATE</b> = 2
, <b>DELETE</b> = 3
, <b>UPSERT</b> = 4
, <br />
&#160;&#160;<b>INSERT_IGNORE</b> = 5
, <b>UPDATE_IGNORE</b> = 6
, <b>DELETE_IGNORE</b> = 7
, <b>UPSERT_IGNORE</b> = 8
<br />
}</td></tr>
<tr class="memdesc:a87d94ee5801a6b16fc6d1f44ee2e4357"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write operation types. <br /></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 id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8f3d609ad94525678efe05e1936a65eb" id="r_a8f3d609ad94525678efe05e1936a65eb"><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#a8f3d609ad94525678efe05e1936a65eb">row</a> () const</td></tr>
<tr class="separator:a8f3d609ad94525678efe05e1936a65eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afab8fedc884d8321b20d3c68cdbf9e1c" id="r_afab8fedc884d8321b20d3c68cdbf9e1c"><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#afab8fedc884d8321b20d3c68cdbf9e1c">mutable_row</a> ()</td></tr>
<tr class="separator:afab8fedc884d8321b20d3c68cdbf9e1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50b5405c4dfc7af038daa4780aea6e19" id="r_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>
<tr class="memitem:aba84e423143588dd0accce788afd5312" id="r_aba84e423143588dd0accce788afd5312"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classkudu_1_1client_1_1KuduTable.html">KuduTable</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkudu_1_1client_1_1KuduWriteOperation.html#aba84e423143588dd0accce788afd5312">table</a> () const</td></tr>
<tr class="separator:aba84e423143588dd0accce788afd5312"><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#ac61fe45d858b9aadf9b061900cab5d95">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#afab8fedc884d8321b20d3c68cdbf9e1c">mutable_row()</a>.</p>
<p>Typical usage example: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classkudu_1_1client_1_1KuduInsert.html">KuduInsert</a>* t = <a class="code hl_function" href="classkudu_1_1client_1_1KuduWriteOperation.html#aba84e423143588dd0accce788afd5312">table</a>-&gt;<a class="code hl_function" href="classkudu_1_1client_1_1KuduTable.html#ac61fe45d858b9aadf9b061900cab5d95">NewInsert</a>();</div>
<div class="line"><a class="code hl_define" href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a>(t-&gt;<a class="code hl_function" href="classkudu_1_1client_1_1KuduWriteOperation.html#afab8fedc884d8321b20d3c68cdbf9e1c">mutable_row</a>()-&gt;<a class="code hl_function" href="classKuduPartialRow.html#a0980615e522c4e7f8c8ddf80df0ec887">SetInt32</a>(<span class="stringliteral">&quot;key&quot;</span>, 1234));</div>
<div class="line"><a class="code hl_define" href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a>(t-&gt;<a class="code hl_function" href="classkudu_1_1client_1_1KuduWriteOperation.html#afab8fedc884d8321b20d3c68cdbf9e1c">mutable_row</a>()-&gt;<a class="code hl_function" href="classKuduPartialRow.html#aac6ae9c9f8267cd6a52e46121b5f0199">SetStringCopy</a>(<span class="stringliteral">&quot;foo&quot;</span>, <span class="stringliteral">&quot;bar&quot;</span>));</div>
<div class="line"><a class="code hl_define" href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a>(session-&gt;Apply(t));</div>
<div class="ttc" id="aclassKuduPartialRow_html_a0980615e522c4e7f8c8ddf80df0ec887"><div class="ttname"><a href="classKuduPartialRow.html#a0980615e522c4e7f8c8ddf80df0ec887">KuduPartialRow::SetInt32</a></div><div class="ttdeci">Status SetInt32(const Slice &amp;col_name, int32_t val) WARN_UNUSED_RESULT</div></div>
<div class="ttc" id="aclassKuduPartialRow_html_aac6ae9c9f8267cd6a52e46121b5f0199"><div class="ttname"><a href="classKuduPartialRow.html#aac6ae9c9f8267cd6a52e46121b5f0199">KuduPartialRow::SetStringCopy</a></div><div class="ttdeci">Status SetStringCopy(const Slice &amp;col_name, const Slice &amp;val) WARN_UNUSED_RESULT</div></div>
<div class="ttc" id="aclasskudu_1_1client_1_1KuduInsert_html"><div class="ttname"><a href="classkudu_1_1client_1_1KuduInsert.html">kudu::client::KuduInsert</a></div><div class="ttdoc">A single row insert to be sent to the cluster.</div><div class="ttdef"><b>Definition</b> write_op.h:145</div></div>
<div class="ttc" id="aclasskudu_1_1client_1_1KuduTable_html_ac61fe45d858b9aadf9b061900cab5d95"><div class="ttname"><a href="classkudu_1_1client_1_1KuduTable.html#ac61fe45d858b9aadf9b061900cab5d95">kudu::client::KuduTable::NewInsert</a></div><div class="ttdeci">KuduInsert * NewInsert()</div></div>
<div class="ttc" id="aclasskudu_1_1client_1_1KuduWriteOperation_html_aba84e423143588dd0accce788afd5312"><div class="ttname"><a href="classkudu_1_1client_1_1KuduWriteOperation.html#aba84e423143588dd0accce788afd5312">kudu::client::KuduWriteOperation::table</a></div><div class="ttdeci">const KuduTable * table() const</div><div class="ttdef"><b>Definition</b> write_op.h:100</div></div>
<div class="ttc" id="aclasskudu_1_1client_1_1KuduWriteOperation_html_afab8fedc884d8321b20d3c68cdbf9e1c"><div class="ttname"><a href="classkudu_1_1client_1_1KuduWriteOperation.html#afab8fedc884d8321b20d3c68cdbf9e1c">kudu::client::KuduWriteOperation::mutable_row</a></div><div class="ttdeci">KuduPartialRow * mutable_row()</div><div class="ttdef"><b>Definition</b> write_op.h:89</div></div>
<div class="ttc" id="astatus_8h_html_ac503ba85e942147294cdc82087da60f6"><div class="ttname"><a href="status_8h.html#ac503ba85e942147294cdc82087da60f6">KUDU_CHECK_OK</a></div><div class="ttdeci">#define KUDU_CHECK_OK(s)</div><div class="ttdoc">If the status is bad, CHECK immediately, appending the status to the logged message.</div><div class="ttdef"><b>Definition</b> status.h:102</div></div>
</div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="afab8fedc884d8321b20d3c68cdbf9e1c" name="afab8fedc884d8321b20d3c68cdbf9e1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afab8fedc884d8321b20d3c68cdbf9e1c">&#9670;&#160;</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="a8f3d609ad94525678efe05e1936a65eb" name="a8f3d609ad94525678efe05e1936a65eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f3d609ad94525678efe05e1936a65eb">&#9670;&#160;</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="aba84e423143588dd0accce788afd5312" name="aba84e423143588dd0accce788afd5312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba84e423143588dd0accce788afd5312">&#9670;&#160;</a></span>table()</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="classkudu_1_1client_1_1KuduTable.html">KuduTable</a> * kudu::client::KuduWriteOperation::table </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 return"><dt>Returns</dt><dd>Raw pointer to <a class="el" href="classkudu_1_1client_1_1KuduTable.html" title="A representation of a table on a particular cluster.">KuduTable</a> object representing the table that the write is targeted for. </dd></dl>
</div>
</div>
<a id="a50b5405c4dfc7af038daa4780aea6e19" name="a50b5405c4dfc7af038daa4780aea6e19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50b5405c4dfc7af038daa4780aea6e19">&#9670;&#160;</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_1KuduInsert.html#a7c0fb45a5bfa96574b6328be392ba240">kudu::client::KuduInsert</a>, <a class="el" href="classkudu_1_1client_1_1KuduInsertIgnore.html#a3808cd171850b78391b0636d1e5bef83">kudu::client::KuduInsertIgnore</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpsert.html#a0608280ef5b4eb2a53c0b303db7401c8">kudu::client::KuduUpsert</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpsertIgnore.html#a4e5e464787808e839537c4525218b489">kudu::client::KuduUpsertIgnore</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpdate.html#af05d202ea529554b6d033d51ec942718">kudu::client::KuduUpdate</a>, <a class="el" href="classkudu_1_1client_1_1KuduUpdateIgnore.html#ac8ae744ab8d2c8ebe887fb00c6deb261">kudu::client::KuduUpdateIgnore</a>, <a class="el" href="classkudu_1_1client_1_1KuduDelete.html#a586dc46e1d10118465e3b834ac578de0">kudu::client::KuduDelete</a>, and <a class="el" href="classkudu_1_1client_1_1KuduDeleteIgnore.html#ab3099c4af9fa0469e6b5b8d972a68763">kudu::client::KuduDeleteIgnore</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.17.0 on Mon Sep 4 2023 19:49:30 by Doxygen 1.9.8</small>
<br>
<small>Copyright © 2023 The Apache Software Foundation.</small>
</address>
</body>
</html>