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

#include "/cvmfs/nova.opensciencegrid.org/externals/cetlib/v3_06_01/source/cetlib/sqlite/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_
 
sqlite3 * db_
 

Detailed Description

Definition at line 90 of file select.h.

Constructor & Destructor Documentation

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

Definition at line 91 of file select.h.

References db_.

92  : ddl_{std::move(ddl)}, db_{db}
93  {}
std::string ddl_
Definition: select.h:94

Member Function Documentation

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

Definition at line 115 of file select.h.

References num, and art::to_string().

116  {
117  ddl_ += " limit ";
118  ddl_ += std::to_string(num);
119  return SelectStmt{std::move(ddl_), db_};
120  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:91
std::string ddl_
Definition: select.h:94
int num
Definition: f2_nu.C:119
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
auto cet::sqlite::SelectStmt::order_by ( std::string const &  column,
std::string const &  clause = {} 
)
inline

Definition at line 106 of file select.h.

106  {}) &&
107  {
108  ddl_ += " order by ";
109  ddl_ += column;
110  ddl_ += " " + clause;
111  return SelectStmt{std::move(ddl_), db_};
112  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:91
std::string ddl_
Definition: select.h:94
auto cet::sqlite::SelectStmt::where ( std::string const &  cond)
inline

Definition at line 98 of file select.h.

99  {
100  ddl_ += " where ";
101  ddl_ += cond;
102  return SelectStmt{std::move(ddl_), db_};
103  }
SelectStmt(std::string &&ddl, sqlite3 *const db)
Definition: select.h:91
std::string ddl_
Definition: select.h:94

Member Data Documentation

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

Definition at line 95 of file select.h.

Referenced by cet::sqlite::create_table_as(), cet::sqlite::operator<<(), and SelectStmt().

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

Definition at line 94 of file select.h.

Referenced by cet::sqlite::detail::create_table_as_ddl(), and cet::sqlite::operator<<().


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