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::AddOperator Struct Reference

Public Member Functions

template<>
float Operation (float left, float right)
template<>
double Operation (double left, double right)
template<>
date_t Operation (date_t left, int32_t right)
template<>
date_t Operation (int32_t left, date_t right)
template<>
timestamp_t Operation (date_t left, dtime_t right)
template<>
timestamp_t Operation (dtime_t left, date_t right)
template<>
timestamp_t Operation (date_t left, dtime_tz_t right)
template<>
timestamp_t Operation (dtime_tz_t left, date_t right)
template<>
interval_t Operation (interval_t left, interval_t right)
template<>
timestamp_t Operation (date_t left, interval_t right)
template<>
timestamp_t Operation (interval_t left, date_t right)
template<>
timestamp_t Operation (timestamp_t left, interval_t right)
template<>
timestamp_t Operation (interval_t left, timestamp_t right)
template<>
float Operation (float left, float right)
template<>
double Operation (double left, double right)
template<>
interval_t Operation (interval_t left, interval_t right)
template<>
date_t Operation (date_t left, int32_t right)
template<>
date_t Operation (int32_t left, date_t right)
template<>
timestamp_t Operation (date_t left, dtime_t right)
template<>
timestamp_t Operation (date_t left, dtime_tz_t right)
template<>
timestamp_t Operation (dtime_t left, date_t right)
template<>
timestamp_t Operation (dtime_tz_t left, date_t right)
template<>
timestamp_t Operation (date_t left, interval_t right)
template<>
timestamp_t Operation (interval_t left, date_t right)
template<>
timestamp_t Operation (timestamp_t left, interval_t right)
template<>
timestamp_t Operation (interval_t left, timestamp_t right)

Static Public Member Functions

template<class TA, class TB, class TR>
static TR Operation (TA left, TB right)

Member Function Documentation

◆ Operation() [1/14]

template<class TA, class TB, class TR>
TR duckdb::AddOperator::Operation ( TA left,
TB right )
inlinestatic
20121 {
20122 return left + right;
20123 }

◆ Operation() [2/14]

template<>
float duckdb::AddOperator::Operation ( float left,
float right )
227751 {
227752 auto result = left + right;
227753 return result;
227754}

◆ Operation() [3/14]

template<>
double duckdb::AddOperator::Operation ( double left,
double right )
227757 {
227758 auto result = left + right;
227759 return result;
227760}

◆ Operation() [4/14]

template<>
interval_t duckdb::AddOperator::Operation ( interval_t left,
interval_t right )
227763 {
227764 left.months = AddOperatorOverflowCheck::Operation<int32_t, int32_t, int32_t>(left.months, right.months);
227765 left.days = AddOperatorOverflowCheck::Operation<int32_t, int32_t, int32_t>(left.days, right.days);
227766 left.micros = AddOperatorOverflowCheck::Operation<int64_t, int64_t, int64_t>(left.micros, right.micros);
227767 return left;
227768}

◆ Operation() [5/14]

template<>
date_t duckdb::AddOperator::Operation ( date_t left,
int32_t right )
227771 {
227772 date_t result;
227773 if (!TryAddOperator::Operation(left, right, result)) {
227774 throw OutOfRangeException("Date out of range");
227775 }
227776 return result;
227777}

◆ Operation() [6/14]

template<>
date_t duckdb::AddOperator::Operation ( int32_t left,
date_t right )
227780 {
227781 return AddOperator::Operation<date_t, int32_t, date_t>(right, left);
227782}

◆ Operation() [7/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( date_t left,
dtime_t right )
227785 {
227786 if (left == date_t::infinity()) {
227787 return timestamp_t::infinity();
227788 } else if (left == date_t::ninfinity()) {
227789 return timestamp_t::ninfinity();
227790 }
227791 timestamp_t result;
227792 if (!Timestamp::TryFromDatetime(left, right, result)) {
227793 throw OutOfRangeException("Timestamp out of range");
227794 }
227795 return result;
227796}

◆ Operation() [8/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( date_t left,
dtime_tz_t right )
227799 {
227800 if (left == date_t::infinity()) {
227801 return timestamp_t::infinity();
227802 } else if (left == date_t::ninfinity()) {
227803 return timestamp_t::ninfinity();
227804 }
227805 timestamp_t result;
227806 if (!Timestamp::TryFromDatetime(left, right, result)) {
227807 throw OutOfRangeException("Timestamp with time zone out of range");
227808 }
227809 return result;
227810}

◆ Operation() [9/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( dtime_t left,
date_t right )
227813 {
227814 return AddOperator::Operation<date_t, dtime_t, timestamp_t>(right, left);
227815}

◆ Operation() [10/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( dtime_tz_t left,
date_t right )
227818 {
227819 return AddOperator::Operation<date_t, dtime_tz_t, timestamp_t>(right, left);
227820}

◆ Operation() [11/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( date_t left,
interval_t right )
227823 {
227824 if (left == date_t::infinity()) {
227825 return timestamp_t::infinity();
227826 }
227827 if (left == date_t::ninfinity()) {
227828 return timestamp_t::ninfinity();
227829 }
227830 return Interval::Add(Timestamp::FromDatetime(left, dtime_t(0)), right);
227831}
static date_t Add(date_t left, interval_t right)
Add an interval to a date.
Definition duckdb.cpp:123571
static DUCKDB_API timestamp_t FromDatetime(date_t date, dtime_t time)
Create a Timestamp object from a specified (date, time) combination.
Definition duckdb.cpp:129804

◆ Operation() [12/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( interval_t left,
date_t right )
227834 {
227835 return AddOperator::Operation<date_t, interval_t, timestamp_t>(right, left);
227836}

◆ Operation() [13/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( timestamp_t left,
interval_t right )
227839 {
227840 return Interval::Add(left, right);
227841}

◆ Operation() [14/14]

template<>
timestamp_t duckdb::AddOperator::Operation ( interval_t left,
timestamp_t right )
227844 {
227845 return AddOperator::Operation<timestamp_t, interval_t, timestamp_t>(right, left);
227846}

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