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

Adapter to convert schema::column to a ColumnRef This allows direct use of schema columns in query expressions. More...

#include <relx/query/schema_adapter.hpp>

Inheritance diagram for relx::query::SchemaColumnAdapter< C >:
relx::query::ColumnExpression relx::query::SqlExpression

Public Types

using value_type = typename C::value_type
 

Public Member Functions

 SchemaColumnAdapter (const C &col, std::string_view table_name="")
 
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
 
const C & column () const
 
- Public Member Functions inherited from relx::query::ColumnExpression
virtual ~ColumnExpression ()=default
 
- Public Member Functions inherited from relx::query::SqlExpression
virtual ~SqlExpression ()=default
 

Detailed Description

template<ColumnType C>
class relx::query::SchemaColumnAdapter< C >

Adapter to convert schema::column to a ColumnRef This allows direct use of schema columns in query expressions.

Definition at line 19 of file schema_adapter.hpp.

Member Typedef Documentation

◆ value_type

template<ColumnType C>
using relx::query::SchemaColumnAdapter< C >::value_type = typename C::value_type

Definition at line 21 of file schema_adapter.hpp.

Constructor & Destructor Documentation

◆ SchemaColumnAdapter()

template<ColumnType C>
relx::query::SchemaColumnAdapter< C >::SchemaColumnAdapter ( const C &  col,
std::string_view  table_name = "" 
)
inlineexplicit

Definition at line 24 of file schema_adapter.hpp.

Member Function Documentation

◆ bind_params()

template<ColumnType C>
std::vector< std::string > relx::query::SchemaColumnAdapter< C >::bind_params ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 29 of file schema_adapter.hpp.

◆ column()

template<ColumnType C>
const C & relx::query::SchemaColumnAdapter< C >::column ( ) const
inline

Definition at line 35 of file schema_adapter.hpp.

◆ column_name()

template<ColumnType C>
std::string relx::query::SchemaColumnAdapter< C >::column_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 31 of file schema_adapter.hpp.

◆ table_name()

template<ColumnType C>
std::string relx::query::SchemaColumnAdapter< C >::table_name ( ) const
inlineoverridevirtual

Implements relx::query::ColumnExpression.

Definition at line 33 of file schema_adapter.hpp.

◆ to_sql()

template<ColumnType C>
std::string relx::query::SchemaColumnAdapter< C >::to_sql ( ) const
inlineoverridevirtual

Implements relx::query::SqlExpression.

Definition at line 27 of file schema_adapter.hpp.


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