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

Public Member Functions

void Serialize (Serializer &serializer) const

Static Public Member Functions

static unique_ptr< ExtensionInstallInfo > TryReadInfoFile (FileSystem &fs, const string &info_file_path, const string &extension_name)
 Try to read install info. returns ExtensionInstallMode::UNKNOWN on missing file, and throws on corrupt file.
static unique_ptr< ExtensionInstallInfo > Deserialize (Deserializer &deserializer)

Public Attributes

ExtensionInstallMode mode = ExtensionInstallMode::UNKNOWN
 How the extension was installed.
string full_path
 (optional) Full path where the extension came from
string repository_url
 (optional) Repository url where the extension came from
string version
 (optional) Version of the extension
string etag
 (optional) ETag of last fetched resource

Member Function Documentation

◆ Serialize()

void duckdb::ExtensionInstallInfo::Serialize ( Serializer & serializer) const
416211 {
416212 serializer.WriteProperty<ExtensionInstallMode>(100, "mode", mode);
416213 serializer.WritePropertyWithDefault<string>(101, "full_path", full_path);
416214 serializer.WritePropertyWithDefault<string>(102, "repository_url", repository_url);
416215 serializer.WritePropertyWithDefault<string>(103, "version", version);
416216 serializer.WritePropertyWithDefault<string>(104, "etag", etag);
416217}
string repository_url
(optional) Repository url where the extension came from
Definition duckdb.hpp:53927
string full_path
(optional) Full path where the extension came from
Definition duckdb.hpp:53925
ExtensionInstallMode mode
How the extension was installed.
Definition duckdb.hpp:53923
string etag
(optional) ETag of last fetched resource
Definition duckdb.hpp:53931
string version
(optional) Version of the extension
Definition duckdb.hpp:53929
ExtensionInstallMode
Definition duckdb.hpp:53903

◆ TryReadInfoFile()

unique_ptr< ExtensionInstallInfo > duckdb::ExtensionInstallInfo::TryReadInfoFile ( FileSystem & fs,
const string & info_file_path,
const string & extension_name )
static

Try to read install info. returns ExtensionInstallMode::UNKNOWN on missing file, and throws on corrupt file.

281314 {
281315 unique_ptr<ExtensionInstallInfo> result;
281316
281317 string hint = StringUtil::Format("Try reinstalling the extension using 'FORCE INSTALL %s;'", extension_name);
281318
281319 // Return empty info if the file is missing (TODO: throw error here in the future?)
281320 if (!fs.FileExists(info_file_path)) {
281321 return make_uniq<ExtensionInstallInfo>();
281322 }
281323
281324 BufferedFileReader file_reader(fs, info_file_path.c_str());
281325 if (!file_reader.Finished()) {
281326 try {
281327 result = BinaryDeserializer::Deserialize<ExtensionInstallInfo>(file_reader);
281328 } catch (std::exception &ex) {
281329 ErrorData error(ex);
281330 throw IOException(
281331 "Failed to read info file for '%s' extension: '%s'.\nA serialization error occurred: '%s'\n%s",
281332 extension_name, info_file_path, error.RawMessage(), hint);
281333 }
281334 }
281335
281336 if (!result) {
281337 throw IOException("Failed to read info file for '%s' extension: '%s'.\nThe file appears to be empty!\n%s",
281338 extension_name, info_file_path, hint);
281339 }
281340
281341 return result;
281342}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
Here is the call graph for this function:

◆ Deserialize()

unique_ptr< ExtensionInstallInfo > duckdb::ExtensionInstallInfo::Deserialize ( Deserializer & deserializer)
static
416219 {
416220 auto result = duckdb::unique_ptr<ExtensionInstallInfo>(new ExtensionInstallInfo());
416221 deserializer.ReadProperty<ExtensionInstallMode>(100, "mode", result->mode);
416222 deserializer.ReadPropertyWithDefault<string>(101, "full_path", result->full_path);
416223 deserializer.ReadPropertyWithDefault<string>(102, "repository_url", result->repository_url);
416224 deserializer.ReadPropertyWithDefault<string>(103, "version", result->version);
416225 deserializer.ReadPropertyWithDefault<string>(104, "etag", result->etag);
416226 return result;
416227}

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