relx 0.1.0
A Modern C++23 Type-Safe SQL Query Builder
Loading...
Searching...
No Matches
relx::query::CaseExpr Class Reference

#include <relx/query/function.hpp>

Inheritance diagram for relx::query::CaseExpr:
relx::query::ColumnExpression relx::query::SqlExpression

Public Types

using WhenThenPair = std::pair< std::unique_ptr< SqlExpression >, std::unique_ptr< SqlExpression > >
 

Public Member Functions

 CaseExpr (std::vector< WhenThenPair > &&when_thens, std::unique_ptr< SqlExpression > else_expr)
 
 CaseExpr (CaseExpr &&)=default
 
CaseExproperator= (CaseExpr &&)=default
 
 CaseExpr (const CaseExpr &)=delete
 
CaseExproperator= (const CaseExpr &)=delete
 
std::string to_sql () const override
 
std::vector< std::string > bind_params () const override
 
std::string column_name () const override
 
std::string table_name () const override
 
- Public Member Functions inherited from relx::query::ColumnExpression
virtual ~ColumnExpression ()=default
 
virtual std::string qualified_name () const
 
- Public Member Functions inherited from relx::query::SqlExpression
virtual ~SqlExpression ()=default
 

Detailed Description

Definition at line 450 of file function.hpp.

Member Typedef Documentation

◆ WhenThenPair

using relx::query::CaseExpr::WhenThenPair = std::pair<std::unique_ptr<SqlExpression>, std::unique_ptr<SqlExpression> >

Definition at line 452 of file function.hpp.

Constructor & Destructor Documentation

◆ CaseExpr() [1/3]

relx::query::CaseExpr::CaseExpr ( std::vector< WhenThenPair > &&  when_thens,
std::unique_ptr< SqlExpression else_expr 
)
inlineexplicit

Definition at line 454 of file function.hpp.

◆ CaseExpr() [2/3]

relx::query::CaseExpr::CaseExpr ( CaseExpr &&  )
default

◆ CaseExpr() [3/3]

relx::query::CaseExpr::CaseExpr ( const CaseExpr )
delete

Member Function Documentation

◆ bind_params()

std::vector< std::string > relx::query::CaseExpr::bind_params ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 487 of file function.hpp.

◆ column_name()

std::string relx::query::CaseExpr::column_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 510 of file function.hpp.

◆ operator=() [1/2]

CaseExpr & relx::query::CaseExpr::operator= ( CaseExpr &&  )
default

◆ operator=() [2/2]

CaseExpr & relx::query::CaseExpr::operator= ( const CaseExpr )
delete

◆ table_name()

std::string relx::query::CaseExpr::table_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 512 of file function.hpp.

◆ to_sql()

std::string relx::query::CaseExpr::to_sql ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 466 of file function.hpp.


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