A single-row write operation to be sent to a Kudu table. More...
#include <write_op.h>
Public Types | |
enum | Type { INSERT = 1, UPDATE = 2, DELETE = 3, UPSERT = 4 } |
Write operation types. | |
Public Member Functions | |
const KuduPartialRow & | row () const |
KuduPartialRow * | mutable_row () |
virtual std::string | ToString () const =0 |
Friends | |
class | internal::Batcher |
class | internal::WriteRpc |
A single-row write operation to be sent to a Kudu table.
This is the abstract base class from which the particular row operations (KuduInsert, KuduUpdate, etc) are derived. These subclasses are instantiated by KuduTable::NewInsert(), etc.
The row key, as well as the columns to be inserted or updated are set using the embedded KuduPartialRow object accessible via mutable_row().
Typical usage example:
KuduInsert* t = table->NewInsert(); KUDU_CHECK_OK(t->mutable_row()->SetInt32("key", 1234)); KUDU_CHECK_OK(t->mutable_row()->SetStringCopy("foo", "bar")); session->Apply(t);
KuduPartialRow* kudu::client::KuduWriteOperation::mutable_row | ( | ) | [inline] |
const KuduPartialRow& kudu::client::KuduWriteOperation::row | ( | ) | const [inline] |
virtual std::string kudu::client::KuduWriteOperation::ToString | ( | ) | const [pure virtual] |
Implemented in kudu::client::KuduInsert, kudu::client::KuduUpsert, kudu::client::KuduUpdate, and kudu::client::KuduDelete.