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

Public Member Functions

string ToString () const

Static Public Member Functions

static QualifiedName Parse (const string &input)
static vector< string > ParseComponents (const string &input)

Public Attributes

string catalog
string schema
string name

Member Function Documentation

◆ Parse()

QualifiedName duckdb::QualifiedName::Parse ( const string & input)
static

Parse the (optional) schema and a name from a string in the format of e.g. "schema"."table"; if there is no dot the schema will be set to INVALID_SCHEMA

347714 {
347715 string catalog;
347716 string schema;
347717 string name;
347718
347719 auto entries = ParseComponents(input);
347720 if (entries.empty()) {
347721 catalog = INVALID_CATALOG;
347722 schema = INVALID_SCHEMA;
347723 } else if (entries.size() == 1) {
347724 catalog = INVALID_CATALOG;
347725 schema = INVALID_SCHEMA;
347726 name = entries[0];
347727 } else if (entries.size() == 2) {
347728 catalog = INVALID_CATALOG;
347729 schema = entries[0];
347730 name = entries[1];
347731 } else if (entries.size() == 3) {
347732 catalog = entries[0];
347733 schema = entries[1];
347734 name = entries[2];
347735 } else {
347736 throw ParserException("Expected catalog.entry, schema.entry or entry: too many entries found (input: %s)",
347737 input);
347738 }
347739 return QualifiedName {catalog, schema, name};
347740}
static vector< string > ParseComponents(const string &input)
Definition duckdb.cpp:347674
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseComponents()

vector< string > duckdb::QualifiedName::ParseComponents ( const string & input)
static

quote

look for another quote

unquote

347674 {
347675 vector<string> result;
347676 idx_t idx = 0;
347677 string entry;
347678
347679normal:
347681 for (; idx < input.size(); idx++) {
347682 if (input[idx] == '"') {
347683 idx++;
347684 goto quoted;
347685 } else if (input[idx] == '.') {
347686 goto separator;
347687 }
347688 entry += input[idx];
347689 }
347690 goto end;
347691separator:
347692 result.push_back(entry);
347693 entry = "";
347694 idx++;
347695 goto normal;
347696quoted:
347698 for (; idx < input.size(); idx++) {
347699 if (input[idx] == '"') {
347701 idx++;
347702 goto normal;
347703 }
347704 entry += input[idx];
347705 }
347706 throw ParserException("Unterminated quote in qualified name! (input: %s)", input);
347707end:
347708 if (!entry.empty()) {
347709 result.push_back(entry);
347710 }
347711 return result;
347712}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
Here is the caller graph for this function:

◆ ToString()

string duckdb::QualifiedName::ToString ( ) const
347670 {
347671 return ParseInfo::QualifierToString(catalog, schema, name);
347672}

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