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

An index catalog entry. More...

Inheritance diagram for duckdb::IndexCatalogEntry:
Collaboration diagram for duckdb::IndexCatalogEntry:

Public Member Functions

 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.
 
virtual string GetSchemaName () const =0
 
virtual string GetTableName () const =0
 
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 Rollback (CatalogEntry &prev_entry)
 
virtual void OnDrop ()
 
virtual unique_ptr< CatalogEntryCopy (ClientContext &context) const
 
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

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
 

Static Public Attributes

static constexpr const CatalogType Type = CatalogType::INDEX_ENTRY
 
static constexpr const charName = "index"
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::CatalogEntry
static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 

Detailed Description

An index catalog entry.

Constructor & Destructor Documentation

◆ IndexCatalogEntry()

duckdb::IndexCatalogEntry::IndexCatalogEntry ( Catalog catalog,
SchemaCatalogEntry schema,
CreateIndexInfo info 
)

Create an IndexCatalogEntry.

14420 : StandardEntry(CatalogType::INDEX_ENTRY, schema, catalog, info.index_name), sql(info.sql), options(info.options),
14421 index_type(info.index_type), index_constraint_type(info.constraint_type), column_ids(info.column_ids) {
14422 this->temporary = info.temporary;
14423 this->dependencies = info.dependencies;
14424 this->comment = info.comment;
14425 for (auto &expr : expressions) {
14426 D_ASSERT(expr);
14427 expressions.push_back(expr->Copy());
14428 }
14429 for (auto &parsed_expr : info.parsed_expressions) {
14430 D_ASSERT(parsed_expr);
14431 parsed_expressions.push_back(parsed_expr->Copy());
14432 }
14433}
Value comment
(optional) comment on this entry
Definition duckdb.hpp:6321
bool temporary
Whether or not the object is temporary and should not be added to the WAL.
Definition duckdb.hpp:6315
Catalog & catalog
The catalog the entry belongs to.
Definition duckdb.hpp:6387
string index_type
The index type (ART, B+-tree, Skip-List, ...)
Definition duckdb.cpp:294
vector< unique_ptr< ParsedExpression > > expressions
The set of expressions to index by.
Definition duckdb.cpp:300
string sql
The SQL of the CREATE INDEX statement.
Definition duckdb.cpp:289
case_insensitive_map_t< Value > options
Additional index options.
Definition duckdb.cpp:291
vector< column_t > column_ids
The column ids of the indexed table.
Definition duckdb.cpp:298
IndexConstraintType index_constraint_type
The index constraint type.
Definition duckdb.cpp:296
SchemaCatalogEntry & schema
The schema the entry belongs to.
Definition duckdb.hpp:28008
LogicalDependencyList dependencies
The dependencies of the entry, can be empty.
Definition duckdb.hpp:28010

Member Function Documentation

◆ GetInfo()

unique_ptr< CreateInfo > duckdb::IndexCatalogEntry::GetInfo ( ) const
overridevirtual

Returns the CreateIndexInfo.

Reimplemented from duckdb::CatalogEntry.

14435 {
14436 auto result = make_uniq<CreateIndexInfo>();
14437 result->schema = GetSchemaName();
14438 result->table = GetTableName();
14439
14440 result->temporary = temporary;
14441 result->sql = sql;
14442 result->index_name = name;
14443 result->index_type = index_type;
14444 result->constraint_type = index_constraint_type;
14445 result->column_ids = column_ids;
14446 result->dependencies = dependencies;
14447
14448 for (auto &expr : expressions) {
14449 result->expressions.push_back(expr->Copy());
14450 }
14451 for (auto &expr : parsed_expressions) {
14452 result->parsed_expressions.push_back(expr->Copy());
14453 }
14454
14455 result->comment = comment;
14456 result->tags = tags;
14457
14458 return std::move(result);
14459}
InsertionOrderPreservingMap< string > tags
(optional) extra data associated with this entry
Definition duckdb.hpp:6323
string name
The name of the entry.
Definition duckdb.hpp:6311
Here is the caller graph for this function:

◆ ToSQL()

string duckdb::IndexCatalogEntry::ToSQL ( ) const
overridevirtual

Returns the original CREATE INDEX SQL.

Reimplemented from duckdb::CatalogEntry.

14461 {
14462 auto info = GetInfo();
14463 return info->ToString();
14464}
unique_ptr< CreateInfo > GetInfo() const override
Returns the CreateIndexInfo.
Definition duckdb.cpp:14435
Here is the call graph for this function:

◆ IsUnique()

bool duckdb::IndexCatalogEntry::IsUnique ( ) const

Returns true, if this index is UNIQUE.

14466 {
14467 return (index_constraint_type == IndexConstraintType::UNIQUE ||
14468 index_constraint_type == IndexConstraintType::PRIMARY);
14469}

◆ IsPrimary()

bool duckdb::IndexCatalogEntry::IsPrimary ( ) const

Returns true, if this index is a PRIMARY KEY.

14471 {
14472 return (index_constraint_type == IndexConstraintType::PRIMARY);
14473}

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