mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-27 14:17:37 +01:00
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
#ifndef MYSQL_QUERY_BUILDER_H
|
|
#define MYSQL_QUERY_BUILDER_H
|
|
|
|
#include <memory>
|
|
#include "core/string.h"
|
|
|
|
#include "database/query_builder.h"
|
|
|
|
class MysqlDatabase;
|
|
class MysqlQueryResult;
|
|
|
|
class MysqlQueryBuilder : public QueryBuilder {
|
|
RCPP_OBJECT(MysqlQueryBuilder, QueryBuilder);
|
|
|
|
public:
|
|
QueryBuilder *select();
|
|
QueryBuilder *where();
|
|
QueryBuilder *from();
|
|
QueryBuilder *insert();
|
|
QueryBuilder *values();
|
|
QueryBuilder *cvalues();
|
|
|
|
QueryBuilder *nselect(const String ¶ms);
|
|
QueryBuilder *nwhere(const String ¶ms);
|
|
QueryBuilder *nfrom(const String ¶ms);
|
|
QueryBuilder *ninsert(const String &table_name);
|
|
QueryBuilder *nvalues(const String ¶ms_str);
|
|
|
|
QueryBuilder *limit(const int num);
|
|
QueryBuilder *offset(const int num);
|
|
|
|
String escape(const String ¶ms);
|
|
|
|
QueryBuilder *prepare();
|
|
QueryBuilder *set_param(const int index, const String &value);
|
|
QueryBuilder *set_param(const int index, const int value);
|
|
QueryBuilder *set_param(const int index, const float value);
|
|
|
|
QueryBuilder *end_command();
|
|
|
|
Ref<QueryResult> run();
|
|
void run_query();
|
|
|
|
MysqlQueryBuilder();
|
|
~MysqlQueryBuilder();
|
|
|
|
MysqlDatabase *_db;
|
|
};
|
|
|
|
#endif |