You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AQuery/server/mariadb_conn.h

24 lines
628 B

#ifdef _WIN32
#include <mysql.h>
#else
#include <mariadb/mysql.h>
#endif
struct Context;
struct MariadbServer{
2 years ago
MYSQL *server = nullptr;
Context *cxt = nullptr;
bool status = false;
bool has_error = false;
2 years ago
char* query = nullptr;
int type = 0;
void connect(Context* cxt, const char* host = "bill.local",
const char* user = "root", const char* passwd = "0508",
const char* db_name = "db", const unsigned int port = 3306,
2 years ago
const char* unix_socket = nullptr, const unsigned long client_flag = 0
);
void exec(const char* q);
void close();
~MariadbServer();
};