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::ValidChecker Class Reference
Collaboration diagram for duckdb::ValidChecker:

Public Member Functions

 ValidChecker (DatabaseInstance &db)
DUCKDB_API void Invalidate (string error)
DUCKDB_API bool IsInvalidated ()
DUCKDB_API string InvalidatedMessage ()

Static Public Member Functions

static DUCKDB_API ValidChecker & Get (DatabaseInstance &db)
static DUCKDB_API ValidChecker & Get (MetaTransaction &transaction)
template<class T>
static bool IsInvalidated (T &o)
template<class T>
static void Invalidate (T &o, string error)
template<class T>
static string InvalidatedMessage (T &o)

Private Attributes

mutex invalidate_lock
atomic< bool > is_invalidated
 Set to true when encountering a fatal exception.
string invalidated_msg
 The message invalidating the database instance.
DatabaseInstance & db
 The database instance.

Constructor & Destructor Documentation

◆ ValidChecker()

duckdb::ValidChecker::ValidChecker ( DatabaseInstance & db)
explicit
303466 : is_invalidated(false), db(db) {
303467}
DatabaseInstance & db
The database instance.
Definition duckdb.hpp:40278
atomic< bool > is_invalidated
Set to true when encountering a fatal exception.
Definition duckdb.hpp:40274

Member Function Documentation

◆ Get() [1/2]

ValidChecker & duckdb::ValidChecker::Get ( DatabaseInstance & db)
static
277325 {
277326 return db.GetValidChecker();
277327}

◆ Get() [2/2]

ValidChecker & duckdb::ValidChecker::Get ( MetaTransaction & transaction)
static
447082 {
447083 return transaction.transaction_validity;
447084}

◆ Invalidate() [1/2]

void duckdb::ValidChecker::Invalidate ( string error)
303469 {
303470 lock_guard<mutex> l(invalidate_lock);
303471 is_invalidated = true;
303472 invalidated_msg = std::move(error);
303473}
string invalidated_msg
The message invalidating the database instance.
Definition duckdb.hpp:40276

◆ IsInvalidated() [1/2]

bool duckdb::ValidChecker::IsInvalidated ( )
303475 {
303476 if (Settings::Get<DisableDatabaseInvalidationSetting>(db)) {
303477 return false;
303478 }
303479 return is_invalidated;
303480}

◆ InvalidatedMessage() [1/2]

string duckdb::ValidChecker::InvalidatedMessage ( )
303482 {
303483 lock_guard<mutex> l(invalidate_lock);
303484 return invalidated_msg;
303485}

◆ IsInvalidated() [2/2]

template<class T>
bool duckdb::ValidChecker::IsInvalidated ( T & o)
inlinestatic
40258 {
40259 return Get(o).IsInvalidated();
40260 }

◆ Invalidate() [2/2]

template<class T>
void duckdb::ValidChecker::Invalidate ( T & o,
string error )
inlinestatic
40262 {
40263 Get(o).Invalidate(std::move(error));
40264 }

◆ InvalidatedMessage() [2/2]

template<class T>
string duckdb::ValidChecker::InvalidatedMessage ( T & o)
inlinestatic
40267 {
40268 return Get(o).InvalidatedMessage();
40269 }

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