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

A duck index entry. More...

Inheritance diagram for duckdb::DuckIndexEntry:
Collaboration diagram for duckdb::DuckIndexEntry:

Public Member Functions

 DuckIndexEntry (Catalog &catalog, SchemaCatalogEntry &schema, CreateIndexInfo &create_info, TableCatalogEntry &table)
 Create a DuckIndexEntry.
 
 DuckIndexEntry (Catalog &catalog, SchemaCatalogEntry &schema, CreateIndexInfo &create_info, shared_ptr< IndexDataTableInfo > storage_info)
 
unique_ptr< CatalogEntryCopy (ClientContext &context) const override
 
void Rollback (CatalogEntry &prev_entry) override
 
string GetSchemaName () const override
 
string GetTableName () const override
 
DataTableInfoGetDataTableInfo () const
 
void CommitDrop ()
 Drops in-memory index data and marks all blocks on disk as free blocks, allowing to reclaim them.
 
- Public Member Functions inherited from duckdb::IndexCatalogEntry
 IndexCatalogEntry (Catalog &catalog, SchemaCatalogEntry &schema, CreateIndexInfo &info)
 Create an IndexCatalogEntry.
 
unique_ptr< CreateInfoGetInfo () const override
 Returns the CreateIndexInfo.
 
string ToSQL () const override
 Returns the original CREATE INDEX SQL.
 
bool IsUnique () const
 Returns true, if this index is UNIQUE.
 
bool IsPrimary () const
 Returns true, if this index is a PRIMARY KEY.
 
- Public Member Functions inherited from duckdb::StandardEntry
 StandardEntry (CatalogType type, SchemaCatalogEntry &schema, Catalog &catalog, string name)
 
SchemaCatalogEntryParentSchema () override
 
const SchemaCatalogEntryParentSchema () const override
 
- Public Member Functions inherited from duckdb::InCatalogEntry
 InCatalogEntry (CatalogType type, Catalog &catalog, string name)
 
CatalogParentCatalog () override
 
const CatalogParentCatalog () const override
 
void Verify (Catalog &catalog) override
 
- 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 OnDrop ()
 
virtual void SetAsRoot ()
 Sets the CatalogEntry as the new root entry (i.e. the newest entry)
 
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 Attributes

shared_ptr< IndexDataTableInfoinfo
 The indexed table information.
 
idx_t initial_index_size
 
- Public Attributes inherited from duckdb::IndexCatalogEntry
string sql
 The SQL of the CREATE INDEX statement.
 
case_insensitive_map_t< Valueoptions
 Additional index options.
 
string index_type
 The index type (ART, B+-tree, Skip-List, ...)
 
IndexConstraintType index_constraint_type
 The index constraint type.
 
vector< column_tcolumn_ids
 The column ids of the indexed table.
 
vector< unique_ptr< ParsedExpression > > expressions
 The set of expressions to index by.
 
vector< unique_ptr< ParsedExpression > > parsed_expressions
 
- Public Attributes inherited from duckdb::StandardEntry
SchemaCatalogEntryschema
 The schema the entry belongs to.
 
LogicalDependencyList dependencies
 The dependencies of the entry, can be empty.
 
- Public Attributes inherited from duckdb::InCatalogEntry
Catalogcatalog
 The catalog the entry belongs to.
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::CatalogEntry
static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 
- Static Public Attributes inherited from duckdb::IndexCatalogEntry
static constexpr const CatalogType Type = CatalogType::INDEX_ENTRY
 
static constexpr const charName = "index"
 

Detailed Description

A duck index entry.

Constructor & Destructor Documentation

◆ DuckIndexEntry() [1/2]

duckdb::DuckIndexEntry::DuckIndexEntry ( Catalog catalog,
SchemaCatalogEntry schema,
CreateIndexInfo create_info,
TableCatalogEntry table 
)

Create a DuckIndexEntry.

9352 : IndexCatalogEntry(catalog, schema, create_info), initial_index_size(0) {
9353 auto &table = table_p.Cast<DuckTableEntry>();
9354 auto &storage = table.GetStorage();
9355 info = make_shared_ptr<IndexDataTableInfo>(storage.GetDataTableInfo(), name);
9356}
idx_t initial_index_size
Definition duckdb.cpp:9119
shared_ptr< IndexDataTableInfo > info
The indexed table information.
Definition duckdb.cpp:9116
Catalog & catalog
The catalog the entry belongs to.
Definition duckdb.hpp:6387
IndexCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateIndexInfo &info)
Create an IndexCatalogEntry.
Definition duckdb.cpp:14419
SchemaCatalogEntry & schema
The schema the entry belongs to.
Definition duckdb.hpp:28008
Here is the call graph for this function:

◆ DuckIndexEntry() [2/2]

duckdb::DuckIndexEntry::DuckIndexEntry ( Catalog catalog,
SchemaCatalogEntry schema,
CreateIndexInfo create_info,
shared_ptr< IndexDataTableInfo storage_info 
)
9360 : IndexCatalogEntry(catalog, schema, create_info), info(std::move(storage_info)), initial_index_size(0) {
9361}

Member Function Documentation

◆ Copy()

unique_ptr< CatalogEntry > duckdb::DuckIndexEntry::Copy ( ClientContext context) const
overridevirtual

Reimplemented from duckdb::CatalogEntry.

9363 {
9364 auto info_copy = GetInfo();
9365 auto &cast_info = info_copy->Cast<CreateIndexInfo>();
9366
9367 auto result = make_uniq<DuckIndexEntry>(catalog, schema, cast_info, info);
9368 result->initial_index_size = initial_index_size;
9369
9370 return std::move(result);
9371}
unique_ptr< CreateInfo > GetInfo() const override
Returns the CreateIndexInfo.
Definition duckdb.cpp:14435

◆ Rollback()

void duckdb::DuckIndexEntry::Rollback ( CatalogEntry prev_entry)
overridevirtual

Reimplemented from duckdb::CatalogEntry.

9340 {
9341 if (!info) {
9342 return;
9343 }
9344 if (!info->info) {
9345 return;
9346 }
9347 info->info->GetIndexes().RemoveIndex(name);
9348}

◆ GetSchemaName()

string duckdb::DuckIndexEntry::GetSchemaName ( ) const
overridevirtual

Implements duckdb::IndexCatalogEntry.

9373 {
9374 return GetDataTableInfo().GetSchemaName();
9375}

◆ GetTableName()

string duckdb::DuckIndexEntry::GetTableName ( ) const
overridevirtual

Implements duckdb::IndexCatalogEntry.

9377 {
9378 return GetDataTableInfo().GetTableName();
9379}

◆ GetDataTableInfo()

DataTableInfo & duckdb::DuckIndexEntry::GetDataTableInfo ( ) const
9381 {
9382 return *info->info;
9383}

◆ CommitDrop()

void duckdb::DuckIndexEntry::CommitDrop ( )

Drops in-memory index data and marks all blocks on disk as free blocks, allowing to reclaim them.

9385 {
9386 D_ASSERT(info);
9387 auto &indexes = GetDataTableInfo().GetIndexes();
9388 indexes.CommitDrop(name);
9389 indexes.RemoveIndex(name);
9390}
void CommitDrop(const string &name)
Removes all remaining memory of an index after dropping the catalog entry.
Here is the call graph for this function:

Member Data Documentation

◆ initial_index_size

idx_t duckdb::DuckIndexEntry::initial_index_size

We need the initial size of the index after the CREATE INDEX statement, as it is necessary to determine the auto checkpoint threshold


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