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" 93 virtual std::string ToString()
const = 0;
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;
125 EncodedKey* CreateKey()
const;
127 const KuduTable* table()
const {
return table_.get(); }
132 int64_t SizeInBuffer()
const;
134 mutable int64_t size_in_buffer_;
149 virtual std::string
ToString() const OVERRIDE {
return "INSERT " + row_.ToString(); }
155 virtual Type type()
const OVERRIDE {
163 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
176 virtual std::string
ToString() const OVERRIDE {
return "INSERT IGNORE " + row_.ToString(); }
182 virtual Type type()
const OVERRIDE {
183 return INSERT_IGNORE;
202 virtual std::string
ToString() const OVERRIDE {
return "UPSERT " + row_.ToString(); }
208 virtual Type type()
const OVERRIDE {
216 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
229 virtual std::string
ToString() const OVERRIDE {
return "UPDATE " + row_.ToString(); }
235 virtual Type type()
const OVERRIDE {
243 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
256 virtual std::string
ToString() const OVERRIDE {
return "DELETE " + row_.ToString(); }
262 virtual Type type()
const OVERRIDE {
270 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:229
A single row update to be sent to the cluster.
Definition: write_op.h:224
A single row insert ignore to be sent to the cluster, duplicate row errors are ignored.
Definition: write_op.h:171
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:176
Definition: callbacks.h:28
A single row insert to be sent to the cluster.
Definition: write_op.h:144
A single row upsert to be sent to the cluster.
Definition: write_op.h:197
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:149
Smart pointer typedefs for externally-faced code.
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:202
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:256
const KuduPartialRow & row() const
Definition: write_op.h:81
A representation of a table on a particular cluster.
Definition: client.h:1020
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:66
KuduPartialRow * mutable_row()
Definition: write_op.h:86
Type
Write operation types.
Definition: write_op.h:69
A single row delete to be sent to the cluster.
Definition: write_op.h:251
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:72
Representation of a Kudu client session.
Definition: client.h:1599