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::DisabledCompressionMethodsSetting 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 = "disabled_compression_methods"
static constexpr const char * Description = "Disable a specific set of compression methods (comma separated)"
static constexpr const char * InputType = "VARCHAR"

Member Function Documentation

◆ SetGlobal()

void duckdb::DisabledCompressionMethodsSetting::SetGlobal ( DatabaseInstance * db,
DBConfig & config,
const Value & parameter )
static
301941 {
301942 auto list = StringUtil::Split(input.ToString(), ",");
301943 vector<CompressionType> disabled_compression_methods;
301944 for (auto &entry : list) {
301945 auto param = StringUtil::Lower(entry);
301946 StringUtil::Trim(param);
301947 if (param.empty()) {
301948 continue;
301949 }
301950 if (param == "none") {
301951 disabled_compression_methods.clear();
301952 break;
301953 }
301954 auto compression_type = EnumUtil::FromString<CompressionType>(param);
301955 switch (compression_type) {
301956 case CompressionType::COMPRESSION_AUTO:
301957 case CompressionType::COMPRESSION_CONSTANT:
301958 case CompressionType::COMPRESSION_EMPTY:
301959 case CompressionType::COMPRESSION_UNCOMPRESSED:
301960 throw InvalidInputException("Compression method %s cannot be disabled", param);
301961 default:
301962 break;
301963 }
301964 disabled_compression_methods.push_back(compression_type);
301965 }
301966 config.SetDisabledCompressionMethods(disabled_compression_methods);
301967}
static DUCKDB_API void Trim(string &str)
Remove the whitespace char in the left and right end of the string.
Definition duckdb.cpp:109372
static DUCKDB_API vector< string > Split(const string &str, char delimiter)
Split the input string based on newline char.
Definition duckdb.cpp:109734
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
DUCKDB_API void SetDisabledCompressionMethods(const vector< CompressionType > &disabled_compression_methods)
Sets the disabled compression methods.
Definition duckdb.cpp:220377

◆ ResetGlobal()

void duckdb::DisabledCompressionMethodsSetting::ResetGlobal ( DatabaseInstance * db,
DBConfig & config )
static
301969 {
301970 vector<CompressionType> disabled_compression_methods;
301971 config.SetDisabledCompressionMethods(disabled_compression_methods);
301972}

◆ GetSetting()

Value duckdb::DisabledCompressionMethodsSetting::GetSetting ( const ClientContext & context)
static
301974 {
301975 auto &config = DBConfig::GetConfig(context);
301976 string result;
301977 for (auto &optimizer : config.GetDisabledCompressionMethods()) {
301978 if (!result.empty()) {
301979 result += ",";
301980 }
301981 result += CompressionTypeToString(optimizer);
301982 }
301983 return Value(result);
301984}

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