docudb  1.0
Loading...
Searching...
No Matches
docudb::query::order_by Struct Reference

#include <docudb.hpp>

Public Member Functions

 order_by (std::string const &field, bool ascending=true)
 
std::string const & field () const
 
std::string_view direction () const
 

Detailed Description

Definition at line 454 of file docudb.hpp.

Constructor & Destructor Documentation

◆ order_by()

docudb::query::order_by::order_by ( std::string const & field,
bool ascending = true )
inlineexplicit

Definition at line 456 of file docudb.hpp.

457 : field_(field), ascending_(ascending) {}
std::string const & field() const
Definition docudb.hpp:459

Member Function Documentation

◆ direction()

std::string_view docudb::query::order_by::direction ( ) const
inline

Definition at line 460 of file docudb.hpp.

460{ return ascending_ ? "ASC" : "DESC"; }

◆ field()

std::string const & docudb::query::order_by::field ( ) const
inline

Definition at line 459 of file docudb.hpp.

459{ return field_; }

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