Base class from which BaseSecret classes can be made.
More...
#include <duckdb.hpp>
|
|
vector< string > | prefix_paths |
| | prefixes to which the secret applies
|
|
string | type |
| | Type of secret.
|
|
string | provider |
| | Provider of the secret.
|
|
string | name |
| | Name of the secret.
|
|
bool | serializable |
| | Whether the secret can be serialized/deserialized.
|
Base class from which BaseSecret classes can be made.
◆ BaseSecret() [1/2]
| duckdb::BaseSecret::BaseSecret |
( |
vector< string > | prefix_paths_p, |
|
|
string | type_p, |
|
|
string | provider_p, |
|
|
string | name_p ) |
|
inline |
53216 D_ASSERT(!
type.empty());
53217 }
string type
Type of secret.
Definition duckdb.hpp:53263
string provider
Provider of the secret.
Definition duckdb.hpp:53265
vector< string > prefix_paths
prefixes to which the secret applies
Definition duckdb.hpp:53260
string name
Name of the secret.
Definition duckdb.hpp:53267
bool serializable
Whether the secret can be serialized/deserialized.
Definition duckdb.hpp:53269
◆ BaseSecret() [2/2]
| duckdb::BaseSecret::BaseSecret |
( |
const BaseSecret & | other | ) |
|
|
inline |
53221 D_ASSERT(!
type.empty());
53222 }
◆ MatchScore()
| int64_t duckdb::BaseSecret::MatchScore |
( |
const string & | path | ) |
const |
|
virtual |
The score of how well this secret's scope matches the path (by default: the length of the longest matching prefix).
299867 {
299868 int64_t longest_match = NumericLimits<int64_t>::Minimum();
299869
299871 longest_match = 0;
299872 }
299873
299875
299876 if (prefix.empty()) {
299877 longest_match = 0;
299878 continue;
299879 }
299881 longest_match = MaxValue<int64_t>(NumericCast<int64_t>(prefix.length()), longest_match);
299882 }
299883 }
299884 return longest_match;
299885}
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.
Definition duckdb.cpp:109377
◆ ToString()
| string duckdb::BaseSecret::ToString |
( |
SecretDisplayType | mode = SecretDisplayType::REDACTED | ) |
const |
|
virtual |
◆ Serialize()
| void duckdb::BaseSecret::Serialize |
( |
Serializer & | serializer | ) |
const |
|
virtual |
Serialize this secret.
Reimplemented in duckdb::KeyValueSecret.
299899 {
299900 throw InternalException("Attempted to serialize secret without serialize");
299901}
◆ Clone()
| virtual unique_ptr< const BaseSecret > duckdb::BaseSecret::Clone |
( |
| ) |
const |
|
inlinevirtual |
53233 {
53234 D_ASSERT(typeid(BaseSecret) == typeid(*this));
53235 return make_uniq<BaseSecret>(*this);
53236 }
◆ GetScope()
| const vector< string > & duckdb::BaseSecret::GetScope |
( |
| ) |
const |
|
inline |
◆ GetType()
| const string & duckdb::BaseSecret::GetType |
( |
| ) |
const |
|
inline |
◆ GetProvider()
| const string & duckdb::BaseSecret::GetProvider |
( |
| ) |
const |
|
inline |
◆ GetName()
| const string & duckdb::BaseSecret::GetName |
( |
| ) |
const |
|
inline |
◆ IsSerializable()
| bool duckdb::BaseSecret::IsSerializable |
( |
| ) |
const |
|
inline |
◆ SerializeBaseSecret()
| void duckdb::BaseSecret::SerializeBaseSecret |
( |
Serializer & | serializer | ) |
const |
|
finalprotectedvirtual |
Helper function to serialize the base BaseSecret class variables.
299887 {
299888 serializer.WriteProperty(100,
"type",
type);
299889 serializer.WriteProperty(101,
"provider",
provider);
299890 serializer.WriteProperty(102,
"name",
name);
299891 serializer.WriteList(103,
"scope",
prefix_paths.size(),
299892 [&](Serializer::List &list,
idx_t i) { list.WriteElement(prefix_paths[i]); });
299893}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
The documentation for this class was generated from the following files: