CreateSecretFunctionsSet contains multiple functions of a single type, identified by the provider. The provider should be seen as the method of secret creation. (e.g. user-provided config, env variables, auto-detect).
More...
#include <duckdb.hpp>
CreateSecretFunctionsSet contains multiple functions of a single type, identified by the provider. The provider should be seen as the method of secret creation. (e.g. user-provided config, env variables, auto-detect).
◆ CreateSecretFunctionSet()
| duckdb::CreateSecretFunctionSet::CreateSecretFunctionSet |
( |
string & | name | ) |
|
|
inlineexplicit |
string name
Create Secret Function type name.
Definition duckdb.hpp:53181
◆ ProviderExists()
| bool duckdb::CreateSecretFunctionSet::ProviderExists |
( |
const string & | provider_name | ) |
|
300108 {
300110}
case_insensitive_map_t< CreateSecretFunction > functions
Maps of provider -> function.
Definition duckdb.hpp:53183
◆ AddFunction()
| void duckdb::CreateSecretFunctionSet::AddFunction |
( |
CreateSecretFunction & | function, |
|
|
OnCreateConflict | on_conflict ) |
300112 {
300113 if (ProviderExists(function.provider)) {
300114 if (on_conflict == OnCreateConflict::ERROR_ON_CONFLICT) {
300115 throw InternalException(
300116 "Attempted to override a Create Secret Function with OnCreateConflict::ERROR_ON_CONFLICT for: '%s'",
300117 function.provider);
300118 } else if (on_conflict == OnCreateConflict::REPLACE_ON_CONFLICT) {
300119 functions[function.provider] = function;
300120 } else if (on_conflict == OnCreateConflict::ALTER_ON_CONFLICT) {
300121 throw NotImplementedException("ALTER_ON_CONFLICT not implemented for CreateSecretFunctionSet");
300122 }
300123 } else {
300124 functions[function.provider] = function;
300125 }
300126}
◆ GetFunction()
300128 {
300129 const auto &lookup =
functions.find(provider);
300130
300132 throw InternalException("Could not find Create Secret Function with provider %s");
300133 }
300134
300135 return lookup->second;
300136}
The documentation for this class was generated from the following files: