Add settings helpers

This commit is contained in:
Yves
2025-02-21 11:41:22 +01:00
parent 642988fa94
commit f1bb58e6c7
3 changed files with 45 additions and 0 deletions

15
src/settings.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "settings.hpp"
namespace duckdb {
std::string GetRemoteUrl(const ClientContext &context) {
return internal::GetSetting<std::string>(context, UI_REMOTE_URL_SETTING_NAME);
}
uint16_t GetLocalPort(const ClientContext &context) {
return internal::GetSetting<uint16_t>(context, UI_LOCAL_PORT_SETTING_NAME);
}
uint32_t GetPollingInterval(const ClientContext &context) {
return internal::GetSetting<uint32_t>(context,
UI_POLLING_INTERVAL_SETTING_NAME);
}
} // namespace duckdb