|
|
mutex | lock |
|
UserSettingsMap | settings_map |
| | Database-global settings.
|
|
case_insensitive_map_t< ExtensionOption > | extension_parameters |
| | Extra parameters that can be SET for loaded extensions.
|
|
atomic< idx_t > | settings_version |
| | Current version of the settings - incremented when settings are modified.
|
|
hugeint_t | uuid |
| | Settings uuid.
|
◆ GlobalUserSettings() [1/2]
| duckdb::GlobalUserSettings::GlobalUserSettings |
( |
| ) |
|
303312}
static hugeint_t GenerateRandomUUID(RandomEngine &engine)
Generate a random UUID v4 value.
Definition duckdb.cpp:131021
atomic< idx_t > settings_version
Current version of the settings - incremented when settings are modified.
Definition duckdb.hpp:37178
hugeint_t uuid
Settings uuid.
Definition duckdb.hpp:37180
◆ GlobalUserSettings() [2/2]
| duckdb::GlobalUserSettings::GlobalUserSettings |
( |
const GlobalUserSettings & | other | ) |
|
303317}
UserSettingsMap settings_map
Database-global settings.
Definition duckdb.hpp:37174
case_insensitive_map_t< ExtensionOption > extension_parameters
Extra parameters that can be SET for loaded extensions.
Definition duckdb.hpp:37176
◆ operator=()
| GlobalUserSettings & duckdb::GlobalUserSettings::operator= |
( |
const GlobalUserSettings & | other | ) |
|
303319 {
303323 return *this;
303324}
◆ SetUserSetting()
| void duckdb::GlobalUserSettings::SetUserSetting |
( |
idx_t | setting_index, |
|
|
Value | target_value ) |
303326 {
303327 lock_guard<mutex> guard(lock);
303328 settings_map.SetUserSetting(setting_index, std::move(target_value));
303330}
◆ ClearSetting()
| void duckdb::GlobalUserSettings::ClearSetting |
( |
idx_t | setting_index | ) |
|
303332 {
303333 lock_guard<mutex> guard(lock);
303336}
◆ IsSet()
| bool duckdb::GlobalUserSettings::IsSet |
( |
idx_t | setting_index | ) |
const |
303338 {
303339 lock_guard<mutex> guard(lock);
303341}
◆ TryGetSetting()
303343 {
303344#ifndef __MINGW32__
303345
303346 const auto &cache = GetSettings();
303347 if (cache.settings.TryGetSetting(setting_index, result_value)) {
303349 }
303350#else
303351 lock_guard<mutex> guard(lock);
303352 if (
settings_map.TryGetSetting(setting_index, result_value)) {
303354 }
303355#endif
303356
303357 return SettingLookupResult();
303358}
@ GLOBAL
Setting is from the global Setting scope.
Definition duckdb.hpp:37010
◆ HasExtensionOption()
| bool duckdb::GlobalUserSettings::HasExtensionOption |
( |
const string & | name | ) |
const |
303360 {
303361 lock_guard<mutex> l(lock);
303363}
◆ AddExtensionOption()
| idx_t duckdb::GlobalUserSettings::AddExtensionOption |
( |
const string & | name, |
|
|
ExtensionOption | extension_option ) |
303365 {
303366 lock_guard<mutex> l(lock);
303367 const auto new_option =
extension_parameters.emplace(make_pair(name, std::move(extension_option)));
303368 const auto did_insert = new_option.second;
303369 auto &option = new_option.first->second;
303370
303371 if (!did_insert) {
303372 return option.setting_index.GetIndex();
303373 }
303374
303375 auto setting_index = GeneratedSettingInfo::MaxSettingIndex +
extension_parameters.size() - 1;
303376 option.setting_index = setting_index;
303378 return setting_index;
303379}
◆ GetExtensionSettings()
| case_insensitive_map_t< ExtensionOption > duckdb::GlobalUserSettings::GetExtensionSettings |
( |
| ) |
const |
303381 {
303382 lock_guard<mutex> l(lock);
303384}
◆ TryGetExtensionOption()
| bool duckdb::GlobalUserSettings::TryGetExtensionOption |
( |
const String & | name, |
|
|
ExtensionOption & | result ) const |
303386 {
303387 lock_guard<mutex> l(lock);
303390 return false;
303391 }
303392 result = entry->second;
303393 return true;
303394}
◆ GetUUID()
| hugeint_t duckdb::GlobalUserSettings::GetUUID |
( |
| ) |
const |
◆ GetSettings()
303397 {
303398
303399#ifdef __MVS__
303400 static __tlssim<CachedGlobalSettings> current_cache_impl;
303401#define current_cache (*current_cache_impl.access())
303402#else
303403 thread_local CachedGlobalSettings current_cache;
303404#endif
303405
303406 const auto current_version =
settings_version.load(std::memory_order_relaxed);
303407 if (!current_cache.global_user_settings || this != current_cache.global_user_settings.get() ||
303408 current_cache.uuid !=
uuid || current_cache.version != current_version) {
303409
303410 lock_guard<mutex> guard(lock);
303412 }
303413 return current_cache;
303414#ifdef __MVS__
303415#undef current_cache
303416#endif
303417}
The documentation for this struct was generated from the following files: