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

The database object. This object holds the catalog and all the database-specific meta information. More...

#include <duckdb.hpp>

Collaboration diagram for DuckDB:

Public Member Functions

DUCKDB_API DuckDB (const char *path=nullptr, DBConfig *config=nullptr)
DUCKDB_API DuckDB (const string &path, DBConfig *config=nullptr)
DUCKDB_API DuckDB (DatabaseInstance &instance)
template<class T>
void LoadStaticExtension ()
DUCKDB_API FileSystem & GetFileSystem ()
DUCKDB_API idx_t NumberOfThreads ()
DUCKDB_API bool ExtensionIsLoaded (const string &name)

Static Public Member Functions

static DUCKDB_API const char * SourceID ()
static DUCKDB_API const char * LibraryVersion ()
static DUCKDB_API const char * ReleaseCodename ()
static DUCKDB_API idx_t StandardVectorSize ()
static DUCKDB_API string Platform ()

Public Attributes

shared_ptr< DatabaseInstance > instance
 Reference to the actual database instance.

Detailed Description

The database object. This object holds the catalog and all the database-specific meta information.

Constructor & Destructor Documentation

◆ DuckDB() [1/3]

duckdb::DuckDB::DuckDB ( const char * path = nullptr,
DBConfig * config = nullptr )
explicit
277068 : instance(make_shared_ptr<DatabaseInstance>()) {
277069 instance->Initialize(path, new_config);
277070 if (instance->config.options.load_extensions) {
277071 ExtensionHelper::LoadAllExtensions(*this);
277072 }
277073 instance->db_manager->FinalizeStartup();
277074}
shared_ptr< DatabaseInstance > instance
Reference to the actual database instance.
Definition duckdb.hpp:54248
shared_ptr< DatabaseInstance > instance
Reference to the actual database instance.
Definition duckdb.hpp:54248

◆ DuckDB() [2/3]

duckdb::DuckDB::DuckDB ( const string & path,
DBConfig * config = nullptr )
explicit
277076 : DuckDB(path.c_str(), config) {
277077}

◆ DuckDB() [3/3]

duckdb::DuckDB::DuckDB ( DatabaseInstance & instance)
explicit
277079 : instance(instance_p.shared_from_this()) {
277080}

◆ ~DuckDB()

duckdb::DuckDB::~DuckDB ( )
277082 {
277083}

Member Function Documentation

◆ LoadStaticExtension()

template<class T>
void duckdb::DuckDB::LoadStaticExtension ( )
inline
54253 {
54254 T extension;
54255 auto &manager = ExtensionManager::Get(*instance);
54256 auto load_info = manager.BeginLoad(extension.Name());
54257 if (!load_info) {
54258 // already loaded - return
54259 return;
54260 }
54261
54262 // Instantiate a new loader
54263 ExtensionLoader loader(*load_info);
54264
54265 // Call the Load method of the extension
54266 extension.Load(loader);
54267
54268 // Finalize the loading process
54269 loader.FinalizeLoad();
54270
54271 ExtensionInstallInfo install_info;
54272 install_info.mode = ExtensionInstallMode::STATICALLY_LINKED;
54273 install_info.version = extension.Version();
54274 load_info->FinishLoad(install_info);
54275 }

◆ GetFileSystem()

FileSystem & duckdb::DuckDB::GetFileSystem ( )
277137 {
277138 return instance->GetFileSystem();
277139}

◆ NumberOfThreads()

idx_t duckdb::DuckDB::NumberOfThreads ( )
277246 {
277247 return instance->NumberOfThreads();
277248}

◆ SourceID()

const char * duckdb::DuckDB::SourceID ( )
static
252272 {
252273 return DUCKDB_SOURCE_ID;
252274}

◆ LibraryVersion()

const char * duckdb::DuckDB::LibraryVersion ( )
static
252276 {
252277 return DUCKDB_VERSION;
252278}

◆ ReleaseCodename()

const char * duckdb::DuckDB::ReleaseCodename ( )
static
252280 {
252281 // dev releases have no name
252282 if (StringUtil::Contains(DUCKDB_VERSION, "-dev")) {
252283 return "Development Version";
252284 }
252285 if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.2.")) {
252286 return "Histrionicus";
252287 }
252288 if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.3.")) {
252289 return "Ossivalis";
252290 }
252291 if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.4.")) {
252292 return "Andium";
252293 }
252294 if (StringUtil::StartsWith(DUCKDB_VERSION, "v1.5.")) {
252295 return "Variegata";
252296 }
252297 // add new version names here
252298
252299 // we should not get here, but let's not fail because of it because tags on forks can be whatever
252300 return "Unknown Version";
252301}
static DUCKDB_API bool Contains(const string &haystack, const string &needle)
Returns true if the needle string exists in the haystack.
Definition duckdb.cpp:109323
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.
Definition duckdb.cpp:109377

◆ StandardVectorSize()

idx_t duckdb::DuckDB::StandardVectorSize ( )
static
252268 {
252269 return STANDARD_VECTOR_SIZE;
252270}

◆ Platform()

string duckdb::DuckDB::Platform ( )
static
252303 {
252304 return DuckDBPlatform();
252305}

◆ ExtensionIsLoaded()

bool duckdb::DuckDB::ExtensionIsLoaded ( const string & name)
277254 {
277255 return instance->ExtensionIsLoaded(name);
277256}

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