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

Public Types

using RETURN_TYPE = string

Static Public Member Functions

static void SetGlobal (DatabaseInstance *db, DBConfig &config, const Value &parameter)
static void ResetGlobal (DatabaseInstance *db, DBConfig &config)
static Value GetSetting (const ClientContext &context)

Static Public Attributes

static constexpr const char * Name = "custom_user_agent"
static constexpr const char * Description = "Metadata from DuckDB callers"
static constexpr const char * InputType = "VARCHAR"

Member Function Documentation

◆ SetGlobal()

void duckdb::CustomUserAgentSetting::SetGlobal ( DatabaseInstance * db,
DBConfig & config,
const Value & parameter )
static
301852 {
301853 auto new_value = input.GetValue<string>();
301854 if (db) {
301855 throw InvalidInputException("Cannot change custom_user_agent setting while database is running");
301856 }
301857 config.options.custom_user_agent =
301858 config.options.custom_user_agent.empty() ? new_value : config.options.custom_user_agent + " " + new_value;
301859}
string custom_user_agent
Metadata from DuckDB callers.
Definition duckdb.hpp:40048
DBConfigOptions options
Database configuration options.
Definition duckdb.hpp:40090

◆ ResetGlobal()

void duckdb::CustomUserAgentSetting::ResetGlobal ( DatabaseInstance * db,
DBConfig & config )
static
301861 {
301862 if (db) {
301863 throw InvalidInputException("Cannot change custom_user_agent setting while database is running");
301864 }
301865 config.options.custom_user_agent = DBConfigOptions().custom_user_agent;
301866}

◆ GetSetting()

Value duckdb::CustomUserAgentSetting::GetSetting ( const ClientContext & context)
static
301195 {
301196 auto &config = DBConfig::GetConfig(context);
301197 return Value(config.options.custom_user_agent);
301198}

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