2024-09-18 16:52:08 -07:00
|
|
|
#ifndef ____mysql_h__
|
|
|
|
|
#define ____mysql_h__
|
2022-05-19 11:43:15 -07:00
|
|
|
|
|
|
|
|
#include "Tag.h"
|
|
|
|
|
#include "ZString.h"
|
|
|
|
|
#include "MString.h"
|
|
|
|
|
#include <sstream>
|
2024-09-18 16:52:08 -07:00
|
|
|
#include <mysql/mysql.h>
|
2022-05-19 11:43:15 -07:00
|
|
|
|
|
|
|
|
namespace jet {
|
|
|
|
|
|
|
|
|
|
class __mysql : public Tag {
|
|
|
|
|
|
|
|
|
|
public:
|
2024-11-27 09:47:17 -08:00
|
|
|
__mysql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local);
|
2024-09-18 16:52:08 -07:00
|
|
|
~__mysql();
|
2022-05-19 11:43:15 -07:00
|
|
|
|
2024-09-18 16:52:08 -07:00
|
|
|
void query(coreutils::MString query);
|
2024-09-26 10:29:33 -07:00
|
|
|
void nextRow();
|
|
|
|
|
bool hasRow();
|
2024-09-24 16:27:38 -07:00
|
|
|
coreutils::ZString getColumnValue(coreutils::ZString column);
|
2024-09-18 16:52:08 -07:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
MYSQL *mysql;
|
|
|
|
|
MYSQL_RES *result;
|
|
|
|
|
MYSQL_ROW row;
|
|
|
|
|
unsigned long *fieldLength;
|
|
|
|
|
unsigned int qFields;
|
|
|
|
|
coreutils::MString sessionId;
|
2024-09-24 16:27:38 -07:00
|
|
|
|
2024-11-27 15:37:58 -08:00
|
|
|
coreutils::MString nbrOfRows = "0";
|
|
|
|
|
coreutils::MString nbrOfColumns = "0";
|
2024-09-18 16:52:08 -07:00
|
|
|
|
2022-05-19 11:43:15 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|