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::PragmaFunction Class Reference

Pragma functions are invoked by calling PRAGMA x Pragma functions come in three types: More...

#include <duckdb.hpp>

Inheritance diagram for duckdb::PragmaFunction:
Collaboration diagram for duckdb::PragmaFunction:

Public Member Functions

DUCKDB_API string ToString () const override
Public Member Functions inherited from duckdb::SimpleNamedParameterFunction
DUCKDB_API SimpleNamedParameterFunction (string name, vector< LogicalType > arguments, LogicalType varargs=LogicalType(LogicalTypeId::INVALID))
DUCKDB_API string ToString () const override
DUCKDB_API bool HasNamedParameters () const
Public Member Functions inherited from duckdb::SimpleFunction
DUCKDB_API SimpleFunction (string name, vector< LogicalType > arguments, LogicalType varargs=LogicalType(LogicalTypeId::INVALID))
DUCKDB_API bool HasVarArgs () const
Public Member Functions inherited from duckdb::Function
DUCKDB_API Function (string name)

Static Public Member Functions

static DUCKDB_API PragmaFunction PragmaCall (const string &name, pragma_query_t query, vector< LogicalType > arguments, LogicalType varargs=LogicalType::INVALID)
static DUCKDB_API PragmaFunction PragmaCall (const string &name, pragma_function_t function, vector< LogicalType > arguments, LogicalType varargs=LogicalType::INVALID)
static DUCKDB_API PragmaFunction PragmaStatement (const string &name, pragma_query_t query)
static DUCKDB_API PragmaFunction PragmaStatement (const string &name, pragma_function_t function)
Static Public Member Functions inherited from duckdb::Function
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs=LogicalType::INVALID)
 Returns the formatted string name(arg1, arg2, ...).
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs, const LogicalType &return_type)
 Returns the formatted string name(arg1, arg2..) -> return_type.
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const named_parameter_type_map_t &named_parameters)
 Returns the formatted string name(arg1, arg2.., np1=a, np2=b, ...).
static DUCKDB_API void EraseArgument (SimpleFunction &bound_function, vector< unique_ptr< Expression > > &arguments, idx_t argument_index)
 Used in the bind to erase an argument from a function.

Public Attributes

PragmaType type
pragma_query_t query
pragma_function_t function
named_parameter_type_map_t named_parameters
Public Attributes inherited from duckdb::SimpleNamedParameterFunction
named_parameter_type_map_t named_parameters
 The named parameters of the function.
Public Attributes inherited from duckdb::SimpleFunction
vector< LogicalType > arguments
 The set of arguments of the function.
vector< LogicalType > original_arguments
LogicalType varargs
Public Attributes inherited from duckdb::Function
string name
 The name of the function.
string extra_info
 Additional Information to specify function from it's name.
string catalog_name
string schema_name

Private Member Functions

 PragmaFunction (string name, PragmaType pragma_type, pragma_query_t query, pragma_function_t function, vector< LogicalType > arguments, LogicalType varargs)

Detailed Description

Pragma functions are invoked by calling PRAGMA x Pragma functions come in three types:

  • Call: function call, e.g. PRAGMA table_info('tbl') -> call statements can take multiple parameters
  • Statement: statement without parameters, e.g. PRAGMA show_tables -> this is similar to a call pragma but without parameters Pragma functions can either return a new query to execute (pragma_query_t) or they can

Constructor & Destructor Documentation

◆ PragmaFunction()

duckdb::PragmaFunction::PragmaFunction ( string name,
PragmaType pragma_type,
pragma_query_t query,
pragma_function_t function,
vector< LogicalType > arguments,
LogicalType varargs )
private
223695 : SimpleNamedParameterFunction(std::move(name), std::move(arguments), std::move(varargs)), type(pragma_type),
223696 query(query), function(function) {
223697}
string name
The name of the function.
Definition duckdb.hpp:13881
vector< LogicalType > arguments
The set of arguments of the function.
Definition duckdb.hpp:13917
LogicalType varargs
Definition duckdb.hpp:13923

Member Function Documentation

◆ PragmaCall() [1/2]

PragmaFunction duckdb::PragmaFunction::PragmaCall ( const string & name,
pragma_query_t query,
vector< LogicalType > arguments,
LogicalType varargs = LogicalType::INVALID )
static
223700 {
223701 return PragmaFunction(name, PragmaType::PRAGMA_CALL, query, nullptr, std::move(arguments), std::move(varargs));
223702}

◆ PragmaCall() [2/2]

PragmaFunction duckdb::PragmaFunction::PragmaCall ( const string & name,
pragma_function_t function,
vector< LogicalType > arguments,
LogicalType varargs = LogicalType::INVALID )
static
223705 {
223706 return PragmaFunction(name, PragmaType::PRAGMA_CALL, nullptr, function, std::move(arguments), std::move(varargs));
223707}

◆ PragmaStatement() [1/2]

PragmaFunction duckdb::PragmaFunction::PragmaStatement ( const string & name,
pragma_query_t query )
static
223709 {
223710 vector<LogicalType> types;
223711 return PragmaFunction(name, PragmaType::PRAGMA_STATEMENT, query, nullptr, std::move(types), LogicalType::INVALID);
223712}

◆ PragmaStatement() [2/2]

PragmaFunction duckdb::PragmaFunction::PragmaStatement ( const string & name,
pragma_function_t function )
static
223714 {
223715 vector<LogicalType> types;
223716 return PragmaFunction(name, PragmaType::PRAGMA_STATEMENT, nullptr, function, std::move(types),
223717 LogicalType::INVALID);
223718}

◆ ToString()

string duckdb::PragmaFunction::ToString ( ) const
overridevirtual

Reimplemented from duckdb::SimpleFunction.

223720 {
223721 switch (type) {
223722 case PragmaType::PRAGMA_STATEMENT:
223723 return StringUtil::Format("PRAGMA %s", name);
223724 case PragmaType::PRAGMA_CALL: {
223725 return StringUtil::Format("PRAGMA %s", SimpleNamedParameterFunction::ToString());
223726 }
223727 default:
223728 return "UNKNOWN";
223729 }
223730}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002

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