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

The AttachedDatabase represents an attached database instance. More...

Inheritance diagram for duckdb::AttachedDatabase:
Collaboration diagram for duckdb::AttachedDatabase:

Public Member Functions

 AttachedDatabase (DatabaseInstance &db, AttachedDatabaseType type=AttachedDatabaseType::SYSTEM_DATABASE)
 Create the built-in system database (without storage).
 
 AttachedDatabase (DatabaseInstance &db, Catalog &catalog, string name, string file_path, AttachOptions &options)
 Create an attached database instance with the specified name and storage.
 
 AttachedDatabase (DatabaseInstance &db, Catalog &catalog, StorageExtension &ext, ClientContext &context, string name, AttachInfo &info, AttachOptions &options)
 Create an attached database instance with the specified storage extension.
 
void Initialize (optional_ptr< ClientContext > context=nullptr)
 Initializes the catalog and storage of the attached database.
 
void FinalizeLoad (optional_ptr< ClientContext > context)
 
void Close (const DatabaseCloseAction action)
 Close the database before shutting it down.
 
CatalogParentCatalog () override
 
const CatalogParentCatalog () const override
 
bool HasStorageManager () const
 
StorageManagerGetStorageManager ()
 
const StorageManagerGetStorageManager () const
 
CatalogGetCatalog ()
 
TransactionManagerGetTransactionManager ()
 
DatabaseInstanceGetDatabase ()
 
optional_ptr< StorageExtensionGetStorageExtension ()
 
const string & GetName () const
 
void SetName (const string &new_name)
 
bool IsSystem () const
 
bool IsTemporary () const
 
bool IsReadOnly () const
 
bool IsInitialDatabase () const
 
void SetInitialDatabase ()
 
void SetReadOnlyDatabase ()
 
void OnDetach (ClientContext &context)
 
RecoveryMode GetRecoveryMode () const
 
AttachVisibility GetVisibility () const
 
const unordered_map< string, Value > & GetAttachOptions () const
 
string StoredPath () const
 
- Public Member Functions inherited from duckdb::CatalogEntry
 CatalogEntry (CatalogType type, Catalog &catalog, string name)
 
 CatalogEntry (CatalogType type, string name, idx_t oid)
 
virtual unique_ptr< CatalogEntryAlterEntry (ClientContext &context, AlterInfo &info)
 
virtual unique_ptr< CatalogEntryAlterEntry (CatalogTransaction transaction, AlterInfo &info)
 
virtual void UndoAlter (ClientContext &context, AlterInfo &info)
 
virtual void Rollback (CatalogEntry &prev_entry)
 
virtual void OnDrop ()
 
virtual unique_ptr< CatalogEntryCopy (ClientContext &context) const
 
virtual unique_ptr< CreateInfoGetInfo () const
 
virtual void SetAsRoot ()
 Sets the CatalogEntry as the new root entry (i.e. the newest entry)
 
virtual string ToSQL () const
 Convert the catalog entry to a SQL string that can be used to re-construct the catalog entry.
 
virtual SchemaCatalogEntryParentSchema ()
 
virtual const SchemaCatalogEntryParentSchema () const
 
virtual void Verify (Catalog &catalog)
 
void Serialize (Serializer &serializer) const
 
void SetChild (unique_ptr< CatalogEntry > child)
 
unique_ptr< CatalogEntryTakeChild ()
 
bool HasChild () const
 
bool HasParent () const
 
CatalogEntryChild ()
 
CatalogEntryParent ()
 
const CatalogEntryParent () const
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 
- Public Member Functions inherited from duckdb::enable_shared_from_this< AttachedDatabase >
shared_ptr< AttachedDatabaseshared_from_this ()
 
shared_ptr< AttachedDatabase constshared_from_this () const
 

Static Public Member Functions

static bool NameIsReserved (const string &name)
 
static string ExtractDatabaseName (const string &dbpath, FileSystem &fs)
 
static void InvokeCloseIfLastReference (shared_ptr< AttachedDatabase > &attached_database)
 
- Static Public Member Functions inherited from duckdb::CatalogEntry
static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 

Private Member Functions

void Cleanup ()
 Clean any (shared) resources held by the database.
 

Private Attributes

DatabaseInstancedb
 
unique_ptr< StoredDatabasePathstored_database_path
 
unique_ptr< StorageManagerstorage
 
unique_ptr< Catalogcatalog
 
unique_ptr< TransactionManagertransaction_manager
 
AttachedDatabaseType type
 
optional_ptr< Catalogparent_catalog
 
optional_ptr< StorageExtensionstorage_extension
 
RecoveryMode recovery_mode = RecoveryMode::DEFAULT
 
AttachVisibility visibility = AttachVisibility::SHOWN
 
bool is_initial_database = false
 
bool is_closed = false
 
shared_ptr< mutex > close_lock
 
unordered_map< string, Valueattach_options
 

Additional Inherited Members

- Public Attributes inherited from duckdb::CatalogEntry
idx_t oid
 The oid of the entry.
 
CatalogType type
 The type of this catalog entry.
 
optional_ptr< CatalogSetset
 Reference to the catalog set this entry is stored in.
 
string name
 The name of the entry.
 
bool deleted
 Whether or not the object is deleted.
 
bool temporary
 Whether or not the object is temporary and should not be added to the WAL.
 
bool internal
 Whether or not the entry is an internal entry (cannot be deleted, not dumped, etc)
 
atomic< transaction_ttimestamp
 Timestamp at which the catalog entry was created.
 
Value comment
 (optional) comment on this entry
 
InsertionOrderPreservingMap< string > tags
 (optional) extra data associated with this entry
 
- Protected Member Functions inherited from duckdb::enable_shared_from_this< AttachedDatabase >
 enable_shared_from_this (enable_shared_from_this const &) noexcept
 
enable_shared_from_thisoperator= (enable_shared_from_this const &) noexcept
 

Detailed Description

The AttachedDatabase represents an attached database instance.

Member Function Documentation

◆ ParentCatalog() [1/2]

Catalog & duckdb::AttachedDatabase::ParentCatalog ( )
overridevirtual

Reimplemented from duckdb::CatalogEntry.

◆ ParentCatalog() [2/2]

const Catalog & duckdb::AttachedDatabase::ParentCatalog ( ) const
overridevirtual

Reimplemented from duckdb::CatalogEntry.

◆ GetDatabase()

DatabaseInstance & duckdb::AttachedDatabase::GetDatabase ( )
inline
40407 {
40408 return db;
40409 }

◆ GetStorageExtension()

optional_ptr< StorageExtension > duckdb::AttachedDatabase::GetStorageExtension ( )
inline
40411 {
40412 return storage_extension;
40413 }

◆ GetName()

const string & duckdb::AttachedDatabase::GetName ( ) const
inline
40415 {
40416 return name;
40417 }
string name
The name of the entry.
Definition duckdb.hpp:6311

◆ SetName()

void duckdb::AttachedDatabase::SetName ( const string &  new_name)
inline
40418 {
40419 name = new_name;
40420 }

◆ GetRecoveryMode()

RecoveryMode duckdb::AttachedDatabase::GetRecoveryMode ( ) const
inline
40428 {
40429 return recovery_mode;
40430 }

◆ GetVisibility()

AttachVisibility duckdb::AttachedDatabase::GetVisibility ( ) const
inline
40431 {
40432 return visibility;
40433 }

◆ GetAttachOptions()

const unordered_map< string, Value > & duckdb::AttachedDatabase::GetAttachOptions ( ) const
inline
40434 {
40435 return attach_options;
40436 }

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