26 lines
770 B
C++
26 lines
770 B
C++
#include "__sql.h"
|
|
#include "Exception.h"
|
|
#include "MString.h"
|
|
#include "__mysql.h"
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <sys/types.h>
|
|
#include <sys/wait.h>
|
|
|
|
namespace jet {
|
|
|
|
__sql::__sql(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent) : Tag(in, parentOut, global, parent) {
|
|
output = false;
|
|
if(!hasContainer)
|
|
throw coreutils::Exception("sql tag must have a container.");
|
|
if(!global.sessionExists(variables["sessionid"]))
|
|
throw coreutils::Exception("sessionid does not exist.");
|
|
std::cout << "cont: " << container << std::endl;
|
|
processContainer(container);
|
|
std::cout << "out: " << out << std::endl;
|
|
global.getSession(variables["sessionid"])->query(out);
|
|
|
|
}
|
|
|
|
}
|