relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::schema::composite_index< ColumnPtrs > Class Template Reference

Represents a composite index on multiple columns. More...

#include <relx/schema/index.hpp>

Public Member Functions

 composite_index ()
 Default constructor - creates a normal index.
 
 composite_index (index_type type)
 Constructor with specific index type.
 
std::string create_index_sql () const
 Get SQL statement for creating the composite index.
 

Detailed Description

template<auto... ColumnPtrs>
class relx::schema::composite_index< ColumnPtrs >

Represents a composite index on multiple columns.

Template Parameters
ColumnPtrsPointers to the columns that form the index

Definition at line 76 of file index.hpp.

Constructor & Destructor Documentation

◆ composite_index() [1/2]

template<auto... ColumnPtrs>
relx::schema::composite_index< ColumnPtrs >::composite_index ( )
inline

Default constructor - creates a normal index.

Definition at line 79 of file index.hpp.

◆ composite_index() [2/2]

template<auto... ColumnPtrs>
relx::schema::composite_index< ColumnPtrs >::composite_index ( index_type  type)
inlineexplicit

Constructor with specific index type.

Parameters
typeThe type of index to create

Definition at line 83 of file index.hpp.

Member Function Documentation

◆ create_index_sql()

template<auto... ColumnPtrs>
std::string relx::schema::composite_index< ColumnPtrs >::create_index_sql ( ) const
inline

Get SQL statement for creating the composite index.

Returns
SQL CREATE INDEX statement

Definition at line 87 of file index.hpp.


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