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

Static Public Member Functions

static ScalarFunctionSet GetFunctions ()

Static Public Attributes

static constexpr const char * Name = "strptime"
static constexpr const char * Parameters = "text::VARCHAR,format::VARCHAR\001text::VARCHAR,format-list::VARCHAR[]"
static constexpr const char * Description = "Converts the `string` text to timestamp according to the format string. Throws an error on failure. To return `NULL` on failure, use try_strptime.\001Converts the `string` text to timestamp applying the format strings in the list until one succeeds. Throws an error on failure. To return `NULL` on failure, use try_strptime."
static constexpr const char * Example = "strptime('Wed, 1 January 1992 - 08:38:40 PM', '%a, %-d %B %Y - %I:%M:%S %p')\001strptime('4/15/2023 10:56:00', ['%d/%m/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S'])"
static constexpr const char * Categories = "\001"

Member Function Documentation

◆ GetFunctions()

ScalarFunctionSet duckdb::StrpTimeFun::GetFunctions ( )
static
226106 {
226107 ScalarFunctionSet strptime("strptime");
226108
226109 const auto list_type = LogicalType::LIST(LogicalType::VARCHAR);
226110 auto fun = ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR}, LogicalType::TIMESTAMP,
226111 StrpTimeFunction::Parse<timestamp_t>, StrpTimeFunction::Bind);
226112 fun.SetNullHandling(FunctionNullHandling::SPECIAL_HANDLING);
226113 fun.SetFallible();
226114 strptime.AddFunction(fun);
226115
226116 fun = ScalarFunction({LogicalType::VARCHAR, list_type}, LogicalType::TIMESTAMP,
226117 StrpTimeFunction::Parse<timestamp_t>, StrpTimeFunction::Bind);
226118 fun.SetFallible();
226119 fun.SetNullHandling(FunctionNullHandling::SPECIAL_HANDLING);
226120 strptime.AddFunction(fun);
226121 return strptime;
226122}

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