Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::orm::Col Class Reference

A database column, allowing C++ operators to build parameterized SQL conditions. More...

#include <QueryBuilder.hpp>

Public Member Functions

 Col (std::string name)
 
template<typename T >
Expr operator== (const T &val) const
 
template<typename T >
Expr operator!= (const T &val) const
 
template<typename T >
Expr operator> (const T &val) const
 
template<typename T >
Expr operator< (const T &val) const
 
template<typename T >
Expr operator>= (const T &val) const
 
template<typename T >
Expr operator<= (const T &val) const
 

Private Member Functions

template<typename T >
Expr make (const char *op, const T &val) const
 

Private Attributes

std::string name_
 

Detailed Description

A database column, allowing C++ operators to build parameterized SQL conditions.

Values are always bound as parameters, never spliced into the SQL text.

Exceptions
std::invalid_argumentif the column name is not a plain identifier.

Constructor & Destructor Documentation

◆ Col()

orbit::orm::Col::Col ( std::string  name)
inlineexplicit

Member Function Documentation

◆ make()

template<typename T >
Expr orbit::orm::Col::make ( const char *  op,
const T &  val 
) const
inlineprivate

◆ operator!=()

template<typename T >
Expr orbit::orm::Col::operator!= ( const T &  val) const
inline

◆ operator<()

template<typename T >
Expr orbit::orm::Col::operator< ( const T &  val) const
inline

◆ operator<=()

template<typename T >
Expr orbit::orm::Col::operator<= ( const T &  val) const
inline

◆ operator==()

template<typename T >
Expr orbit::orm::Col::operator== ( const T &  val) const
inline

◆ operator>()

template<typename T >
Expr orbit::orm::Col::operator> ( const T &  val) const
inline

◆ operator>=()

template<typename T >
Expr orbit::orm::Col::operator>= ( const T &  val) const
inline

Member Data Documentation

◆ name_

std::string orbit::orm::Col::name_
private

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