C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
NYT::TColumnSchema Class Reference

Single column description. More...

#include <common.h>

Public Member Functions

 TColumnSchema ()
 Construct empty column schemas.
 FLUENT_FIELD_ENCAPSULATED (TString, Name)
TColumnSchema & Type (EValueType type) &
 Functions to work with type in old manner.
TColumnSchema Type (EValueType type) &&
EValueType Type () const
 FLUENT_FIELD_OPTION_ENCAPSULATED (ESortOrder, SortOrder)
 Column sort order.
 FLUENT_FIELD_OPTION_ENCAPSULATED (TString, Lock)
 Lock group name.
 FLUENT_FIELD_OPTION_ENCAPSULATED (TString, Expression)
 Expression defining column value.
 FLUENT_FIELD_OPTION_ENCAPSULATED (TString, Aggregate)
 Aggregating function name.
 FLUENT_FIELD_OPTION_ENCAPSULATED (TString, Group)
 Storage group name.
 FLUENT_FIELD_OPTION_ENCAPSULATED (TString, StableName)
bool Required () const
 Column requiredness.
 TColumnSchema (const TColumnSchema &)=default
 Copy and move constructors are default.
TColumnSchema & operator= (const TColumnSchema &)=default
TColumnSchema & Type (const NTi::TTypePtr &type) &
 Set and get column type.
TColumnSchema Type (const NTi::TTypePtr &type) &&
TColumnSchema & TypeV3 (const NTi::TTypePtr &type) &
TColumnSchema TypeV3 (const NTi::TTypePtr &type) &&
NTi::TTypePtr TypeV3 () const
TColumnSchema & Type (EValueType type, bool required) &
 Set type in old-style manner.
TColumnSchema Type (EValueType type, bool required) &&
const TMaybe< TNode > & RawTypeV3 () const
 Raw yson representation of column type.
TColumnSchema & RawTypeV3 (TNode rawTypeV3) &
TColumnSchema RawTypeV3 (TNode rawTypeV3) &&

Friends

void Deserialize (TColumnSchema &columnSchema, const TNode &node)

Detailed Description

Single column description.

Each field describing column has setter and getter.

Example reading field:

... columnSchema.Name() ...

Example setting field:

columnSchema.Name("my-column").Type(VT_INT64); // set name and type
@ VT_INT64
Int64, signed integer of 64 bits.
Definition common.h:354

https://ytsaurus.tech/docs/en/user-guide/storage/static-schema

Constructor & Destructor Documentation

◆ TColumnSchema()

NYT::TColumnSchema::TColumnSchema ( )

Construct empty column schemas.

Note
Such schema cannot be used in schema as it it doesn't have name.

Member Function Documentation

◆ FLUENT_FIELD_OPTION_ENCAPSULATED() [1/2]

NYT::TColumnSchema::FLUENT_FIELD_OPTION_ENCAPSULATED ( TString ,
Group  )

◆ FLUENT_FIELD_OPTION_ENCAPSULATED() [2/2]

NYT::TColumnSchema::FLUENT_FIELD_OPTION_ENCAPSULATED ( TString ,
Lock  )

◆ RawTypeV3()

const TMaybe< TNode > & NYT::TColumnSchema::RawTypeV3 ( ) const

Raw yson representation of column type.

Deprecated
Prefer to use TypeV3 methods.

◆ Required()

bool NYT::TColumnSchema::Required ( ) const

Column requiredness.

Required columns doesn't accept NULL values. Usually if column is required it means that it has Optional<...> type

◆ Type()

TColumnSchema & NYT::TColumnSchema::Type ( EValueType type) &

Functions to work with type in old manner.

Deprecated
New code is recommended to work with types using NTi::TTypePtr from type_info library.

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