matador::detail::basic_query Class Reference

Base class for all query implementations. More...

#include <basic_query.hpp>

Inherited by matador::query< T >.

Public Member Functions

 basic_query ()
 
void reset_query (t_query_command query_command)
 
std::string str (bool prepared)
 
std::string str (connection &conn, bool prepared)
 
const sql & stmt () const
 
std::string tablename () const
 

Detailed Description

Base class for all query implementations.

This class acts as a base class for all types of query implementations

Constructor & Destructor Documentation

◆ basic_query()

matador::detail::basic_query::basic_query ( )

Creates a basic query for the given table identified by table_name

Parameters
table_nameThe name of the table

Member Function Documentation

◆ reset_query()

void matador::detail::basic_query::reset_query ( t_query_command  query_command)

Resets the query.

Parameters
query_commandThe query command to reset to

◆ stmt()

const sql & matador::detail::basic_query::stmt ( ) const

Get the underlying sql object

Returns
The underlying sql

◆ str() [1/2]

std::string matador::detail::basic_query::str ( bool  prepared)

Get the query string build for internal connection as prepared or direct statement

Parameters
preparedIndicates wether the query should be interpreted as prepared or direct
Returns
The build query string

◆ str() [2/2]

std::string matador::detail::basic_query::str ( connection conn,
bool  prepared 
)

Get the query string build for the specific connection as prepared or direct statement

Parameters
connThe connection to build for
preparedIndicates wether the query should be interpreted as prepared or direct
Returns
The build query string

◆ tablename()

std::string matador::detail::basic_query::tablename ( ) const

Return the current tablename of the query

Returns
Current tablename of the query

The documentation for this class was generated from the following file:
  • matador/sql/basic_query.hpp