@Override public boolean visit(MySqlShowCreateTableStatement x) { print0(ucase ? "SHOW CREATE TABLE " : "show create table "); x.getName().accept(this); return false; }
public void accept0(MySqlASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, name); } visitor.endVisit(this); }
lexer.nextToken(); MySqlShowCreateTableStatement stmt = new MySqlShowCreateTableStatement(); stmt.setName(this.exprParser.name()); return stmt;
lexer.nextToken(); MySqlShowCreateTableStatement stmt = new MySqlShowCreateTableStatement(); stmt.setName(this.exprParser.name()); return stmt;
@Override public boolean visit(MySqlShowCreateTableStatement x) { String tableName = ((SQLName) x.getName()).getSimpleName(); WallContext context = WallContext.current(); if (context != null) { WallSqlTableStat tableStat = context.getTableStat(tableName); if (tableStat != null) { tableStat.incrementShowCount(); } } return false; }
public void accept0(MySqlASTVisitor visitor) { if (visitor.visit(this)) { acceptChild(visitor, name); } visitor.endVisit(this); }
SQLName table = showCreateTableStmt.getName(); SchemaObject schemaObject = findTable(table); if (schemaObject == null) {
@Override public boolean visit(MySqlShowCreateTableStatement x) { print0(ucase ? "SHOW CREATE TABLE " : "show create table "); x.getName().accept(this); return false; }
@Override public boolean visit(MySqlShowCreateTableStatement x) { String tableName = ((SQLName) x.getName()).getSimpleName(); WallContext context = WallContext.current(); if (context != null) { WallSqlTableStat tableStat = context.getTableStat(tableName); if (tableStat != null) { tableStat.incrementShowCount(); } } return false; }
SQLName table = showCreateTableStmt.getName(); SchemaObject schemaObject = findTable(table); if (schemaObject == null) {
public static void response(ServerConnection c, String stmt) { try { SQLStatement statement = RouteStrategyFactory.getRouteStrategy().parserSQL(stmt); MySqlShowCreateTableStatement showCreateTableStatement = (MySqlShowCreateTableStatement) statement; SchemaUtil.SchemaInfo schemaInfo = SchemaUtil.getSchemaInfo(c.getUser(), c.getSchema(), showCreateTableStatement.getName(), null); c.routeSystemInfoAndExecuteSQL(RouterUtil.removeSchema(stmt, schemaInfo.getSchema()), schemaInfo, ServerParse.SHOW); } catch (Exception e) { c.writeErrMessage(ErrorCode.ER_PARSE_ERROR, e.toString()); } } }
private QueryResult showCreateTable(MySqlShowCreateTableStatement stmt) { SimpleResultSet result = new SimpleResultSet(); result.addColumn("Table", Types.VARCHAR, 0, 0); result.addColumn("Create Table", Types.VARCHAR, 0, 0); result.addRow(new Object[]{SQLUtils.toMySqlString(stmt.getName())},""); return new QueryResult(LocalResult.read(target.getSession().getDbSession(), result, 0)); }