mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
|
#ifndef SQLITE3_QUERY_BUILDER_H
|
||
|
#define SQLITE3_QUERY_BUILDER_H
|
||
|
|
||
|
#include <memory>
|
||
|
#include <string>
|
||
|
|
||
|
#include "core/database/query_builder.h"
|
||
|
|
||
|
class SQLite3Database;
|
||
|
|
||
|
class SQLite3QueryBuilder : public QueryBuilder {
|
||
|
public:
|
||
|
QueryBuilder *select();
|
||
|
QueryBuilder *where();
|
||
|
QueryBuilder *from();
|
||
|
QueryBuilder *insert();
|
||
|
QueryBuilder *values();
|
||
|
QueryBuilder *cvalues();
|
||
|
|
||
|
QueryBuilder *select(const std::string ¶ms);
|
||
|
QueryBuilder *where(const std::string ¶ms);
|
||
|
QueryBuilder *from(const std::string ¶ms);
|
||
|
QueryBuilder *insert(const std::string &table_name);
|
||
|
QueryBuilder *values(const std::string ¶ms_str);
|
||
|
|
||
|
QueryBuilder *limit(const int num);
|
||
|
QueryBuilder *offset(const int num);
|
||
|
|
||
|
std::string escape(const std::string ¶ms);
|
||
|
|
||
|
QueryBuilder *prepare();
|
||
|
QueryBuilder *set_param(const int index, const std::string &value);
|
||
|
QueryBuilder *set_param(const int index, const int value);
|
||
|
QueryBuilder *set_param(const int index, const float value);
|
||
|
|
||
|
void end_command();
|
||
|
|
||
|
QueryResult *run();
|
||
|
void run_query();
|
||
|
|
||
|
SQLite3QueryBuilder();
|
||
|
~SQLite3QueryBuilder();
|
||
|
|
||
|
SQLite3Database *_db;
|
||
|
};
|
||
|
|
||
|
#endif
|