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

Stores the database in a single file. More...

Inheritance diagram for duckdb::SingleFileStorageManager:
Collaboration diagram for duckdb::SingleFileStorageManager:

Public Member Functions

 SingleFileStorageManager (AttachedDatabase &db, string path, AttachOptions &options)
 
bool AutomaticCheckpoint (idx_t estimated_wal_bytes) override
 
unique_ptr< StorageCommitStateGenStorageCommitState (WriteAheadLog &wal) override
 
bool IsCheckpointClean (MetaBlockPointer checkpoint_id) override
 
void CreateCheckpoint (QueryContext context, CheckpointOptions options) override
 
DatabaseSize GetDatabaseSize () override
 
vector< MetadataBlockInfoGetMetadataInfo () override
 
shared_ptr< TableIOManagerGetTableIOManager (BoundCreateTableInfo *info) override
 
BlockManagerGetBlockManager () override
 
void Destroy () override
 
- Public Member Functions inherited from duckdb::StorageManager
 StorageManager (AttachedDatabase &db, string path, AttachOptions &options)
 
void Initialize (QueryContext context)
 
DatabaseInstanceGetDatabase ()
 
AttachedDatabaseGetAttached () const
 
idx_t GetWALSize ()
 Gets the size of the WAL, or zero, if there is no WAL.
 
bool HasWAL () const
 
void AddWALSize (idx_t size)
 
void SetWALSize (idx_t size)
 
idx_t GetWALEntriesCount () const
 Gets the number of WAL entries since last checkpoint.
 
void ResetWALEntriesCount ()
 
void IncrementWALEntriesCount ()
 
optional_ptr< WriteAheadLogGetWAL ()
 Gets the WAL of the StorageManager, or nullptr, if there is no WAL.
 
bool WALStartCheckpoint (MetaBlockPointer meta_block, CheckpointOptions &options)
 Write that we started a checkpoint to the WAL if there is one - returns whether or not there is a WAL.
 
void WALFinishCheckpoint (lock_guard< mutex > &wal_lock)
 Finishes a checkpoint.
 
unique_ptr< lock_guard< mutex > > GetWALLock ()
 
string GetDBPath () const
 Returns the database file path.
 
bool IsLoaded () const
 
string GetWALPath (const string &suffix=".wal")
 The path to the WAL, derived from the database file path.
 
string GetCheckpointWALPath ()
 The path to the WAL that is used while a checkpoint is running.
 
string GetRecoveryWALPath ()
 The path to the WAL that is used while recovering from a crash involving the checkpoint WAL.
 
bool InMemory () const
 
void SetStorageVersion (idx_t version)
 
bool HasStorageVersion () const
 
idx_t GetStorageVersion () const
 
bool CompressionIsEnabled () const
 
EncryptionTypes::CipherType GetCipher () const
 
void SetCipher (EncryptionTypes::CipherType cipher_p)
 
void SetEncryptionVersion (EncryptionTypes::EncryptionVersion version)
 
bool IsEncrypted () const
 
EncryptionTypes::EncryptionVersion GetEncryptionVersion () const
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Public Attributes

unique_ptr< BlockManagerblock_manager
 The BlockManager to read from and write to blocks, both for the metadata and the data itself.
 
unique_ptr< TableIOManagertable_io_manager
 The table I/O manager.
 

Protected Member Functions

void LoadDatabase (QueryContext context) override
 
unique_ptr< CheckpointWriterCreateCheckpointWriter (QueryContext context, CheckpointOptions options)
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::StorageManager
static StorageManagerGet (AttachedDatabase &db)
 
static StorageManagerGet (Catalog &catalog)
 
- Protected Attributes inherited from duckdb::StorageManager
AttachedDatabasedb
 The attached database managed by this storage manager.
 
string path
 The path of the database.
 
string wal_path
 The WAL path.
 
unique_ptr< WriteAheadLogwal
 The WriteAheadLog of the storage manager.
 
mutex wal_lock
 Mutex used to control writes to the WAL.
 
bool read_only
 Whether or not the database is opened in read-only mode.
 
bool load_complete = false
 
optional_idx storage_version
 The serialization compatibility version when reading and writing from this database.
 
atomic< idx_twal_size
 
atomic< idx_twal_entries_count
 
StorageOptions storage_options
 Storage options passed in through configuration.
 

Detailed Description

Stores the database in a single file.

Member Function Documentation

◆ AutomaticCheckpoint()

bool duckdb::SingleFileStorageManager::AutomaticCheckpoint ( idx_t  estimated_wal_bytes)
overridevirtual

◆ GenStorageCommitState()

unique_ptr< StorageCommitState > duckdb::SingleFileStorageManager::GenStorageCommitState ( WriteAheadLog wal)
overridevirtual

◆ IsCheckpointClean()

bool duckdb::SingleFileStorageManager::IsCheckpointClean ( MetaBlockPointer  checkpoint_id)
overridevirtual

◆ CreateCheckpoint()

void duckdb::SingleFileStorageManager::CreateCheckpoint ( QueryContext  context,
CheckpointOptions  options 
)
overridevirtual

◆ GetDatabaseSize()

DatabaseSize duckdb::SingleFileStorageManager::GetDatabaseSize ( )
overridevirtual

◆ GetMetadataInfo()

vector< MetadataBlockInfo > duckdb::SingleFileStorageManager::GetMetadataInfo ( )
overridevirtual

◆ GetTableIOManager()

shared_ptr< TableIOManager > duckdb::SingleFileStorageManager::GetTableIOManager ( BoundCreateTableInfo info)
overridevirtual

◆ GetBlockManager()

BlockManager & duckdb::SingleFileStorageManager::GetBlockManager ( )
overridevirtual

◆ Destroy()

void duckdb::SingleFileStorageManager::Destroy ( )
overridevirtual

Reimplemented from duckdb::StorageManager.

◆ LoadDatabase()

void duckdb::SingleFileStorageManager::LoadDatabase ( QueryContext  context)
overrideprotectedvirtual

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