OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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
 
size_t toHash () const
 

Private Attributes

const size_t field_
 
const SortDirection sort_dir_
 
const NullSortedPosition nulls_pos_
 

Detailed Description

Definition at line 472 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 474 of file RelAlgDagBuilder.h.

477  : 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 484 of file RelAlgDagBuilder.h.

References field_.

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

484 { return field_; }
const size_t field_

+ Here is the caller graph for this function:

NullSortedPosition SortField::getNullsPosition ( ) const
inline

Definition at line 488 of file RelAlgDagBuilder.h.

References nulls_pos_.

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

488 { return nulls_pos_; }
const NullSortedPosition nulls_pos_

+ Here is the caller graph for this function:

SortDirection SortField::getSortDir ( ) const
inline

Definition at line 486 of file RelAlgDagBuilder.h.

References sort_dir_.

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

486 { 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 479 of file RelAlgDagBuilder.h.

References field_, nulls_pos_, and sort_dir_.

479  {
480  return field_ == that.field_ && sort_dir_ == that.sort_dir_ &&
481  nulls_pos_ == that.nulls_pos_;
482  }
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_
const size_t field_
size_t SortField::toHash ( ) const
inline

Definition at line 501 of file RelAlgDagBuilder.h.

References Ascending, field_, First, nulls_pos_, and sort_dir_.

501  {
502  auto hash = boost::hash_value(field_);
503  boost::hash_combine(hash, sort_dir_ == SortDirection::Ascending ? "a" : "d");
504  boost::hash_combine(hash, nulls_pos_ == NullSortedPosition::First ? "f" : "l");
505  return hash;
506  }
const NullSortedPosition nulls_pos_
const SortDirection sort_dir_
const size_t field_
std::string SortField::toString ( ) const
inline

Definition at line 490 of file RelAlgDagBuilder.h.

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

490  {
491  return cat(::typeName(this),
492  "(",
494  ", sort_dir=",
495  (sort_dir_ == SortDirection::Ascending ? "asc" : "desc"),
496  ", null_pos=",
497  (nulls_pos_ == NullSortedPosition::First ? "nulls_first" : "nulls_last"),
498  ")");
499  }
std::string cat(Ts &&...args)
std::string to_string(char const *&&v)
const NullSortedPosition nulls_pos_
std::string typeName(const T *v)
Definition: toString.h:93
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 509 of file RelAlgDagBuilder.h.

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

const NullSortedPosition SortField::nulls_pos_
private

Definition at line 511 of file RelAlgDagBuilder.h.

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

const SortDirection SortField::sort_dir_
private

Definition at line 510 of file RelAlgDagBuilder.h.

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


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