mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
191 lines
3.8 KiB
C++
191 lines
3.8 KiB
C++
#include "query_builder.h"
|
|
|
|
#include "query_result.h"
|
|
|
|
QueryBuilder *QueryBuilder::select() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::udpate() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::where() {
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::from() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::insert() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::values() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::cvalues() {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::select(const std::string ¶ms) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::udpate(const std::string ¶ms) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::where(const std::string ¶ms) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::from(const std::string ¶ms) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::insert(const std::string &table_name) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::insert(const std::string &table_name, const std::string &columns) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::values(const std::string ¶ms_str) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::val() {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::val(const std::string ¶m) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::val(const char *param) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::val(const int param) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::val(const bool param) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::set() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::cset() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::setp(const std::string &col, const std::string ¶m) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::setp(const std::string &col, const char *param) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::setp(const std::string &col, const int param) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::setp(const std::string &col, const bool param) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::eselect(const std::string ¶ms) {
|
|
select(escape(params));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::eudpate(const std::string ¶ms) {
|
|
udpate(escape(params));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::ewhere(const std::string ¶ms) {
|
|
where(escape(params));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::efrom(const std::string ¶ms) {
|
|
from(escape(params));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::einsert(const std::string &table_name) {
|
|
insert(escape(table_name));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::evalues(const std::string ¶ms_str) {
|
|
values(escape(params_str));
|
|
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::eval(const std::string ¶m) {
|
|
val(escape(param));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::esetp(const std::string &col, const std::string &escaped_param) {
|
|
setp(col, escape(escaped_param));
|
|
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::limit(const int num) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::offset(const int num) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::w(const std::string &str) {
|
|
query_result += str + " ";
|
|
}
|
|
QueryBuilder *QueryBuilder::ew(const std::string &str) {
|
|
return w(escape(str));
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::select_last_insert_id() {
|
|
return this;
|
|
}
|
|
|
|
std::string QueryBuilder::escape(const std::string ¶ms) {
|
|
return params;
|
|
}
|
|
|
|
QueryBuilder *QueryBuilder::prepare() {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::set_param(const int index, const std::string &value) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::set_param(const int index, const int value) {
|
|
return this;
|
|
}
|
|
QueryBuilder *QueryBuilder::set_param(const int index, const float value) {
|
|
return this;
|
|
}
|
|
|
|
void QueryBuilder::end_command() {
|
|
}
|
|
|
|
QueryResult *QueryBuilder::run() {
|
|
return nullptr;
|
|
}
|
|
|
|
void QueryBuilder::run_query() {
|
|
}
|
|
|
|
std::string QueryBuilder::get_result() {
|
|
end_command();
|
|
|
|
return query_result;
|
|
}
|
|
|
|
void QueryBuilder::print() {
|
|
printf("%s\n", query_result.c_str());
|
|
}
|
|
|
|
QueryBuilder::QueryBuilder() {
|
|
}
|
|
|
|
QueryBuilder::~QueryBuilder() {
|
|
} |