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" 82 virtual std::string ToString()
const = 0;
93 virtual Type type()
const = 0;
98 sp::shared_ptr<KuduTable>
const table_;
106 friend class internal::Batcher;
107 friend class internal::WriteRpc;
108 friend class internal::ErrorCollector;
113 EncodedKey* CreateKey()
const;
115 const KuduTable* table()
const {
return table_.get(); }
120 int64_t SizeInBuffer()
const;
122 mutable int64_t size_in_buffer_;
137 virtual std::string
ToString() const OVERRIDE {
return "INSERT " + row_.ToString(); }
143 virtual Type type()
const OVERRIDE {
151 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
162 virtual std::string
ToString() const OVERRIDE {
return "UPSERT " + row_.ToString(); }
168 virtual Type type()
const OVERRIDE {
176 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
189 virtual std::string
ToString() const OVERRIDE {
return "UPDATE " + row_.ToString(); }
195 virtual Type type()
const OVERRIDE {
203 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
216 virtual std::string
ToString() const OVERRIDE {
return "DELETE " + row_.ToString(); }
222 virtual Type type()
const OVERRIDE {
230 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:189
A single row update to be sent to the cluster.
Definition: write_op.h:184
Definition: callbacks.h:28
A single row insert to be sent to the cluster.
Definition: write_op.h:132
A single row upsert to be sent to the cluster.
Definition: write_op.h:157
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:137
Smart pointer typedefs for externally-faced code.
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:162
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:216
const KuduPartialRow & row() const
Definition: write_op.h:70
A representation of a table on a particular cluster.
Definition: client.h:802
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:56
KuduPartialRow * mutable_row()
Definition: write_op.h:75
Type
Write operation types.
Definition: write_op.h:59
A single row delete to be sent to the cluster.
Definition: write_op.h:211
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:55