17 #ifndef KUDU_CLIENT_WRITE_OP_H
18 #define KUDU_CLIENT_WRITE_OP_H
26 #include "kudu/common/partial_row.h"
27 #include "kudu/util/kudu_export.h"
29 #ifdef KUDU_HEADERS_NO_STUBS
30 #include "kudu/gutil/macros.h"
31 #include "kudu/gutil/port.h"
33 #include "kudu/client/stubs.h"
104 virtual Type type()
const = 0;
109 sp::shared_ptr<KuduTable>
const table_;
117 friend class internal::Batcher;
118 friend class internal::WriteRpc;
119 friend class internal::ErrorCollector;
122 const KuduTable* table()
const {
return table_.get(); }
127 int64_t SizeInBuffer()
const;
129 mutable int64_t size_in_buffer_;
150 virtual Type type() const OVERRIDE {
157 friend class KuduTable;
158 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
171 virtual std::string
ToString() const OVERRIDE {
return "INSERT IGNORE " + row_.
ToString(); }
177 virtual Type type() const OVERRIDE {
178 return INSERT_IGNORE;
184 friend class KuduTable;
185 explicit KuduInsertIgnore(
const sp::shared_ptr<KuduTable>& table);
203 virtual Type type() const OVERRIDE {
210 friend class KuduTable;
211 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
230 virtual Type type() const OVERRIDE {
237 friend class KuduTable;
238 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
250 virtual std::string
ToString() const OVERRIDE {
return "UPDATE IGNORE " + row_.
ToString(); }
256 virtual Type type() const OVERRIDE {
257 return UPDATE_IGNORE;
263 friend class KuduTable;
264 explicit KuduUpdateIgnore(
const sp::shared_ptr<KuduTable>& table);
282 virtual Type type() const OVERRIDE {
289 friend class KuduTable;
290 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
302 virtual std::string
ToString() const OVERRIDE {
return "DELETE IGNORE " + row_.
ToString(); }
308 virtual Type type() const OVERRIDE {
309 return DELETE_IGNORE;
315 friend class KuduTable;
316 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
std::string ToString() const
A single row delete ignore to be sent to the cluster.
Definition: write_op.h:297
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:302
A single row delete to be sent to the cluster.
Definition: write_op.h:271
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:276
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
Definition: write_op.h:166
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:171
A single row insert to be sent to the cluster.
Definition: write_op.h:139
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:144
Representation of a Kudu client session.
Definition: client.h:1943
A representation of a table on a particular cluster.
Definition: client.h:1332
A single row update ignore to be sent to the cluster, missing row errors are ignored.
Definition: write_op.h:245
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:250
A single row update to be sent to the cluster.
Definition: write_op.h:219
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:224
A single row upsert to be sent to the cluster.
Definition: write_op.h:192
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:197
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:64
virtual std::string ToString() const =0
Type
Write operation types.
Definition: write_op.h:67
KuduPartialRow * mutable_row()
Definition: write_op.h:86
const KuduPartialRow & row() const
Definition: write_op.h:81
Smart pointer typedefs for externally-faced code.