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

Represents an index on a table. More...

#include <relx/schema/index.hpp>

Public Member Functions

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

Detailed Description

template<auto ColumnPtr>
class relx::schema::index< ColumnPtr >

Represents an index on a table.

Template Parameters
ColumnPtrPointer to the column member

Definition at line 39 of file index.hpp.

Constructor & Destructor Documentation

◆ index() [1/2]

template<auto ColumnPtr>
relx::schema::index< ColumnPtr >::index ( )
inline

Default constructor - creates a normal index.

Definition at line 42 of file index.hpp.

◆ index() [2/2]

template<auto ColumnPtr>
relx::schema::index< ColumnPtr >::index ( index_type  type)
inlineexplicit

Constructor with specific index type.

Parameters
typeThe type of index to create

Definition at line 46 of file index.hpp.

Member Function Documentation

◆ create_index_sql()

template<auto ColumnPtr>
std::string relx::schema::index< ColumnPtr >::create_index_sql ( ) const
inline

Get SQL statement for creating the index.

Returns
SQL CREATE INDEX statement

Definition at line 50 of file index.hpp.


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