17#ifndef KUDU_CLIENT_WRITE_OP_H
18#define KUDU_CLIENT_WRITE_OP_H
28#include "kudu/common/partial_row.h"
29#include "kudu/util/kudu_export.h"
31#ifdef KUDU_HEADERS_NO_STUBS
32#include "kudu/gutil/macros.h"
33#include "kudu/gutil/port.h"
35#include "kudu/client/stubs.h"
112 virtual Type type()
const = 0;
117 sp::shared_ptr<KuduTable>
const table_;
125 friend class internal::Batcher;
126 friend class internal::WriteRpc;
127 friend class internal::ErrorCollector;
133 int64_t SizeInBuffer()
const;
135 mutable int64_t size_in_buffer_;
150 virtual std::string
ToString() const OVERRIDE {
return "INSERT " + row_.ToString(); }
156 virtual Type type() const OVERRIDE {
163 friend class KuduTable;
164 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
177 virtual std::string
ToString() const OVERRIDE {
return "INSERT IGNORE " + row_.ToString(); }
183 virtual Type type() const OVERRIDE {
184 return INSERT_IGNORE;
190 friend class KuduTable;
191 explicit KuduInsertIgnore(
const sp::shared_ptr<KuduTable>& table);
203 virtual std::string
ToString() const OVERRIDE {
return "UPSERT " + row_.ToString(); }
209 virtual Type type() const OVERRIDE {
216 friend class KuduTable;
217 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
230 std::string
ToString() const OVERRIDE {
return "UPSERT IGNORE " + row_.ToString(); }
236 Type type() const OVERRIDE {
237 return UPSERT_IGNORE;
243 friend class KuduTable;
244 explicit KuduUpsertIgnore(
const sp::shared_ptr<KuduTable>& table);
257 virtual std::string
ToString() const OVERRIDE {
return "UPDATE " + row_.ToString(); }
263 virtual Type type() const OVERRIDE {
270 friend class KuduTable;
271 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
284 virtual std::string
ToString() const OVERRIDE {
return "UPDATE IGNORE " + row_.ToString(); }
290 virtual Type type() const OVERRIDE {
291 return UPDATE_IGNORE;
297 friend class KuduTable;
298 explicit KuduUpdateIgnore(
const sp::shared_ptr<KuduTable>& table);
310 virtual std::string
ToString() const OVERRIDE {
return "DELETE " + row_.ToString(); }
316 virtual Type type() const OVERRIDE {
323 friend class KuduTable;
324 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
336 virtual std::string
ToString() const OVERRIDE {
return "DELETE IGNORE " + row_.ToString(); }
342 virtual Type type() const OVERRIDE {
343 return DELETE_IGNORE;
349 friend class KuduTable;
350 explicit KuduDeleteIgnore(
const sp::shared_ptr<KuduTable>& table);
A row which may only contain values for a subset of the columns.
Definition partial_row.h:72
A single row delete ignore to be sent to the cluster.
Definition write_op.h:331
virtual std::string ToString() const OVERRIDE
Definition write_op.h:336
A single row delete to be sent to the cluster.
Definition write_op.h:305
virtual std::string ToString() const OVERRIDE
Definition write_op.h:310
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
Definition write_op.h:172
virtual std::string ToString() const OVERRIDE
Definition write_op.h:177
A single row insert to be sent to the cluster.
Definition write_op.h:145
virtual std::string ToString() const OVERRIDE
Definition write_op.h:150
Representation of a Kudu client session.
Definition client.h:2292
A representation of a table on a particular cluster.
Definition client.h:1613
A single row update ignore to be sent to the cluster, missing row errors and errors on updating immut...
Definition write_op.h:279
virtual std::string ToString() const OVERRIDE
Definition write_op.h:284
A single row update to be sent to the cluster.
Definition write_op.h:252
virtual std::string ToString() const OVERRIDE
Definition write_op.h:257
A single row upsert ignore to be sent to the cluster, errors on updating immutable cells are ignored.
Definition write_op.h:225
std::string ToString() const OVERRIDE
Definition write_op.h:230
A single row upsert to be sent to the cluster.
Definition write_op.h:198
virtual std::string ToString() const OVERRIDE
Definition write_op.h:203
A single-row write operation to be sent to a Kudu table.
Definition write_op.h:66
virtual std::string ToString() const =0
Type
Write operation types.
Definition write_op.h:69
const KuduPartialRow & row() const
Definition write_op.h:84
const KuduTable * table() const
Definition write_op.h:100
KuduPartialRow * mutable_row()
Definition write_op.h:89
Smart pointer typedefs for externally-faced code.