Hyper API for C++  0.0.16638
Hyper client library for C++ applications
hyperapi::ResultSchema Class Referencefinal

A result schema. More...

#include <ResultSchema.hpp>

Classes

class  Column
 A column of a result. More...
 

Public Member Functions

const std::vector< Column > & getColumns () const noexcept
 Returns all columns.
 
const ColumngetColumn (hyper_field_index_t columnIndex) const
 Returns the column at the given index. More...
 
size_t getColumnCount () const noexcept
 Returns the number of columns.
 
const ColumngetColumnByName (const Name &name) const
 Gets the column with the given name. More...
 
optional< hyper_field_index_t > getColumnPositionByName (const Name &name) const
 Gets the position of the column with the given name. More...
 

Detailed Description

A result schema.

Definition at line 20 of file ResultSchema.hpp.

Member Function Documentation

◆ getColumn()

const Column& hyperapi::ResultSchema::getColumn ( hyper_field_index_t  columnIndex) const

Returns the column at the given index.

Parameters
columnIndexThe index of the column.
Returns
The column.
Precondition
0 <= columnIndex < getColumnCount()

◆ getColumnByName()

const Column* hyperapi::ResultSchema::getColumnByName ( const Name name) const

Gets the column with the given name.

Parameters
nameThe name of the column
Returns
A pointer to the column, or nullptr if such a column does not exist.

◆ getColumnPositionByName()

optional<hyper_field_index_t> hyperapi::ResultSchema::getColumnPositionByName ( const Name name) const

Gets the position of the column with the given name.

Parameters
nameThe name of the column.
Returns
The position of the column in the result schema if it exists.

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