use of com.actiontech.dble.backend.mysql.nio.handler.ShowTablesHandler in project dble by actiontech.
the class ShowTables method parserAndExecuteShowTables.
private static void parserAndExecuteShowTables(ServerConnection c, String originSql, String node, ShowCreateStmtInfo info) throws Exception {
RouteResultset rrs = new RouteResultset(originSql, ServerParse.SHOW);
if (info.getSchema() != null) {
StringBuilder sql = new StringBuilder();
sql.append("SHOW ");
if (info.isFull()) {
sql.append("FULL ");
}
sql.append("TABLES ");
if (info.getCond() != null) {
sql.append(info.getCond());
}
rrs.setStatement(sql.toString());
}
RouterUtil.routeToSingleNode(rrs, node);
ShowTablesHandler showTablesHandler = new ShowTablesHandler(rrs, c.getSession2(), info);
showTablesHandler.execute();
}
Aggregations