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;
 
  123   EncodedKey* CreateKey() 
const;
 
  125   const KuduTable* table()
 const { 
return table_.get(); }
 
  130   int64_t SizeInBuffer() 
const;
 
  132   mutable int64_t size_in_buffer_;
 
  134   DISALLOW_COPY_AND_ASSIGN(KuduWriteOperation);
 
  147   virtual std::string 
ToString() const OVERRIDE { 
return "INSERT " + row_.ToString(); }
 
  153   virtual Type type() const OVERRIDE {
 
  160   friend class KuduTable;
 
  161   explicit KuduInsert(
const sp::shared_ptr<KuduTable>& table);
 
  172   virtual std::string 
ToString() const OVERRIDE { 
return "UPSERT " + row_.ToString(); }
 
  178   virtual Type type() const OVERRIDE {
 
  185   friend class KuduTable;
 
  186   explicit KuduUpsert(
const sp::shared_ptr<KuduTable>& table);
 
  199   virtual std::string 
ToString() const OVERRIDE { 
return "UPDATE " + row_.ToString(); }
 
  205   virtual Type type() const OVERRIDE {
 
  212   friend class KuduTable;
 
  213   explicit KuduUpdate(
const sp::shared_ptr<KuduTable>& table);
 
  226   virtual std::string 
ToString() const OVERRIDE { 
return "DELETE " + row_.ToString(); }
 
  232   virtual Type type() const OVERRIDE {
 
  239   friend class KuduTable;
 
  240   explicit KuduDelete(
const sp::shared_ptr<KuduTable>& table);
 
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:199
 
A single row update to be sent to the cluster. 
Definition: write_op.h:194
 
A single row insert to be sent to the cluster. 
Definition: write_op.h:142
 
A single row upsert to be sent to the cluster. 
Definition: write_op.h:167
 
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:147
 
Smart pointer typedefs for externally-faced code. 
 
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:172
 
virtual std::string ToString() const OVERRIDE
Definition: write_op.h:226
 
const KuduPartialRow & row() const 
Definition: write_op.h:79
 
A representation of a table on a particular cluster. 
Definition: client.h:954
 
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:221
 
A row which may only contain values for a subset of the columns. 
Definition: partial_row.h:68
 
Representation of a Kudu client session. 
Definition: client.h:1419