Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
warehouse_ros_sqlite::Query Class Reference

#include <query.h>

Inheritance diagram for warehouse_ros_sqlite::Query:
Inheritance graph
[legend]

Public Types

using Variant = boost::variant< std::string, double, int >
 
- Public Types inherited from warehouse_ros::Query
typedef boost::shared_ptr< const QueryConstPtr
 
typedef boost::shared_ptr< QueryPtr
 

Public Member Functions

void append (const std::string &name, const std::string &val) override
 
void append (const std::string &name, const double val) override
 
void append (const std::string &name, const int val) override
 
void append (const std::string &name, const bool val) override
 
void appendGT (const std::string &name, const double val) override
 
void appendGT (const std::string &name, const int val) override
 
void appendGTE (const std::string &name, const double val) override
 
void appendGTE (const std::string &name, const int val) override
 
void appendLT (const std::string &name, const double val) override
 
void appendLT (const std::string &name, const int val) override
 
void appendLTE (const std::string &name, const double val) override
 
void appendLTE (const std::string &name, const int val) override
 
void appendRange (const std::string &name, const double lower, const double upper) override
 
void appendRange (const std::string &name, const int lower, const int upper) override
 
void appendRangeInclusive (const std::string &name, const double lower, const double upper) override
 
void appendRangeInclusive (const std::string &name, const int lower, const int upper) override
 
bool empty () const
 
sqlite3_stmt_ptr prepare (sqlite3 *db_conn, const std::string &intro, const std::string &outro="", int bind_start_col=1) const
 
- Public Member Functions inherited from warehouse_ros::Query
void append (const std::string &name, const char *val)
 
virtual ~Query ()
 

Private Member Functions

template<typename T >
void doappend (const std::string &name, const char *op, T val)
 

Private Attributes

std::stringstream query_
 
std::vector< Variantvalues_
 

Detailed Description

Definition at line 41 of file query.h.

Member Typedef Documentation

◆ Variant

using warehouse_ros_sqlite::Query::Variant = boost::variant<std::string, double, int>

Definition at line 44 of file query.h.

Member Function Documentation

◆ append() [1/4]

void warehouse_ros_sqlite::Query::append ( const std::string &  name,
const std::string &  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 69 of file query.cpp.

◆ append() [2/4]

void warehouse_ros_sqlite::Query::append ( const std::string &  name,
const double  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 73 of file query.cpp.

◆ append() [3/4]

void warehouse_ros_sqlite::Query::append ( const std::string &  name,
const int  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 77 of file query.cpp.

◆ append() [4/4]

void warehouse_ros_sqlite::Query::append ( const std::string &  name,
const bool  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 81 of file query.cpp.

◆ appendGT() [1/2]

void warehouse_ros_sqlite::Query::appendGT ( const std::string &  name,
const double  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 101 of file query.cpp.

◆ appendGT() [2/2]

void warehouse_ros_sqlite::Query::appendGT ( const std::string &  name,
const int  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 105 of file query.cpp.

◆ appendGTE() [1/2]

void warehouse_ros_sqlite::Query::appendGTE ( const std::string &  name,
const double  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 109 of file query.cpp.

◆ appendGTE() [2/2]

void warehouse_ros_sqlite::Query::appendGTE ( const std::string &  name,
const int  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 113 of file query.cpp.

◆ appendLT() [1/2]

void warehouse_ros_sqlite::Query::appendLT ( const std::string &  name,
const double  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 85 of file query.cpp.

◆ appendLT() [2/2]

void warehouse_ros_sqlite::Query::appendLT ( const std::string &  name,
const int  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 89 of file query.cpp.

◆ appendLTE() [1/2]

void warehouse_ros_sqlite::Query::appendLTE ( const std::string &  name,
const double  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 93 of file query.cpp.

◆ appendLTE() [2/2]

void warehouse_ros_sqlite::Query::appendLTE ( const std::string &  name,
const int  val 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 97 of file query.cpp.

◆ appendRange() [1/2]

void warehouse_ros_sqlite::Query::appendRange ( const std::string &  name,
const double  lower,
const double  upper 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 117 of file query.cpp.

◆ appendRange() [2/2]

void warehouse_ros_sqlite::Query::appendRange ( const std::string &  name,
const int  lower,
const int  upper 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 122 of file query.cpp.

◆ appendRangeInclusive() [1/2]

void warehouse_ros_sqlite::Query::appendRangeInclusive ( const std::string &  name,
const double  lower,
const double  upper 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 127 of file query.cpp.

◆ appendRangeInclusive() [2/2]

void warehouse_ros_sqlite::Query::appendRangeInclusive ( const std::string &  name,
const int  lower,
const int  upper 
)
overridevirtual

Implements warehouse_ros::Query.

Definition at line 132 of file query.cpp.

◆ doappend()

template<typename T >
void warehouse_ros_sqlite::Query::doappend ( const std::string &  name,
const char *  op,
val 
)
inlineprivate

Definition at line 71 of file query.h.

◆ empty()

bool warehouse_ros_sqlite::Query::empty ( ) const
inline

Definition at line 64 of file query.h.

◆ prepare()

warehouse_ros_sqlite::sqlite3_stmt_ptr warehouse_ros_sqlite::Query::prepare ( sqlite3 *  db_conn,
const std::string &  intro,
const std::string &  outro = "",
int  bind_start_col = 1 
) const

Definition at line 39 of file query.cpp.

Member Data Documentation

◆ query_

std::stringstream warehouse_ros_sqlite::Query::query_
private

Definition at line 79 of file query.h.

◆ values_

std::vector<Variant> warehouse_ros_sqlite::Query::values_
private

Definition at line 78 of file query.h.


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


warehouse_ros_sqlite
Author(s): Bjarne von Horn
autogenerated on Fri Nov 11 2022 03:44:33