OmniSciDB  addbbd5075
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SortField Class Reference

#include <RelAlgDagBuilder.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 423 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

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

Definition at line 425 of file RelAlgDagBuilder.h.

428  : 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_
const size_t field_

Member Function Documentation

size_t SortField::getField ( ) const
inline

Definition at line 435 of file RelAlgDagBuilder.h.

References field_.

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

435 { return field_; }
const size_t field_

+ Here is the caller graph for this function:

NullSortedPosition SortField::getNullsPosition ( ) const
inline

Definition at line 439 of file RelAlgDagBuilder.h.

References nulls_pos_.

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

439 { return nulls_pos_; }
const NullSortedPosition nulls_pos_

+ Here is the caller graph for this function:

SortDirection SortField::getSortDir ( ) const
inline

Definition at line 437 of file RelAlgDagBuilder.h.

References sort_dir_.

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

437 { return sort_dir_; }
const SortDirection sort_dir_

+ Here is the caller graph for this function:

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

Definition at line 430 of file RelAlgDagBuilder.h.

References field_, nulls_pos_, and sort_dir_.

430  {
431  return field_ == that.field_ && sort_dir_ == that.sort_dir_ &&
432  nulls_pos_ == that.nulls_pos_;
433  }
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_
const size_t field_
std::string SortField::toString ( ) const
inline

Definition at line 441 of file RelAlgDagBuilder.h.

References Ascending, field_, First, nulls_pos_, sort_dir_, and to_string().

441  {
442  return "(" + std::to_string(field_) + " " +
443  (sort_dir_ == SortDirection::Ascending ? "asc" : "desc") + " " +
444  (nulls_pos_ == NullSortedPosition::First ? "nulls_first" : "nulls_last") + ")";
445  }
std::string to_string(char const *&&v)
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_
const size_t field_

+ Here is the call graph for this function:

Member Data Documentation

const size_t SortField::field_
private

Definition at line 448 of file RelAlgDagBuilder.h.

Referenced by getField(), operator==(), and toString().

const NullSortedPosition SortField::nulls_pos_
private

Definition at line 450 of file RelAlgDagBuilder.h.

Referenced by getNullsPosition(), operator==(), and toString().

const SortDirection SortField::sort_dir_
private

Definition at line 449 of file RelAlgDagBuilder.h.

Referenced by getSortDir(), operator==(), and toString().


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