forked from terrywh/yafa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
database_mysql.h
47 lines (39 loc) · 1.73 KB
/
database_mysql.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* File: database_mysql.h
* Author: wuhao
*
* Created on 2015年11月19日, 上午10:41
*/
#ifndef DATABASE_MYSQL_H
#define DATABASE_MYSQL_H
class database_mysql:public php::class_base {
private:
static std::string MASTER;
static std::string SLAVE;
std::string last_query;
public:
static std::string class_name;
static zend_class_entry* class_entry;
static php::value init(const php::parameter& param);
static php::value get_master(const php::parameter& param);
static php::value get_slave(const php::parameter& param);
database_mysql();
void __construct(const php::parameter& param) override;
~database_mysql();
php::value format(const php::parameter& param);
php::value format_query(const php::parameter& param);
php::value insert(const php::parameter& param);
void insert_keys(php::value& _mysqli, std::string& sql, const php::value& item);
void insert_vals(php::value& _mysqli, std::string& sql, const php::value& item);
php::value remove(const php::parameter& param);
php::value update(const php::parameter& param);
php::value select(const php::parameter& param);
php::value one(const php::parameter& param);
php::value __call(const std::string& name, const php::parameter& param) override;
bool __isset(const std::string& name) override;
php::value __get(const std::string& name) override;
private:
static php::value create(php::value& config);
static void build_order(std::string& sql, php::value& order);
};
#endif /* DATABASE_MYSQL_H */