kudu::client::KuduSchema Class Reference

A representation of a table's schema. More...

#include <schema.h>

List of all members.

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] other The source KuduSchema object to use as a reference.


KuduSchemaoperator= (const KuduSchema &other)
void CopyFrom (const KuduSchema &other)

Friends

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] other The other KuduSchema object to use as a reference.

Member Function Documentation

KuduColumnSchema kudu::client::KuduSchema::Column ( size_t  idx  )  const
Parameters:
[in] idx Column 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] other The 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] indexes The 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] columns Per-column schema information.
[in] key_columns Number of key columns in the schema.
Returns:
Operation result status.

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines