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::ExtensionRepository Struct Reference

Public Member Functions

 ExtensionRepository (const string &name, const string &url)
string ToReadableString ()
 Print the name if it has one, or the full path if not.

Static Public Member Functions

static string GetRepository (const string &repository_url)
 Returns the repository name is this is a known repository, or the full url if it is not.
static string TryGetRepositoryUrl (const string &repository)
 Try to convert a repository to a url, will return empty string if the repository is unknown.
static string TryConvertUrlToKnownRepository (const string &url)
 Try to convert a url to a known repository name, will return empty string if the repository is unknown.
static ExtensionRepository GetDefaultRepository (optional_ptr< DBConfig > config)
 Get the default repository, optionally passing a config to allow.
static ExtensionRepository GetDefaultRepository (ClientContext &context)
static ExtensionRepository GetCoreRepository ()
static ExtensionRepository GetRepositoryByUrl (const string &url)

Public Attributes

string name
 Repository name.
string path
 Repository path/url.

Static Public Attributes

static constexpr const char * CORE_REPOSITORY_URL = "http://extensions.duckdb.org"
 All currently available repositories.
static constexpr const char * CORE_NIGHTLY_REPOSITORY_URL = "http://nightly-extensions.duckdb.org"
static constexpr const char * COMMUNITY_REPOSITORY_URL = "http://community-extensions.duckdb.org"
static constexpr const char * BUILD_DEBUG_REPOSITORY_PATH = "./build/debug/repository"
 Debugging repositories (target local, relative paths that are produced by DuckDB's build system).
static constexpr const char * BUILD_RELEASE_REPOSITORY_PATH = "./build/release/repository"
static constexpr const char * DEFAULT_REPOSITORY_URL = CORE_REPOSITORY_URL
 The default is CORE.

Constructor & Destructor Documentation

◆ ExtensionRepository() [1/2]

duckdb::ExtensionRepository::ExtensionRepository ( )
281300 : name("core"), path(CORE_REPOSITORY_URL) {
281301}
string path
Repository path/url.
Definition duckdb.hpp:53978
string name
Repository name.
Definition duckdb.hpp:53976
static constexpr const char * CORE_REPOSITORY_URL
All currently available repositories.
Definition duckdb.hpp:53944

◆ ExtensionRepository() [2/2]

duckdb::ExtensionRepository::ExtensionRepository ( const string & name,
const string & url )
281302 : name(name_p), path(path_p) {
281303}

Member Function Documentation

◆ GetRepository()

string duckdb::ExtensionRepository::GetRepository ( const string & repository_url)
static

Returns the repository name is this is a known repository, or the full url if it is not.

281234 {
281235 auto resolved_repository = TryConvertUrlToKnownRepository(repository_url);
281236 if (resolved_repository.empty()) {
281237 return repository_url;
281238 }
281239 return resolved_repository;
281240}
static string TryConvertUrlToKnownRepository(const string &url)
Try to convert a url to a known repository name, will return empty string if the repository is unknow...
Definition duckdb.cpp:281257
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryGetRepositoryUrl()

string duckdb::ExtensionRepository::TryGetRepositoryUrl ( const string & repository)
static

Try to convert a repository to a url, will return empty string if the repository is unknown.

281242 {
281243 if (repository == "core") {
281244 return CORE_REPOSITORY_URL;
281245 } else if (repository == "core_nightly") {
281246 return CORE_NIGHTLY_REPOSITORY_URL;
281247 } else if (repository == "community") {
281248 return COMMUNITY_REPOSITORY_URL;
281249 } else if (repository == "local_build_debug") {
281251 } else if (repository == "local_build_release") {
281252 return BUILD_RELEASE_REPOSITORY_PATH;
281253 }
281254 return "";
281255}
static constexpr const char * BUILD_DEBUG_REPOSITORY_PATH
Debugging repositories (target local, relative paths that are produced by DuckDB's build system).
Definition duckdb.hpp:53949
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryConvertUrlToKnownRepository()

string duckdb::ExtensionRepository::TryConvertUrlToKnownRepository ( const string & url)
static

Try to convert a url to a known repository name, will return empty string if the repository is unknown.

281257 {
281258 if (url == CORE_REPOSITORY_URL) {
281259 return "core";
281260 } else if (url == CORE_NIGHTLY_REPOSITORY_URL) {
281261 return "core_nightly";
281262 } else if (url == COMMUNITY_REPOSITORY_URL) {
281263 return "community";
281264 } else if (url == BUILD_DEBUG_REPOSITORY_PATH) {
281265 return "local_build_debug";
281266 } else if (url == BUILD_RELEASE_REPOSITORY_PATH) {
281267 return "local_build_release";
281268 }
281269 return "";
281270}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDefaultRepository() [1/2]

ExtensionRepository duckdb::ExtensionRepository::GetDefaultRepository ( optional_ptr< DBConfig > config)
static

Get the default repository, optionally passing a config to allow.

281272 {
281273 if (config) {
281274 auto custom_extension_repo = Settings::Get<CustomExtensionRepositorySetting>(*config);
281275 if (!custom_extension_repo.empty()) {
281276 return ExtensionRepository("", custom_extension_repo);
281277 }
281278 }
281279
281280 return GetCoreRepository();
281281}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDefaultRepository() [2/2]

ExtensionRepository duckdb::ExtensionRepository::GetDefaultRepository ( ClientContext & context)
static
281282 {
281283 auto &config = DBConfig::GetConfig(context);
281284 return GetDefaultRepository(config);
281285}
static ExtensionRepository GetDefaultRepository(optional_ptr< DBConfig > config)
Get the default repository, optionally passing a config to allow.
Definition duckdb.cpp:281272

◆ GetCoreRepository()

ExtensionRepository duckdb::ExtensionRepository::GetCoreRepository ( )
static
281287 {
281288 return {"core", CORE_REPOSITORY_URL};
281289}

◆ GetRepositoryByUrl()

ExtensionRepository duckdb::ExtensionRepository::GetRepositoryByUrl ( const string & url)
static
281291 {
281292 if (url.empty()) {
281293 return GetCoreRepository();
281294 }
281295
281296 auto repo_name = TryConvertUrlToKnownRepository(url);
281297 return {repo_name, url};
281298}

◆ ToReadableString()

string duckdb::ExtensionRepository::ToReadableString ( )

Print the name if it has one, or the full path if not.

281305 {
281306 if (!name.empty()) {
281307 return name;
281308 }
281309 return path;
281310}

The documentation for this struct was generated from the following files: