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::Index Class Referenceabstract

The index is an abstract base class that serves as the basis for indexes. More...

#include <duckdb.hpp>

Inheritance diagram for duckdb::Index:
Collaboration diagram for duckdb::Index:

Public Member Functions

virtual bool IsBound () const =0
 Returns true if the index is a bound index, and false otherwise.
 
virtual const string & GetIndexType () const =0
 The index type (ART, B+-tree, Skip-List, ...)
 
virtual const string & GetIndexName () const =0
 The name of the index.
 
virtual IndexConstraintType GetConstraintType () const =0
 The index constraint type.
 
bool IsUnique () const
 Returns unique flag.
 
bool IsPrimary () const
 Returns primary key flag.
 
bool IsForeign () const
 Returns foreign key flag.
 
const vector< column_t > & GetColumnIds () const
 
const unordered_set< column_t > & GetColumnIdSet () const
 
virtual void CommitDrop ()=0
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Public Attributes

TableIOManagertable_io_manager
 Associated table io manager.
 
AttachedDatabasedb
 Attached database instance.
 

Protected Member Functions

 Index (const vector< column_t > &column_ids, TableIOManager &table_io_manager, AttachedDatabase &db)
 

Protected Attributes

vector< column_tcolumn_ids
 
unordered_set< column_tcolumn_id_set
 Unordered set of column_ids used by the Index.
 

Detailed Description

The index is an abstract base class that serves as the basis for indexes.

Member Function Documentation

◆ IsBound()

virtual bool duckdb::Index::IsBound ( ) const
pure virtual

Returns true if the index is a bound index, and false otherwise.

Implemented in duckdb::UnboundIndex, and duckdb::BoundIndex.

◆ GetIndexType()

virtual const string & duckdb::Index::GetIndexType ( ) const
pure virtual

The index type (ART, B+-tree, Skip-List, ...)

Implemented in duckdb::UnboundIndex, and duckdb::BoundIndex.

◆ GetIndexName()

virtual const string & duckdb::Index::GetIndexName ( ) const
pure virtual

The name of the index.

Implemented in duckdb::UnboundIndex, and duckdb::BoundIndex.

◆ GetConstraintType()

virtual IndexConstraintType duckdb::Index::GetConstraintType ( ) const
pure virtual

The index constraint type.

Implemented in duckdb::UnboundIndex, and duckdb::BoundIndex.

Here is the caller graph for this function:

◆ IsUnique()

bool duckdb::Index::IsUnique ( ) const
inline

Returns unique flag.

49704 {
49705 auto type = GetConstraintType();
49706 return type == IndexConstraintType::UNIQUE || type == IndexConstraintType::PRIMARY;
49707 }
virtual IndexConstraintType GetConstraintType() const =0
The index constraint type.
Here is the call graph for this function:

◆ IsPrimary()

bool duckdb::Index::IsPrimary ( ) const
inline

Returns primary key flag.

49710 {
49711 auto index_constraint_type = GetConstraintType();
49712 return (index_constraint_type == IndexConstraintType::PRIMARY);
49713 }
Here is the call graph for this function:

◆ IsForeign()

bool duckdb::Index::IsForeign ( ) const
inline

Returns foreign key flag.

49716 {
49717 auto index_constraint_type = GetConstraintType();
49718 return (index_constraint_type == IndexConstraintType::FOREIGN);
49719 }
Here is the call graph for this function:

◆ GetColumnIds()

const vector< column_t > & duckdb::Index::GetColumnIds ( ) const
inline
49721 {
49722 return column_ids;
49723 }
vector< column_t > column_ids
Definition duckdb.hpp:49678

◆ GetColumnIdSet()

const unordered_set< column_t > & duckdb::Index::GetColumnIdSet ( ) const
inline
49725 {
49726 return column_id_set;
49727 }
unordered_set< column_t > column_id_set
Unordered set of column_ids used by the Index.
Definition duckdb.hpp:49680

◆ CommitDrop()

virtual void duckdb::Index::CommitDrop ( )
pure virtual

Implemented in duckdb::BoundIndex.

◆ Cast() [1/2]

template<class TARGET >
TARGET & duckdb::Index::Cast ( )
inline
49734 {
49735 DynamicCastCheck<TARGET>(this);
49736 return reinterpret_cast<TARGET &>(*this);
49737 }

◆ Cast() [2/2]

template<class TARGET >
const TARGET & duckdb::Index::Cast ( ) const
inline
49740 {
49741 DynamicCastCheck<TARGET>(this);
49742 return reinterpret_cast<const TARGET &>(*this);
49743 }

Member Data Documentation

◆ column_ids

vector<column_t> duckdb::Index::column_ids
protected

The physical column ids of the indexed columns. For example, given a table with the following columns: (a INT, gen AS (2 * a), b INT, c VARCHAR), an index on columns (a,c) would have physical column_ids [0,2] (since the virtual column is skipped in the physical representation). Also see comments in bound_index.hpp to see how these column IDs are used in the context of bound/unbound expressions. Note that these are the columns for this Index, not all Indexes on the table.


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