Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::OrderModifiers Struct Reference

Public Member Functions

 OrderModifiers (OrderType order_type, OrderByNullType null_type)
bool operator== (const OrderModifiers &other) const

Static Public Member Functions

static OrderModifiers Parse (const string &val)

Public Attributes

OrderType order_type
OrderByNullType null_type

Constructor & Destructor Documentation

◆ OrderModifiers()

duckdb::OrderModifiers::OrderModifiers ( OrderType order_type,
OrderByNullType null_type )
inline
102807 : order_type(order_type), null_type(null_type) {
102808 }

Member Function Documentation

◆ operator==()

bool duckdb::OrderModifiers::operator== ( const OrderModifiers & other) const
inline
102813 {
102814 return order_type == other.order_type && null_type == other.null_type;
102815 }

◆ Parse()

OrderModifiers duckdb::OrderModifiers::Parse ( const string & val)
inlinestatic
102817 {
102818 auto lcase = StringUtil::Replace(StringUtil::Lower(val), "_", " ");
102819 OrderType order_type;
102820 if (StringUtil::StartsWith(lcase, "asc")) {
102821 order_type = OrderType::ASCENDING;
102822 } else if (StringUtil::StartsWith(lcase, "desc")) {
102823 order_type = OrderType::DESCENDING;
102824 } else {
102825 throw BinderException("create_sort_key modifier must start with either ASC or DESC");
102826 }
102827 OrderByNullType null_type;
102828 if (StringUtil::EndsWith(lcase, "nulls first")) {
102829 null_type = OrderByNullType::NULLS_FIRST;
102830 } else if (StringUtil::EndsWith(lcase, "nulls last")) {
102831 null_type = OrderByNullType::NULLS_LAST;
102832 } else {
102833 throw BinderException("create_sort_key modifier must end with either NULLS FIRST or NULLS LAST");
102834 }
102835 return OrderModifiers(order_type, null_type);
102836 }
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.
Definition duckdb.cpp:109377
static DUCKDB_API bool EndsWith(const string &str, const string &suffix)
Returns true if the target string ends with the given suffix.
Definition duckdb.cpp:109384

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