JetCore/__mysql.h

39 lines
792 B
C
Raw Permalink Normal View History

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:
__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);
void nextRow();
bool hasRow();
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;
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