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

Static Public Member Functions

static TableFunction GetFunction ()
static unique_ptr< TableRef > ReplacementScan (ClientContext &context, ReplacementScanInput &input, optional_ptr< ReplacementScanData > data)

Member Function Documentation

◆ GetFunction()

TableFunction duckdb::ReadDuckDBTableFunction::GetFunction ( )
static
243826 {
243827 MultiFileFunction<DuckDBMultiFileInfo> read_duckdb("read_duckdb");
243828 read_duckdb.statistics = MultiFileFunction<DuckDBMultiFileInfo>::MultiFileScanStats;
243829 read_duckdb.get_row_id_columns = DuckDBGetRowIdColumns;
243830 read_duckdb.pushdown_expression = DuckDBScanPushdownExpression;
243831 read_duckdb.filter_pushdown = true;
243832 read_duckdb.filter_prune = true;
243833 read_duckdb.late_materialization = true;
243834 ReadDuckDBAddNamedParameters(read_duckdb);
243835 return static_cast<TableFunction>(read_duckdb);
243836}

◆ ReplacementScan()

unique_ptr< TableRef > duckdb::ReadDuckDBTableFunction::ReplacementScan ( ClientContext & context,
ReplacementScanInput & input,
optional_ptr< ReplacementScanData > data )
static
243839 {
243840 auto table_name = ReplacementScan::GetFullPath(input);
243841 auto lower_name = StringUtil::Lower(table_name);
243842 if (!StringUtil::EndsWith(lower_name, ".db") && !StringUtil::Contains(lower_name, ".db?") &&
243843 !StringUtil::EndsWith(lower_name, ".ddb") && !StringUtil::Contains(lower_name, ".ddb?") &&
243844 !StringUtil::EndsWith(lower_name, ".duckdb") && !StringUtil::Contains(lower_name, ".duckdb?")) {
243845 return nullptr;
243846 }
243847 auto table_function = make_uniq<TableFunctionRef>();
243848 vector<unique_ptr<ParsedExpression>> children;
243849 children.push_back(make_uniq<ConstantExpression>(Value(table_name)));
243850 table_function->function = make_uniq<FunctionExpression>("read_duckdb", std::move(children));
243851
243852 if (!FileSystem::HasGlob(table_name)) {
243853 auto &fs = FileSystem::GetFileSystem(context);
243854 table_function->alias = fs.ExtractBaseName(table_name);
243855 }
243856 return std::move(table_function);
243857}
static DUCKDB_API bool HasGlob(const string &str)
Whether there is a glob in the string.
Definition duckdb.cpp:74130
static DUCKDB_API bool Contains(const string &haystack, const string &needle)
Returns true if the needle string exists in the haystack.
Definition duckdb.cpp:109323
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
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: