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::CreateSecretFunctionSet Class Reference

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>

Public Member Functions

 CreateSecretFunctionSet (string &name)
bool ProviderExists (const string &provider_name)
void AddFunction (CreateSecretFunction &function, OnCreateConflict on_conflict)
CreateSecretFunction & GetFunction (const string &provider)

Protected Attributes

string name
 Create Secret Function type name.
case_insensitive_map_t< CreateSecretFunction > functions
 Maps of provider -> function.

Detailed Description

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).

Constructor & Destructor Documentation

◆ CreateSecretFunctionSet()

duckdb::CreateSecretFunctionSet::CreateSecretFunctionSet ( string & name)
inlineexplicit
53172: name(name) {};
string name
Create Secret Function type name.
Definition duckdb.hpp:53181

Member Function Documentation

◆ ProviderExists()

bool duckdb::CreateSecretFunctionSet::ProviderExists ( const string & provider_name)
300108 {
300109 return functions.find(provider_name) != functions.end();
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()

CreateSecretFunction & duckdb::CreateSecretFunctionSet::GetFunction ( const string & provider)
300128 {
300129 const auto &lookup = functions.find(provider);
300130
300131 if (lookup == functions.end()) {
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: