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

Public Member Functions

void Parse (const std::string &query)

Static Public Member Functions

static duckdb::vector< duckdb_libpgquery::PGSimplifiedToken > Tokenize (const std::string &query)
static duckdb_libpgquery::PGKeywordCategory IsKeyword (const std::string &text)
static duckdb::vector< duckdb_libpgquery::PGKeyword > KeywordList ()
static void SetPreserveIdentifierCase (bool downcase)

Public Attributes

bool success
duckdb_libpgquery::PGList * parse_tree
std::string error_message
int error_location

Constructor & Destructor Documentation

◆ PostgresParser()

duckdb::PostgresParser::PostgresParser ( )

◆ ~PostgresParser()

duckdb::PostgresParser::~PostgresParser ( )
508110 {
508111 duckdb_libpgquery::pg_parser_cleanup();

Member Function Documentation

◆ Parse()

void duckdb::PostgresParser::Parse ( const std::string & query)
508089 {
508090 duckdb_libpgquery::pg_parser_init();
508091 duckdb_libpgquery::parse_result res;
508092 pg_parser_parse(query.c_str(), &res);
508093 success = res.success;
508094
508095 if (success) {
508096 parse_tree = res.parse_tree;
508097 } else {
508098 error_message = std::string(res.error_message);
508099 error_location = res.error_location;
508100 }

◆ Tokenize()

vector< duckdb_libpgquery::PGSimplifiedToken > duckdb::PostgresParser::Tokenize ( const std::string & query)
static
508103 {
508104 duckdb_libpgquery::pg_parser_init();
508105 auto tokens = duckdb_libpgquery::tokenize(query.c_str());
508106 duckdb_libpgquery::pg_parser_cleanup();
508107 return std::move(tokens);

◆ IsKeyword()

duckdb_libpgquery::PGKeywordCategory duckdb::PostgresParser::IsKeyword ( const std::string & text)
static
508114 {
508115 return duckdb_libpgquery::is_keyword(text.c_str());

◆ KeywordList()

vector< duckdb_libpgquery::PGKeyword > duckdb::PostgresParser::KeywordList ( )
static
508118 {
508119 // FIXME: because of this, we might need to change the libpg_query library to use duckdb::vector
508120 vector<duckdb_libpgquery::PGKeyword> tmp(duckdb_libpgquery::keyword_list());
508121 return tmp;

◆ SetPreserveIdentifierCase()

void duckdb::PostgresParser::SetPreserveIdentifierCase ( bool downcase)
static
508124 {
508125 duckdb_libpgquery::set_preserve_identifier_case(preserve);

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