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

Static Public Member Functions

static ScalarFunctionSet GetFunctions ()

Static Public Attributes

static constexpr const char * Name = "regexp_extract"
static constexpr const char * Parameters = "string::VARCHAR,regex::VARCHAR\001string::VARCHAR,regex::VARCHAR,group::INTEGER\001string::VARCHAR,regex::VARCHAR,group::INTEGER,options::VARCHAR\001string::VARCHAR,regex::VARCHAR,name_list::VARCHAR[]\001string::VARCHAR,regex::VARCHAR,name_list::VARCHAR[],options::VARCHAR"
static constexpr const char * Description = "If `string` contains the `regex` pattern, returns the capturing group specified by optional parameter `group`; otherwise, returns the empty string. The `group` must be a constant value. If no `group` is given, it defaults to 0. A set of optional regex `options` can be set.\001If `string` contains the `regex` pattern, returns the capturing group specified by optional parameter `group`; otherwise, returns the empty string. The `group` must be a constant value. If no `group` is given, it defaults to 0. A set of optional regex `options` can be set.\001If `string` contains the `regex` pattern, returns the capturing group specified by optional parameter `group`; otherwise, returns the empty string. The `group` must be a constant value. If no `group` is given, it defaults to 0. A set of optional regex `options` can be set.\001If `string` contains the `regex` pattern, returns the capturing groups as a struct with corresponding names from `name_list`; otherwise, returns a struct with the same keys and empty strings as values. A set of optional regex `options` can be set.\001If `string` contains the `regex` pattern, returns the capturing groups as a struct with corresponding names from `name_list`; otherwise, returns a struct with the same keys and empty strings as values. A set of optional regex `options` can be set."
static constexpr const char * Example = "regexp_extract('abcde', '[a-z]{3}')\001regexp_extract('abc', '([a-z])(b)', 1)\001regexp_extract('ABC', '([a-z])(b)', 1, 'i')\001regexp_extract('2023-04-15', '(\\d+)-(\\d+)-(\\d+)', ['y', 'm', 'd'])\001regexp_extract('John Doe', '([a-z]+) ([a-z]+)', ['first_name', 'last_name'], 'i')"
static constexpr const char * Categories = "regex\001regex\001regex\001regex\001regex"

Member Function Documentation

◆ GetFunctions()

ScalarFunctionSet duckdb::RegexpExtractFun::GetFunctions ( )
static
234833 {
234834 ScalarFunctionSet regexp_extract("regexp_extract");
234835 regexp_extract.AddFunction(ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR}, LogicalType::VARCHAR,
234836 RegexExtractFunction, RegexExtractBind, nullptr, nullptr,
234837 RegexInitLocalState, LogicalType::INVALID, FunctionStability::CONSISTENT,
234838 FunctionNullHandling::SPECIAL_HANDLING));
234839 regexp_extract.AddFunction(ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::INTEGER},
234840 LogicalType::VARCHAR, RegexExtractFunction, RegexExtractBind, nullptr,
234841 nullptr, RegexInitLocalState, LogicalType::INVALID,
234842 FunctionStability::CONSISTENT, FunctionNullHandling::SPECIAL_HANDLING));
234843 regexp_extract.AddFunction(ScalarFunction(
234844 {LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::INTEGER, LogicalType::VARCHAR}, LogicalType::VARCHAR,
234845 RegexExtractFunction, RegexExtractBind, nullptr, nullptr, RegexInitLocalState, LogicalType::INVALID,
234846 FunctionStability::CONSISTENT, FunctionNullHandling::SPECIAL_HANDLING));
234847 // REGEXP_EXTRACT(<string>, <pattern>, [<group 1 name>[, <group n name>]...])
234848 regexp_extract.AddFunction(ScalarFunction(
234849 {LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::LIST(LogicalType::VARCHAR)}, LogicalType::VARCHAR,
234850 RegexExtractStructFunction, RegexExtractBind, nullptr, nullptr, RegexInitLocalState, LogicalType::INVALID,
234851 FunctionStability::CONSISTENT, FunctionNullHandling::SPECIAL_HANDLING));
234852 // REGEXP_EXTRACT(<string>, <pattern>, [<group 1 name>[, <group n name>]...], <options>)
234853 regexp_extract.AddFunction(ScalarFunction(
234854 {LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR},
234855 LogicalType::VARCHAR, RegexExtractStructFunction, RegexExtractBind, nullptr, nullptr, RegexInitLocalState,
234856 LogicalType::INVALID, FunctionStability::CONSISTENT, FunctionNullHandling::SPECIAL_HANDLING));
234857 return (regexp_extract);
234858}

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