17 #ifndef KUDU_CLIENT_WRITE_OP_H
18 #define KUDU_CLIENT_WRITE_OP_H
23 #include "kudu/common/partial_row.h"
24 #include "kudu/util/kudu_export.h"
77 virtual std::string ToString()
const = 0;
88 virtual Type type()
const = 0;
93 sp::shared_ptr<KuduTable>
const table_;
101 friend class internal::Batcher;
102 friend class internal::WriteRpc;
107 EncodedKey* CreateKey()
const;
109 const KuduTable* table()
const {
return table_.get(); }
114 int64_t SizeInBuffer()
const;
116 mutable int64_t size_in_buffer_;
118 DISALLOW_COPY_AND_ASSIGN(KuduWriteOperation);
131 virtual std::string
ToString() const OVERRIDE {
return "INSERT " + row_.ToString(); }
137 virtual Type type() const OVERRIDE {
144 friend class KuduTable;
145 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
156 virtual std::string
ToString() const OVERRIDE {
return "UPSERT " + row_.ToString(); }
162 virtual Type type() const OVERRIDE {
169 friend class KuduTable;
170 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
183 virtual std::string
ToString() const OVERRIDE {
return "UPDATE " + row_.ToString(); }
189 virtual Type type() const OVERRIDE {
196 friend class KuduTable;
197 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
210 virtual std::string
ToString() const OVERRIDE {
return "DELETE " + row_.ToString(); }
216 virtual Type type() const OVERRIDE {
223 friend class KuduTable;
224 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:183
A single row update to be sent to the cluster.
Definition: write_op.h:178
A single row insert to be sent to the cluster.
Definition: write_op.h:126
A single row upsert to be sent to the cluster.
Definition: write_op.h:151
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:131
Smart pointer typedefs for externally-faced code.
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:156
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:210
const KuduPartialRow & row() const
Definition: write_op.h:69
A representation of a table on a particular cluster.
Definition: client.h:759
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:55
KuduPartialRow * mutable_row()
Definition: write_op.h:74
Type
Write operation types.
Definition: write_op.h:58
A single row delete to be sent to the cluster.
Definition: write_op.h:205
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:53