|
Kudu C++ client API
|
A representation of a table's schema. More...
#include <schema.h>
Public Member Functions | |
| KuduSchema (const KuduSchema &other) | |
| Status | Reset (const std::vector< KuduColumnSchema > &columns, int key_columns) WARN_UNUSED_RESULT |
| bool | Equals (const KuduSchema &other) const |
| bool | operator== (const KuduSchema &rhs) const |
| bool | operator!= (const KuduSchema &rhs) const |
| KuduColumnSchema | Column (size_t idx) const |
| bool | HasColumn (const std::string &col_name, KuduColumnSchema *col_schema) const |
| size_t | num_columns () const |
| void | GetPrimaryKeyColumnIndexes (std::vector< int > *indexes) const |
| int | GetAutoIncrementingColumnIndex () const |
| KuduPartialRow * | NewRow () const |
| std::string | ToString () const |
Assign/copy the schema | |
| KuduSchema & | operator= (const KuduSchema &other) |
| void | CopyFrom (const KuduSchema &other) |
Static Public Member Functions | |
| static const char *const | GetAutoIncrementingColumnName () |
A representation of a table's schema.
| kudu::client::KuduSchema::KuduSchema | ( | const KuduSchema & | other | ) |
Create a KuduSchema object as a copy of the other one.
| [in] | other | The other KuduSchema object to use as a reference. |
| KuduColumnSchema kudu::client::KuduSchema::Column | ( | size_t | idx | ) | const |
| [in] | idx | Column index. |
| void kudu::client::KuduSchema::CopyFrom | ( | const KuduSchema & | other | ) |
| [in] | other | The source KuduSchema object to use as a reference. |
| bool kudu::client::KuduSchema::Equals | ( | const KuduSchema & | other | ) | const |
Check whether the schema is identical to the other one.
| [in] | other | The other KuduSchema object to compare with. |
true iff this KuduSchema object is identical to the specified one. | int kudu::client::KuduSchema::GetAutoIncrementingColumnIndex | ( | ) | const |
Get the index of the auto incrementing column within this Schema.
|
static |
Utility function to return the actual name of the auto incrementing column.
| void kudu::client::KuduSchema::GetPrimaryKeyColumnIndexes | ( | std::vector< int > * | indexes | ) | const |
Get the indexes of the primary key columns within this Schema.
| [out] | indexes | The placeholder for the result. |
| bool kudu::client::KuduSchema::HasColumn | ( | const std::string & | col_name, |
| KuduColumnSchema * | col_schema ) const |
| [in] | col_name | Column name. |
| [out] | col_schema | If not null pointer, then the schema for the specified column. |
true iff the specified column exists. | KuduPartialRow * kudu::client::KuduSchema::NewRow | ( | ) | const |
Create a new row corresponding to this schema.
| size_t kudu::client::KuduSchema::num_columns | ( | ) | const |
| bool kudu::client::KuduSchema::operator!= | ( | const KuduSchema & | rhs | ) | const |
Check whether the schema is not identical to the other one.
| [in] | rhs | KuduSchema object to compare this one with. |
true iff this KuduSchema object is not identical to the specified one. | KuduSchema & kudu::client::KuduSchema::operator= | ( | const KuduSchema & | other | ) |
| [in] | other | The source KuduSchema object to use as a reference. |
| bool kudu::client::KuduSchema::operator== | ( | const KuduSchema & | rhs | ) | const |
Check whether the schema is identical to the other one.
| [in] | rhs | KuduSchema object to compare this one with. |
true iff this KuduSchema object is identical to the specified one. | Status kudu::client::KuduSchema::Reset | ( | const std::vector< KuduColumnSchema > & | columns, |
| int | key_columns ) |
| [in] | columns | Per-column schema information. |
| [in] | key_columns | Number of key columns in the schema. |
| std::string kudu::client::KuduSchema::ToString | ( | ) | const |
Stringify this KuduSchema.