Kudu C++ client API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
kudu::client::KuduColumnSchema Class Reference

Representation of the column schema. More...

#include <schema.h>

Public Types

enum  DataType {
  INT8 = 0 , INT16 = 1 , INT32 = 2 , INT64 = 3 ,
  STRING = 4 , BOOL = 5 , FLOAT = 6 , DOUBLE = 7 ,
  BINARY = 8 , UNIXTIME_MICROS = 9 , DECIMAL = 10 , VARCHAR = 11 ,
  TIMESTAMP = UNIXTIME_MICROS , DATE = 12 , SERIAL = 13
}
 Supported data types for columns. More...
 

Public Member Functions

 KuduColumnSchema (const KuduColumnSchema &other)
 
KuduColumnSchemaoperator= (const KuduColumnSchema &other)
 
void CopyFrom (const KuduColumnSchema &other)
 
bool Equals (const KuduColumnSchema &other) const
 
bool operator== (const KuduColumnSchema &rhs) const
 
bool operator!= (const KuduColumnSchema &rhs) const
 
KuduColumnTypeAttributes type_attributes () const
 
KuduColumnStorageAttributes storage_attributes () const
 
const std::string & comment () const
 
Getters to expose column schema information.
Todo:
Expose default column value and attributes?
Returns
Name of the column schema.
const std::string & name () const
 
DataType type () const
 
bool is_nullable () const
 
bool is_immutable () const
 

Static Public Member Functions

static std::string DataTypeToString (DataType type)
 
static Status StringToDataType (const std::string &type_str, DataType *type)
 

Detailed Description

Representation of the column schema.

Member Enumeration Documentation

◆ DataType

Supported data types for columns.

Enumerator
TIMESTAMP 

deprecated, use UNIXTIME_MICROS

Constructor & Destructor Documentation

◆ KuduColumnSchema()

kudu::client::KuduColumnSchema::KuduColumnSchema ( const KuduColumnSchema other)

Construct KuduColumnSchema object as a copy of another object.

Parameters
[in]otherThe reference object to copy from.

Member Function Documentation

◆ comment()

const std::string & kudu::client::KuduColumnSchema::comment ( ) const
Returns
comment of the column schema.
Note
An empty string will be returned if there is no comment.

◆ CopyFrom()

void kudu::client::KuduColumnSchema::CopyFrom ( const KuduColumnSchema other)

Make this object an identical copy of the other one.

Parameters
[in]otherThe reference object to copy from.

◆ DataTypeToString()

static std::string kudu::client::KuduColumnSchema::DataTypeToString ( DataType  type)
static
Parameters
[in]typeColumn data type.
Returns
String representation of the column data type.

◆ Equals()

bool kudu::client::KuduColumnSchema::Equals ( const KuduColumnSchema other) const

Check whether the object is identical to the other one.

Deprecated:
use operator==(const KuduColumnSchema&) instead
Parameters
[in]otherThe reference object to compare with.
Returns
true iff the object is identical to the specified one.

◆ is_immutable()

bool kudu::client::KuduColumnSchema::is_immutable ( ) const
Returns
true iff the column schema has the immutable attribute set.

◆ is_nullable()

bool kudu::client::KuduColumnSchema::is_nullable ( ) const
Returns
true iff the column schema has the nullable attribute set.

◆ name()

const std::string & kudu::client::KuduColumnSchema::name ( ) const
Returns
Type of the column schema.

◆ operator!=()

bool kudu::client::KuduColumnSchema::operator!= ( const KuduColumnSchema rhs) const

Check whether the schema is not identical to the other one.

Parameters
[in]rhsKuduColumnSchema object to compare this one with.
Returns
true iff this KuduColumnSchema object is not identical to the specified one.

◆ operator=()

KuduColumnSchema & kudu::client::KuduColumnSchema::operator= ( const KuduColumnSchema other)

The assignment operator.

Parameters
[in]otherThe reference object to assign from.
Returns
The updated object.

◆ operator==()

bool kudu::client::KuduColumnSchema::operator== ( const KuduColumnSchema rhs) const

Check whether the schema is identical to the other one.

Parameters
[in]rhsKuduColumnSchema object to compare this one with.
Returns
true iff this KuduColumnSchema object is identical to the specified one.

◆ storage_attributes()

KuduColumnStorageAttributes kudu::client::KuduColumnSchema::storage_attributes ( ) const
Returns
Storage attributes of the column schema.

◆ StringToDataType()

static Status kudu::client::KuduColumnSchema::StringToDataType ( const std::string &  type_str,
DataType type 
)
static
Parameters
[in]type_strString representation of the column data type
[out]typeEnum representation of the column data type, Converted from string format.
Returns
Operation result status.

◆ type()

DataType kudu::client::KuduColumnSchema::type ( ) const
Returns
Type of the column schema.

◆ type_attributes()

KuduColumnTypeAttributes kudu::client::KuduColumnSchema::type_attributes ( ) const
Returns
Type attributes of the column schema.

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