Kudu C++ client API
|
A row which may only contain values for a subset of the columns. More...
#include <partial_row.h>
Public Member Functions | |
KuduPartialRow (const Schema *schema) | |
KuduPartialRow (const KuduPartialRow &other) | |
KuduPartialRow & | operator= (KuduPartialRow other) |
Status | SetVarchar (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetVarchar (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetNull (const Slice &col_name) WARN_UNUSED_RESULT |
Status | SetNull (int col_idx) WARN_UNUSED_RESULT |
Status | Unset (const Slice &col_name) WARN_UNUSED_RESULT |
Status | Unset (int col_idx) WARN_UNUSED_RESULT |
bool | IsColumnSet (const Slice &col_name) const |
bool | IsColumnSet (int col_idx) const |
bool | IsNull (const Slice &col_name) const |
bool | IsNull (int col_idx) const |
Status | EncodeRowKey (std::string *encoded_key) const |
std::string | ToEncodedRowKeyOrDie () const |
bool | IsKeySet () const |
bool | IsNonUniqueKeySet () const |
bool | IsAutoIncrementingColumnSet () const |
bool | AllColumnsSet () const |
std::string | ToString () const |
const Schema * | schema () const |
Setters for integral type columns by name. | |
Status | SetBool (const Slice &col_name, bool val) WARN_UNUSED_RESULT |
Status | SetInt8 (const Slice &col_name, int8_t val) WARN_UNUSED_RESULT |
Status | SetInt16 (const Slice &col_name, int16_t val) WARN_UNUSED_RESULT |
Status | SetInt32 (const Slice &col_name, int32_t val) WARN_UNUSED_RESULT |
Status | SetInt64 (const Slice &col_name, int64_t val) WARN_UNUSED_RESULT |
Status | SetSerial (const Slice &col_name, uint64_t val) WARN_UNUSED_RESULT |
Status | SetUnixTimeMicros (const Slice &col_name, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT |
Status | SetDate (const Slice &col_name, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT |
Status | SetFloat (const Slice &col_name, float val) WARN_UNUSED_RESULT |
Status | SetDouble (const Slice &col_name, double val) WARN_UNUSED_RESULT |
Setters for integral type columns by index. | |
These setters are the same as corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders). | |
Status | SetBool (int col_idx, bool val) WARN_UNUSED_RESULT |
Status | SetInt8 (int col_idx, int8_t val) WARN_UNUSED_RESULT |
Status | SetInt16 (int col_idx, int16_t val) WARN_UNUSED_RESULT |
Status | SetInt32 (int col_idx, int32_t val) WARN_UNUSED_RESULT |
Status | SetInt64 (int col_idx, int64_t val) WARN_UNUSED_RESULT |
Status | SetSerial (int col_idx, uint64_t val) WARN_UNUSED_RESULT |
Status | SetUnixTimeMicros (int col_idx, int64_t micros_since_utc_epoch) WARN_UNUSED_RESULT |
Status | SetDate (int col_idx, int32_t days_since_unix_epoch) WARN_UNUSED_RESULT |
Status | SetFloat (int col_idx, float val) WARN_UNUSED_RESULT |
Status | SetDouble (int col_idx, double val) WARN_UNUSED_RESULT |
Setters for binary/string columns by name (copying). | |
Status | SetBinary (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetString (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetBinaryCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by index (copying). | |
Status | SetBinary (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetString (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetBinaryCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by name (non-copying). | |
Status | SetBinaryNoCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringNoCopy (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Advanced/Unstable API | |
There are no guarantees that the validation performed by these methods for 'val' will not change. | |
Status | SetVarcharNoCopyUnsafe (const Slice &col_name, const Slice &val) WARN_UNUSED_RESULT |
Status | SetVarcharNoCopyUnsafe (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Setters for binary/string columns by index (non-copying). | |
Status | SetBinaryNoCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
Status | SetStringNoCopy (int col_idx, const Slice &val) WARN_UNUSED_RESULT |
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 | GetSerial (const Slice &col_name, uint64_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 column of integral type by column index. | |
These getters are the same as the corresponding column-name-based getters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders). | |
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 | GetSerial (int col_idx, uint64_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 row which may only contain values for a subset of the columns.
This object contains a normal contiguous row, plus a bitfield indicating which columns have been set. Additionally, this type may optionally own copies of indirect data for variable length columns.
|
explicit |
[in] | schema | Schema to use for the row. The given Schema object must remain valid for the lifetime of this row. |
KuduPartialRow::KuduPartialRow | ( | const KuduPartialRow & | other | ) |
Create a copy of KuduPartialRow instance.
[in] | other | KuduPartialRow instance to copy from. |
bool KuduPartialRow::AllColumnsSet | ( | ) | const |
true
if all column values have been set. Status KuduPartialRow::EncodeRowKey | ( | std::string * | encoded_key | ) | const |
Encode a row key.
The result is suitable for use as a tablet split key, an encoded key range, etc.
[out] | encoded_key | The encoded key (i.e. the result of the encoding). |
Status KuduPartialRow::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 KuduPartialRow::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 they use indices to avoid hashmap lookups, 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 KuduPartialRow::GetBool | ( | const Slice & | col_name, |
bool * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetBool | ( | int | col_idx, |
bool * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetDate | ( | const Slice & | col_name, |
int32_t * | days_since_unix_epoch | ||
) | const |
[in] | col_name | The name of the column. |
[out] | days_since_unix_epoch | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetDate | ( | int | col_idx, |
int32_t * | days_since_unix_epoch | ||
) | const |
[in] | col_idx | The index of the target column. |
[out] | days_since_unix_epoch | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetDouble | ( | const Slice & | col_name, |
double * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetDouble | ( | int | col_idx, |
double * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetFloat | ( | const Slice & | col_name, |
float * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetFloat | ( | int | col_idx, |
float * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt16 | ( | const Slice & | col_name, |
int16_t * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt16 | ( | int | col_idx, |
int16_t * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt32 | ( | const Slice & | col_name, |
int32_t * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt32 | ( | int | col_idx, |
int32_t * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt64 | ( | const Slice & | col_name, |
int64_t * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt64 | ( | int | col_idx, |
int64_t * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetInt8 | ( | const Slice & | col_name, |
int8_t * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetInt8 | ( | int | col_idx, |
int8_t * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::GetSerial | ( | const Slice & | col_name, |
uint64_t * | val | ||
) | const |
Get value of the column specified by name.
[in] | col_name | The name of the column. |
[out] | val | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetSerial | ( | int | col_idx, |
uint64_t * | val | ||
) | const |
Get value of a column of integral type by column index.
[in] | col_idx | The index of the target column. |
[out] | val | The value of the target column. |
true:
NULL
. Status KuduPartialRow::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 KuduPartialRow::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 they use indices to avoid hashmap lookups, 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 KuduPartialRow::GetUnixTimeMicros | ( | const Slice & | col_name, |
int64_t * | micros_since_utc_epoch | ||
) | const |
[in] | col_name | The name of the column. |
[out] | micros_since_utc_epoch | The value of the column. |
true:
NULL
. Status KuduPartialRow::GetUnixTimeMicros | ( | int | col_idx, |
int64_t * | micros_since_utc_epoch | ||
) | const |
[in] | col_idx | The index of the target column. |
[out] | micros_since_utc_epoch | The value of the target column. |
true:
NULL
. Status KuduPartialRow::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 KuduPartialRow::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 they use indices to avoid hashmap lookups, 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
. bool KuduPartialRow::IsAutoIncrementingColumnSet | ( | ) | const |
true
if auto-incrementing column has been set for this mutation. bool KuduPartialRow::IsColumnSet | ( | const Slice & | col_name | ) | const |
Check whether the specified column is set for the row.
[in] | col_name | Name of the column. |
true
iff the given column has been specified. bool KuduPartialRow::IsColumnSet | ( | int | col_idx | ) | const |
Check whether the specified column is set for the row.
[in] | col_idx | The index of the column. |
true
iff the given column has been specified. bool KuduPartialRow::IsKeySet | ( | ) | const |
true
if all key column values have been set for this mutation. bool KuduPartialRow::IsNonUniqueKeySet | ( | ) | const |
true
if all non-unique key column values have been set for this mutation. bool KuduPartialRow::IsNull | ( | const Slice & | col_name | ) | const |
Check whether the specified column is NULL
for the row.
[in] | col_name | Name of the target column. |
true
iff the given column's value is NULL
. bool KuduPartialRow::IsNull | ( | int | col_idx | ) | const |
Check whether the specified column is NULL
for the row.
[in] | col_idx | The index of the column. |
true
iff the given column's value is NULL
. KuduPartialRow & KuduPartialRow::operator= | ( | KuduPartialRow | other | ) |
Overwrite this KuduPartialRow instance with data from other instance.
[in] | other | KuduPartialRow instance to assign from. |
|
inline |
Status KuduPartialRow::SetBinary | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, copying the specified data immediately.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinary | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, copying the specified data immediately.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryCopy | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, copying the specified data immediately.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryCopy | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, copying the specified data immediately.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryNoCopy | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, not copying the specified data.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBinaryNoCopy | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, not copying the specified data.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBool | ( | const Slice & | col_name, |
bool | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetBool | ( | int | col_idx, |
bool | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetDate | ( | const Slice & | col_name, |
int32_t | days_since_unix_epoch | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | days_since_unix_epoch | The value to set. |
Status KuduPartialRow::SetDate | ( | int | col_idx, |
int32_t | days_since_unix_epoch | ||
) |
[in] | col_idx | The index of the target column. |
[in] | days_since_unix_epoch | The value to set. |
Status KuduPartialRow::SetDouble | ( | const Slice & | col_name, |
double | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetDouble | ( | int | col_idx, |
double | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetFloat | ( | const Slice & | col_name, |
float | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetFloat | ( | int | col_idx, |
float | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt16 | ( | const Slice & | col_name, |
int16_t | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt16 | ( | int | col_idx, |
int16_t | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt32 | ( | const Slice & | col_name, |
int32_t | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt32 | ( | int | col_idx, |
int32_t | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt64 | ( | const Slice & | col_name, |
int64_t | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt64 | ( | int | col_idx, |
int64_t | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt8 | ( | const Slice & | col_name, |
int8_t | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetInt8 | ( | int | col_idx, |
int8_t | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetNull | ( | const Slice & | col_name | ) |
Set column value to NULL
; the column is identified by its name.
This will only succeed on nullable columns. Use Unset() to restore column value to its default.
[in] | col_name | Name of the target column. |
Status KuduPartialRow::SetNull | ( | int | col_idx | ) |
Set column value to NULL
; the column is identified by its index.
This will only succeed on nullable columns. Use Unset() to restore column value to its default.
[in] | col_idx | The index of the target column. |
Status KuduPartialRow::SetSerial | ( | const Slice & | col_name, |
uint64_t | val | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetSerial | ( | int | col_idx, |
uint64_t | val | ||
) |
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetString | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, copying the specified data immediately.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetString | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, copying the specified data immediately.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringCopy | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, copying the specified data immediately.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringCopy | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, copying the specified data immediately.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringNoCopy | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the binary/string value for a column by name, not copying the specified data.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetStringNoCopy | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the binary/string value for a column by index, not copying the specified data.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetUnixTimeMicros | ( | const Slice & | col_name, |
int64_t | micros_since_utc_epoch | ||
) |
Set value for a column by name.
[in] | col_name | Name of the target column. |
[in] | micros_since_utc_epoch | The value to set. |
Status KuduPartialRow::SetUnixTimeMicros | ( | int | col_idx, |
int64_t | micros_since_utc_epoch | ||
) |
[in] | col_idx | The index of the target column. |
[in] | micros_since_utc_epoch | The value to set. |
Status KuduPartialRow::SetVarchar | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
Set the varchar value for a column by name, copying the specified data immediately.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarchar | ( | int | col_idx, |
const Slice & | val | ||
) |
Set the varchar value for a column by index, copying the specified data immediately.
These setters are the same as the corresponding column-name-based setters, but with numeric column indexes. These are faster since they avoid hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarcharNoCopyUnsafe | ( | const Slice & | col_name, |
const Slice & | val | ||
) |
This method expects the values to be truncated already and they only do a basic validation that the data is not larger than the maximum column length (as indicated by the schema) multiplied by 4, as that's the upper limit if only 4-byte UTF8 characters are used. This is subject to change in the future.
[in] | col_name | Name of the target column. |
[in] | val | The value to set. |
Status KuduPartialRow::SetVarcharNoCopyUnsafe | ( | int | col_idx, |
const Slice & | val | ||
) |
This method expects the values to be truncated already and they only do a basic validation that the data is not larger than the maximum column length (as indicated by the schema) multiplied by 4, as that's the upper limit if only 4-byte UTF8 characters are used. This is subject to change in the future.
This setter is the same as the corresponding column-name-based setter, but with numeric column indexes. This is faster since it avoids hashmap lookups, so should be preferred in performance-sensitive code (e.g. bulk loaders).
[in] | col_idx | The index of the target column. |
[in] | val | The value to set. |
std::string KuduPartialRow::ToEncodedRowKeyOrDie | ( | ) | const |
Convenience method which is similar to EncodeRowKey.
This is equivalent to the EncodeRowKey, but triggers a FATAL error on failure.
std::string KuduPartialRow::ToString | ( | ) | const |
Status KuduPartialRow::Unset | ( | const Slice & | col_name | ) |
Unset the given column by name, restoring its default value.
NULL
.[in] | col_name | Name of the target column. |
Status KuduPartialRow::Unset | ( | int | col_idx | ) |
Unset the given column by index, restoring its default value.
NULL
.[in] | col_idx | The index of the target column. |