forked from xunkai55-ood/SQLeast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bb416b
commit 7e1b9b4
Showing
5 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "ql/query.h" | ||
#include "sm/systemmanager.h" | ||
#include "sm/dbmanager.h" | ||
|
||
namespace sqleast { | ||
|
||
namespace ql { | ||
|
||
void SingleStringQuery::execute() { | ||
if (type == Q_CREATE_DB) { | ||
sm::SystemManager::createDB(name); | ||
} else if (type == Q_DROP_DB) { | ||
sm::SystemManager::destroyDB(name); | ||
} else if (type == Q_USE_DB) { | ||
sm::SystemManager::useDB(name); | ||
} else if (type == Q_SHOW_TABLES) { | ||
dbManager.showTables(); | ||
} else if (type == Q_DESC_TABLE) { | ||
dbManager.descTable(name); | ||
} else if (type == Q_DROP_TABLE) { | ||
dbManager.dropTable(name); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters