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::DuckDBFileReaderOptions Class Reference
Inheritance diagram for duckdb::DuckDBFileReaderOptions:
Collaboration diagram for duckdb::DuckDBFileReaderOptions:

Public Member Functions

bool Matches (TableCatalogEntry &table) const
bool HasSelection () const
string PrintOptions () const
string GetCandidates (const vector< reference< TableCatalogEntry > > &tables) const
Public Member Functions inherited from duckdb::BaseFileReaderOptions
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

string schema_name
string table_name

Member Function Documentation

◆ Matches()

bool duckdb::DuckDBFileReaderOptions::Matches ( TableCatalogEntry & table) const
243474 {
243475 if (!schema_name.empty() && !StringUtil::CIEquals(table.ParentSchema().name, schema_name)) {
243476 return false;
243477 }
243478 if (!table_name.empty() && !StringUtil::CIEquals(table.name, table_name)) {
243479 return false;
243480 }
243481 return true;
243482}
static DUCKDB_API bool CIEquals(const string &l1, const string &l2)
Case insensitive equals.
Definition duckdb.cpp:109696

◆ HasSelection()

bool duckdb::DuckDBFileReaderOptions::HasSelection ( ) const
243450 {
243451 if (!table_name.empty()) {
243452 return true;
243453 }
243454 if (!schema_name.empty()) {
243455 return true;
243456 }
243457 return false;
243458}

◆ PrintOptions()

string duckdb::DuckDBFileReaderOptions::PrintOptions ( ) const
243460 {
243461 string options;
243462 if (!schema_name.empty()) {
243463 options += "schema_name=\"" + schema_name + "\"";
243464 }
243465 if (!options.empty()) {
243466 options += ", ";
243467 }
243468 if (!table_name.empty()) {
243469 options += "table_name=\"" + table_name + "\"";
243470 }
243471 return options;
243472}

◆ GetCandidates()

string duckdb::DuckDBFileReaderOptions::GetCandidates ( const vector< reference< TableCatalogEntry > > & tables) const
243423 {
243424 if (tables.empty()) {
243425 return string();
243426 }
243427 case_insensitive_map_t<idx_t> table_names;
243428 for (auto &table : tables) {
243429 table_names[table.get().name]++;
243430 }
243431 vector<string> candidate_list;
243432 for (auto &table_ref : tables) {
243433 auto &table = table_ref.get();
243434 if (table_names[table.name] > 1) {
243435 // name conflicts across schemas - add the schema name
243436 auto &schema = table.ParentSchema();
243437 candidate_list.push_back(schema.name + "." + table.name);
243438 } else {
243439 candidate_list.push_back(table.name);
243440 }
243441 }
243442 string search_term = schema_name;
243443 if (!search_term.empty()) {
243444 search_term += ".";
243445 }
243446 search_term += table_name;
243447 return StringUtil::CandidatesErrorMessage(candidate_list, search_term, "Candidates");
243448}
static DUCKDB_API string CandidatesErrorMessage(const vector< string > &strings, const string &target, const string &message_prefix, idx_t n=5)
Definition duckdb.cpp:109926

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