Work on mysql and sql.
This commit is contained in:
1 parent
2e715a4d08
commit
387203f4b3
7 files changed
+42
-16
No files matched your search
+12
@@ -23,9 +23,13 @@ namespace jet {
|
||||
}
|
||||
|
||||
void Global::addSession(coreutils::MString sessionId, __mysql *mysql) {
|
||||
std::cout << "sessionId: " << sessionId << std::endl;
|
||||
if(sessionExists(sessionId))
|
||||
coreutils::Exception("sessionid already exists.");
|
||||
sessions[sessionId] = mysql;
|
||||
|
||||
std::cout << "::count: " << sessions.size() << std::endl;
|
||||
std::cout << "::" << sessionId << std::endl;
|
||||
}
|
||||
|
||||
void Global::removeSession(coreutils::MString sessionId) {
|
||||
@@ -70,6 +74,14 @@ namespace jet {
|
||||
return name;
|
||||
}
|
||||
|
||||
__mysql * Global::getSession(coreutils::MString sessionId) {
|
||||
std::cout << "sessionId: " << sessionId << std::endl;
|
||||
std::cout << "count: " << sessions.size() << std::endl;
|
||||
if(sessions.find(sessionId) == sessions.end())
|
||||
throw coreutils::Exception("requested session is not available.");
|
||||
return sessions[sessionId];
|
||||
}
|
||||
|
||||
coreutils::ZString Global::getSessionVariable(coreutils::MString &splitName) {
|
||||
if(sessions.find(splitName[0]) == sessions.end())
|
||||
throw coreutils::Exception("requested session is not available in variable.");
|
||||
|
||||
Reference in new issue
Block a user