Kudu C++ client API
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
kudu::client::KuduWriteOperation Class Referenceabstract

A single-row write operation to be sent to a Kudu table. More...

#include <write_op.h>

Inheritance diagram for kudu::client::KuduWriteOperation:
kudu::client::KuduDelete kudu::client::KuduInsert kudu::client::KuduUpdate kudu::client::KuduUpsert

Public Types

enum  Type { INSERT = 1, UPDATE = 2, DELETE = 3, UPSERT = 4 }
 Write operation types.
 

Public Member Functions

const KuduPartialRowrow () const
 
KuduPartialRowmutable_row ()
 
virtual std::string ToString () const =0
 

Detailed Description

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);
*

Member Function Documentation

KuduPartialRow* kudu::client::KuduWriteOperation::mutable_row ( )
inline
Note
To work with a row, use the KuduPartialRow API for field setters, etc.
Returns
Pointer to the corresponding row-like object.
const KuduPartialRow& kudu::client::KuduWriteOperation::row ( ) const
inline
Note
To work with a row, use the KuduPartialRow API for field getters, etc.
Returns
Immutable reference to the corresponding row-like object.
virtual std::string kudu::client::KuduWriteOperation::ToString ( ) const
pure virtual
Returns
String representation of the operation.

Implemented in kudu::client::KuduDelete, kudu::client::KuduUpdate, kudu::client::KuduUpsert, and kudu::client::KuduInsert.


The documentation for this class was generated from the following file: