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

Static Public Member Functions

static ScalarFunctionSet GetFunctions ()

Static Public Attributes

static constexpr const char * Name = "-"
static constexpr const char * Parameters = ""
static constexpr const char * Description = ""
static constexpr const char * Example = ""
static constexpr const char * Categories = ""

Member Function Documentation

◆ GetFunctions()

ScalarFunctionSet duckdb::OperatorSubtractFun::GetFunctions ( )
static
228946 {
228947 ScalarFunctionSet subtract("-");
228948 for (auto &type : LogicalType::Numeric()) {
228949 // unary subtract function, negates the input (i.e. multiplies by -1)
228950 subtract.AddFunction(SubtractFunction::GetFunction(type));
228951 // binary subtract function "a - b", subtracts b from a
228952 subtract.AddFunction(SubtractFunction::GetFunction(type, type));
228953 }
228954 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::BIGNUM));
228955 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::BIGNUM, LogicalType::BIGNUM));
228956 // we can subtract dates from each other
228957 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::DATE, LogicalType::DATE));
228958 // we can subtract integers from dates
228959 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::DATE, LogicalType::INTEGER));
228960 // we can subtract timestamps from each other
228961 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::TIMESTAMP, LogicalType::TIMESTAMP));
228962 // we can subtract intervals from each other
228963 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::INTERVAL, LogicalType::INTERVAL));
228964 // we can subtract intervals from dates/times/timestamps, but not the other way around
228965 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::DATE, LogicalType::INTERVAL));
228966 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::TIME, LogicalType::INTERVAL));
228967 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::TIMESTAMP, LogicalType::INTERVAL));
228968 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::TIME_TZ, LogicalType::INTERVAL));
228969 // we can negate intervals
228970 subtract.AddFunction(SubtractFunction::GetFunction(LogicalType::INTERVAL));
228971
228972 return subtract;
228973}
void subtract(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1)
static DUCKDB_API const vector< LogicalType > Numeric()
A list of all NUMERIC types (integral and floating point types).
Definition duckdb.cpp:139263

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