Kudu C++ client API
|
A handle for a single row in KuduScanBatch
.
More...
#include <scan_batch.h>
Public Member Functions | |
RowPtr () | |
const RowPtr * | operator-> () const |
bool | IsNull (const Slice &col_name) const |
bool | IsNull (int col_idx) const |
Status | IsDeleted (bool *val) const WARN_UNUSED_RESULT KUDU_NO_EXPORT |
const void * | cell (int col_idx) const |
std::string | ToString () const |
Getters for integral type columns by column name. | |
Status | GetBool (const Slice &col_name, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (const Slice &col_name, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (const Slice &col_name, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (const Slice &col_name, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (const Slice &col_name, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (const Slice &col_name, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (const Slice &col_name, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (const Slice &col_name, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (const Slice &col_name, double *val) const WARN_UNUSED_RESULT |
Getters for integral type columns by column index. | |
These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code. | |
Status | GetBool (int col_idx, bool *val) const WARN_UNUSED_RESULT |
Status | GetInt8 (int col_idx, int8_t *val) const WARN_UNUSED_RESULT |
Status | GetInt16 (int col_idx, int16_t *val) const WARN_UNUSED_RESULT |
Status | GetInt32 (int col_idx, int32_t *val) const WARN_UNUSED_RESULT |
Status | GetInt64 (int col_idx, int64_t *val) const WARN_UNUSED_RESULT |
Status | GetUnixTimeMicros (int col_idx, int64_t *micros_since_utc_epoch) const WARN_UNUSED_RESULT |
Status | GetDate (int col_idx, int32_t *days_since_unix_epoch) const WARN_UNUSED_RESULT |
Status | GetFloat (int col_idx, float *val) const WARN_UNUSED_RESULT |
Status | GetDouble (int col_idx, double *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column name. | |
Status | GetString (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (const Slice &col_name, Slice *val) const WARN_UNUSED_RESULT |
Getters for string/binary/varchar column by column index. | |
Status | GetString (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetBinary (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
Status | GetVarchar (int col_idx, Slice *val) const WARN_UNUSED_RESULT |
A handle for a single row in KuduScanBatch
.
|
inline |
Construct an invalid RowPtr. Before use, you must assign a properly-initialized value.
const void * kudu::client::KuduScanBatch::RowPtr::cell | ( | int | col_idx | ) | const |
Get the column's row data.
[in] | col_idx | The index of the column. |
Status kudu::client::KuduScanBatch::RowPtr::GetBinary | ( | const Slice & | col_name, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its name.
[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetBinary | ( | int | col_idx, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its index.
These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetBool | ( | const Slice & | col_name, |
bool * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetBool | ( | int | col_idx, |
bool * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetDate | ( | const Slice & | col_name, |
int32_t * | days_since_unix_epoch ) const |
[in] | col_name | The name of the target column. |
[out] | days_since_unix_epoch | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetDate | ( | int | col_idx, |
int32_t * | days_since_unix_epoch ) const |
[in] | col_idx | The index of the column. |
[out] | days_since_unix_epoch | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetDouble | ( | const Slice & | col_name, |
double * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetDouble | ( | int | col_idx, |
double * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetFloat | ( | const Slice & | col_name, |
float * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetFloat | ( | int | col_idx, |
float * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt16 | ( | const Slice & | col_name, |
int16_t * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt16 | ( | int | col_idx, |
int16_t * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt32 | ( | const Slice & | col_name, |
int32_t * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt32 | ( | int | col_idx, |
int32_t * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt64 | ( | const Slice & | col_name, |
int64_t * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt64 | ( | int | col_idx, |
int64_t * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt8 | ( | const Slice & | col_name, |
int8_t * | val ) const |
[in] | col_name | The name of the target column. |
[out] | val | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetInt8 | ( | int | col_idx, |
int8_t * | val ) const |
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetString | ( | const Slice & | col_name, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its name.
[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetString | ( | int | col_idx, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its index.
These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetUnixTimeMicros | ( | const Slice & | col_name, |
int64_t * | micros_since_utc_epoch ) const |
[in] | col_name | The name of the target column. |
[out] | micros_since_utc_epoch | Placeholder for the result value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetUnixTimeMicros | ( | int | col_idx, |
int64_t * | micros_since_utc_epoch ) const |
[in] | col_idx | The index of the column. |
[out] | micros_since_utc_epoch | Pointer to the placeholder to put the resulting value. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetVarchar | ( | const Slice & | col_name, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its name.
[in] | col_name | Name of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::GetVarchar | ( | int | col_idx, |
Slice * | val ) const |
Get the string/binary/varchar value for a column by its index.
These methods are faster than their name-based counterparts since using indices avoids a hashmap lookup, so index-based getters should be preferred in performance-sensitive code.
[in] | col_idx | The index of the column. |
[out] | val | Pointer to the placeholder to put the resulting value. Note that the method does not copy the value. Callers should copy the resulting Slice if necessary. |
true:
NULL
. Status kudu::client::KuduScanBatch::RowPtr::IsDeleted | ( | bool * | val | ) | const |
Get the value of the IS_DELETED virtual column.
[out] | val | Placeholder for the result value. |
bool kudu::client::KuduScanBatch::RowPtr::IsNull | ( | const Slice & | col_name | ) | const |
[in] | col_name | Name of the column. |
true
iff the specified column of the row has NULL
value. bool kudu::client::KuduScanBatch::RowPtr::IsNull | ( | int | col_idx | ) | const |
[in] | col_idx | Index of the column. |
true
iff the specified column of the row has NULL
value.
|
inline |
Overloaded operator -> to support pointer trait for access via const_iterator.
std::string kudu::client::KuduScanBatch::RowPtr::ToString | ( | ) | const |