Hyper API for C++ 0.0.26479
Hyper client library for C++ applications
Loading...
Searching...
No Matches
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 Column & getColumn (hyper_field_index_t columnIndex) const
 Returns the column at the given index.
 
size_t getColumnCount () const noexcept
 Returns the number of columns.
 
const Column * getColumnByName (const Name &name) const
 Gets the column with the given name.
 
optional< hyper_field_index_t > getColumnPositionByName (const Name &name) const
 Gets the position of the column with the given name.
 

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.

◆ getColumnCount()

size_t hyperapi::ResultSchema::getColumnCount ( ) const
inlinenoexcept

Returns the number of columns.

Definition at line 61 of file ResultSchema.hpp.

◆ 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.

◆ getColumns()

const std::vector< Column > & hyperapi::ResultSchema::getColumns ( ) const
inlinenoexcept

Returns all columns.

Definition at line 47 of file ResultSchema.hpp.


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