OmniSciDB  04ee39c94c
SortField Class Reference

#include <RelAlgAbstractInterpreter.h>

Public Member Functions

 SortField (const size_t field, const SortDirection sort_dir, const NullSortedPosition nulls_pos)
 
bool operator== (const SortField &that) const
 
size_t getField () const
 
SortDirection getSortDir () const
 
NullSortedPosition getNullsPosition () const
 
std::string toString () const
 

Private Attributes

const size_t field_
 
const SortDirection sort_dir_
 
const NullSortedPosition nulls_pos_
 

Detailed Description

Definition at line 426 of file RelAlgAbstractInterpreter.h.

Constructor & Destructor Documentation

◆ SortField()

SortField::SortField ( const size_t  field,
const SortDirection  sort_dir,
const NullSortedPosition  nulls_pos 
)
inline

Definition at line 428 of file RelAlgAbstractInterpreter.h.

431  : field_(field), sort_dir_(sort_dir), nulls_pos_(nulls_pos) {}
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_

Member Function Documentation

◆ getField()

size_t SortField::getField ( ) const
inline

Definition at line 438 of file RelAlgAbstractInterpreter.h.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::renumber_sort_field().

438 { return field_; }
+ Here is the caller graph for this function:

◆ getNullsPosition()

NullSortedPosition SortField::getNullsPosition ( ) const
inline

Definition at line 442 of file RelAlgAbstractInterpreter.h.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::renumber_sort_field().

442 { return nulls_pos_; }
const NullSortedPosition nulls_pos_
+ Here is the caller graph for this function:

◆ getSortDir()

SortDirection SortField::getSortDir ( ) const
inline

Definition at line 440 of file RelAlgAbstractInterpreter.h.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::renumber_sort_field().

440 { return sort_dir_; }
const SortDirection sort_dir_
+ Here is the caller graph for this function:

◆ operator==()

bool SortField::operator== ( const SortField that) const
inline

Definition at line 433 of file RelAlgAbstractInterpreter.h.

References field_, nulls_pos_, and sort_dir_.

433  {
434  return field_ == that.field_ && sort_dir_ == that.sort_dir_ &&
435  nulls_pos_ == that.nulls_pos_;
436  }
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_

◆ toString()

std::string SortField::toString ( ) const
inline

Definition at line 444 of file RelAlgAbstractInterpreter.h.

References Ascending, First, and to_string().

444  {
445  return "(" + std::to_string(field_) + " " +
446  (sort_dir_ == SortDirection::Ascending ? "asc" : "desc") + " " +
447  (nulls_pos_ == NullSortedPosition::First ? "nulls_first" : "nulls_last") + ")";
448  }
std::string to_string(char const *&&v)
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_
+ Here is the call graph for this function:

Member Data Documentation

◆ field_

const size_t SortField::field_
private

Definition at line 451 of file RelAlgAbstractInterpreter.h.

Referenced by operator==().

◆ nulls_pos_

const NullSortedPosition SortField::nulls_pos_
private

Definition at line 453 of file RelAlgAbstractInterpreter.h.

Referenced by operator==().

◆ sort_dir_

const SortDirection SortField::sort_dir_
private

Definition at line 452 of file RelAlgAbstractInterpreter.h.

Referenced by operator==().


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