mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
41 lines
846 B
C++
41 lines
846 B
C++
#include "mysql_query_builder.h"
|
|
|
|
|
|
QueryBuilder *MysqlQueryBuilder::select(const std::string ¶ms) {
|
|
query_result += "SELECT " + params;
|
|
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *MysqlQueryBuilder::where(const std::string ¶ms) {
|
|
query_result += " WHERE " + params;
|
|
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *MysqlQueryBuilder::from(const std::string ¶ms) {
|
|
query_result += " FROM " + params;
|
|
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *MysqlQueryBuilder::limit(const int min, const int max) {
|
|
return this;
|
|
}
|
|
|
|
QueryBuilder *MysqlQueryBuilder::insert(const std::string &table_name, const std::string ¶ms_str) {
|
|
query_result += " INSERT INTO " + table_name + " VALUES( " + params_str + " );";
|
|
|
|
return this;
|
|
}
|
|
|
|
void MysqlQueryBuilder::finalize() {
|
|
query_result += ";";
|
|
}
|
|
|
|
MysqlQueryBuilder::MysqlQueryBuilder() {
|
|
|
|
}
|
|
MysqlQueryBuilder::~MysqlQueryBuilder() {
|
|
|
|
} |