|
|
using | RETURN_TYPE = vector<string> |
|
|
static constexpr const char * | Name = "allowed_paths" |
| static constexpr const char * | Description |
|
static constexpr const char * | InputType = "VARCHAR[]" |
◆ SetGlobal()
301579 {
301580 if (!Settings::Get<EnableExternalAccessSetting>(config)) {
301581 throw InvalidInputException("Cannot change allowed_paths when enable_external_access is disabled");
301582 }
301584 throw InvalidInputException("Cannot change/set allowed_paths before the database is started");
301585 }
301586
301588 auto &list = ListValue::GetChildren(input);
301589 for (auto &val : list) {
301590 config.AddAllowedPath(val.GetValue<string>());
301591 }
301592}
unordered_set< string > allowed_paths
Paths that are explicitly allowed, even if enable_external_access is false.
Definition duckdb.hpp:40054
unique_ptr< FileSystem > file_system
The FileSystem to use, can be overwritten to allow for injecting custom file systems for testing purp...
Definition duckdb.hpp:40082
DBConfigOptions options
Database configuration options.
Definition duckdb.hpp:40090
◆ ResetGlobal()
301594 {
301595 if (!Settings::Get<EnableExternalAccessSetting>(config)) {
301596 throw InvalidInputException("Cannot change allowed_paths when enable_external_access is disabled");
301597 }
301599}
◆ GetSetting()
301601 {
301602 auto &config = DBConfig::GetConfig(context);
301603 vector<Value> allowed_paths;
301604 for (auto &dir : config.options.allowed_paths) {
301605 allowed_paths.emplace_back(dir);
301606 }
301607 return Value::LIST(LogicalType::VARCHAR, std::move(allowed_paths));
301608}
static DUCKDB_API Value LIST(const LogicalType &child_type, vector< Value > values)
Create a list value with the given entries.
Definition duckdb.cpp:132555
◆ Description
| const char* duckdb::AllowedPathsSetting::Description |
|
staticconstexpr |
Initial value:=
"List of files that are ALWAYS allowed to be queried - even when enable_external_access is false"
The documentation for this struct was generated from the following file: