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"
102 virtual Type type()
const = 0;
107 sp::shared_ptr<KuduTable>
const table_;
115 friend class internal::Batcher;
116 friend class internal::WriteRpc;
117 friend class internal::ErrorCollector;
120 const KuduTable* table()
const {
return table_.get(); }
125 int64_t SizeInBuffer()
const;
127 mutable int64_t size_in_buffer_;
148 virtual Type type() const OVERRIDE {
155 friend class KuduTable;
156 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
169 virtual std::string
ToString() const OVERRIDE {
return "INSERT IGNORE " + row_.
ToString(); }
175 virtual Type type() const OVERRIDE {
176 return INSERT_IGNORE;
182 friend class KuduTable;
183 explicit KuduInsertIgnore(
const sp::shared_ptr<KuduTable>& table);
201 virtual Type type() const OVERRIDE {
208 friend class KuduTable;
209 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
228 virtual Type type() const OVERRIDE {
235 friend class KuduTable;
236 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
255 virtual Type type() const OVERRIDE {
262 friend class KuduTable;
263 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
Representation of a Kudu client session.
Definition: client.h:1638
KuduPartialRow * mutable_row()
Definition: write_op.h:84
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:195
std::string ToString() const
Smart pointer typedefs for externally-faced code.
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:222
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:72
A single row update to be sent to the cluster.
Definition: write_op.h:217
const KuduPartialRow & row() const
Definition: write_op.h:79
virtual std::string ToString() const =0
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:169
A single row upsert to be sent to the cluster.
Definition: write_op.h:190
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:64
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:142
Type
Write operation types.
Definition: write_op.h:67
A representation of a table on a particular cluster.
Definition: client.h:1037
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:249
A single row delete to be sent to the cluster.
Definition: write_op.h:244
A single row insert to be sent to the cluster.
Definition: write_op.h:137
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
Definition: write_op.h:164