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

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
 
KuduColumnSchema Column (size_t idx) const
 
size_t num_columns () const
 
void GetPrimaryKeyColumnIndexes (std::vector< int > *indexes) const
 
KuduPartialRowNewRow () const
 
Assign/copy the schema
Parameters
[in]otherThe source KuduSchema object to use as a reference.
KuduSchemaoperator= (const KuduSchema &other)
 
void CopyFrom (const KuduSchema &other)
 

Friends

class ClientTest
 
class KuduClient
 
class KuduScanner
 
class KuduScanToken
 
class KuduScanTokenBuilder
 
class KuduSchemaBuilder
 
class KuduTable
 
class KuduTableCreator
 
class KuduWriteOperation
 
class ScanConfiguration
 
class internal::GetTableSchemaRpc
 
class internal::LookupRpc
 
class internal::MetaCacheEntry
 
class internal::WriteRpc
 
class tools::RemoteKsckMaster
 
class tools::ReplicaDumper
 
KuduSchema KuduSchemaFromSchema (const Schema &schema)
 

Detailed Description

A representation of a table's schema.

Constructor & Destructor Documentation

kudu::client::KuduSchema::KuduSchema ( const KuduSchema other)

Create a KuduSchema object as a copy of the other one.

Parameters
[in]otherThe other KuduSchema object to use as a reference.

Member Function Documentation

KuduColumnSchema kudu::client::KuduSchema::Column ( size_t  idx) const
Parameters
[in]idxColumn index.
Returns
Schema for the specified column.
bool kudu::client::KuduSchema::Equals ( const KuduSchema other) const

Check whether the schema is identical to the other one.

Parameters
[in]otherThe other KuduSchema object to compare with.
Returns
true iff this KuduSchema object is identical to the specified one.
void kudu::client::KuduSchema::GetPrimaryKeyColumnIndexes ( std::vector< int > *  indexes) const

Get the indexes of the primary key columns within this Schema.

Attention
In current versions of Kudu, these will always be contiguous column indexes starting with 0. However, in future versions this assumption may not hold, so callers should not assume it is the case.
Parameters
[out]indexesThe placeholder for the result.
KuduPartialRow* kudu::client::KuduSchema::NewRow ( ) const

Create a new row corresponding to this schema.

Note
The new row refers to this KuduSchema object, so it must be destroyed before the KuduSchema object to avoid dangling pointers.
Returns
A pointer to the newly created row. The caller takes ownership of the created row.
size_t kudu::client::KuduSchema::num_columns ( ) const
Returns
The number of columns in the schema.
Status kudu::client::KuduSchema::Reset ( const std::vector< KuduColumnSchema > &  columns,
int  key_columns 
)
Deprecated:
This method will be removed soon.
Todo:
Remove KuduSchema::Reset().
Parameters
[in]columnsPer-column schema information.
[in]key_columnsNumber of key columns in the schema.
Returns
Operation result status.

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