Public Member Functions | Public Attributes | List of all members
cet::sqlite::SelectStmt Struct Reference

#include <select.h>

Public Member Functions

 SelectStmt (std::string &&ddl, sqlite3 *const db)
 
auto where (std::string const &cond)&&
 
auto order_by (std::string const &column, std::string const &clause={})&&
 
auto limit (int const num)&&
 

Public Attributes

std::string ddl_
 
sqlite3db_
 

Detailed Description

Definition at line 89 of file select.h.

Constructor & Destructor Documentation

cet::sqlite::SelectStmt::SelectStmt ( std::string &&  ddl,
sqlite3 *const  db 
)
inline

Definition at line 90 of file select.h.

91  : ddl_{std::move(ddl)}, db_{db}
92  {}
std::string ddl_
Definition: select.h:93
def move(depos, offset)
Definition: depos.py:107

Member Function Documentation

auto cet::sqlite::SelectStmt::limit ( int const  num)
inline

Definition at line 114 of file select.h.

115  {
116  ddl_ += " limit ";
117  ddl_ += std::to_string(num);
118  return SelectStmt{std::move(ddl_), db_};
119  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:90
std::string ddl_
Definition: select.h:93
def move(depos, offset)
Definition: depos.py:107
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
auto cet::sqlite::SelectStmt::order_by ( std::string const &  column,
std::string const &  clause = {} 
)
inline

Definition at line 105 of file select.h.

105  {}) &&
106  {
107  ddl_ += " order by ";
108  ddl_ += column;
109  ddl_ += " " + clause;
110  return SelectStmt{std::move(ddl_), db_};
111  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:90
std::string ddl_
Definition: select.h:93
def move(depos, offset)
Definition: depos.py:107
std::vector< std::string > column
auto cet::sqlite::SelectStmt::where ( std::string const &  cond)
inline

Definition at line 97 of file select.h.

98  {
99  ddl_ += " where ";
100  ddl_ += cond;
101  return SelectStmt{std::move(ddl_), db_};
102  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:90
std::string ddl_
Definition: select.h:93
def move(depos, offset)
Definition: depos.py:107

Member Data Documentation

sqlite3* cet::sqlite::SelectStmt::db_

Definition at line 94 of file select.h.

std::string cet::sqlite::SelectStmt::ddl_

Definition at line 93 of file select.h.


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