17 #ifndef KUDU_CLIENT_WRITE_OP_H 18 #define KUDU_CLIENT_WRITE_OP_H 25 #include "kudu/common/partial_row.h" 26 #include "kudu/util/kudu_export.h" 28 #ifdef KUDU_HEADERS_NO_STUBS 29 #include "kudu/gutil/macros.h" 30 #include "kudu/gutil/port.h" 32 #include "kudu/client/stubs.h" 91 virtual std::string ToString()
const = 0;
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;
122 EncodedKey* CreateKey()
const;
124 const KuduTable* table()
const {
return table_.get(); }
129 int64_t SizeInBuffer()
const;
131 mutable int64_t size_in_buffer_;
146 virtual std::string
ToString() const OVERRIDE {
return "INSERT " + row_.ToString(); }
152 virtual Type type()
const OVERRIDE {
160 explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
171 virtual std::string
ToString() const OVERRIDE {
return "UPSERT " + row_.ToString(); }
177 virtual Type type()
const OVERRIDE {
185 explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
198 virtual std::string
ToString() const OVERRIDE {
return "UPDATE " + row_.ToString(); }
204 virtual Type type()
const OVERRIDE {
212 explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
225 virtual std::string
ToString() const OVERRIDE {
return "DELETE " + row_.ToString(); }
231 virtual Type type()
const OVERRIDE {
239 explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:198
A single row update to be sent to the cluster.
Definition: write_op.h:193
Definition: callbacks.h:28
A single row insert to be sent to the cluster.
Definition: write_op.h:141
A single row upsert to be sent to the cluster.
Definition: write_op.h:166
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:146
Smart pointer typedefs for externally-faced code.
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:171
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:225
const KuduPartialRow & row() const
Definition: write_op.h:79
A representation of a table on a particular cluster.
Definition: client.h:967
A single-row write operation to be sent to a Kudu table.
Definition: write_op.h:65
KuduPartialRow * mutable_row()
Definition: write_op.h:84
Type
Write operation types.
Definition: write_op.h:68
A single row delete to be sent to the cluster.
Definition: write_op.h:220
A row which may only contain values for a subset of the columns.
Definition: partial_row.h:64