userver: storages::clickhouse::io::columns::ClickhouseColumn< ColumnType > Class Template Reference
Loading...
Searching...
No Matches
storages::clickhouse::io::columns::ClickhouseColumn< ColumnType > Class Template Reference

#include <userver/storages/clickhouse/io/columns/base_column.hpp>

Detailed Description

template<typename ColumnType>
class storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >

Base class for every typed ClickHouse column. To add new columns one should derive from this class, define types aliases:

  • cpp_type - to what C++ types are column values mapped,
  • container_type (being std::vector<cpp_type>)

and implement 3 methods:

  • ctor(ColumnRef) - column constructor,
  • static ColumnRef Serialize(const container_type&) - constructs a column from C++ container,
  • cpp_type ColumnIterator<YourColumnType>::DataHolder::Get()

see implementation of any of the existing columns for better understanding.

Definition at line 28 of file base_column.hpp.

Public Types

using iterator = ColumnIterator<ColumnType>
 

Public Member Functions

 ClickhouseColumn (ColumnRef column)
 
iterator begin () const
 
iterator end () const
 
size_t Size () const
 

Member Typedef Documentation

◆ iterator

template<typename ColumnType >
using storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >::iterator = ColumnIterator<ColumnType>

Definition at line 30 of file base_column.hpp.

Constructor & Destructor Documentation

◆ ClickhouseColumn()

template<typename ColumnType >
storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >::ClickhouseColumn ( ColumnRef column)
inline

Definition at line 32 of file base_column.hpp.

Member Function Documentation

◆ begin()

template<typename ColumnType >
iterator storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >::begin ( ) const
inline

Definition at line 34 of file base_column.hpp.

◆ end()

template<typename ColumnType >
iterator storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >::end ( ) const
inline

Definition at line 36 of file base_column.hpp.

◆ Size()

template<typename ColumnType >
size_t storages::clickhouse::io::columns::ClickhouseColumn< ColumnType >::Size ( ) const
inline

Definition at line 38 of file base_column.hpp.


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