public boolean selectItemHasAllColumn(boolean recursive) { for (SQLSelectItem item : this.selectList) { SQLExpr expr = item.getExpr(); boolean allColumn = expr instanceof SQLAllColumnExpr || (expr instanceof SQLPropertyExpr && ((SQLPropertyExpr) expr).getName().equals("*")); if (allColumn) { if (recursive && from instanceof SQLSubqueryTableSource) { SQLSelect subSelect = ((SQLSubqueryTableSource) from).select; SQLSelectQueryBlock queryBlock = subSelect.getQueryBlock(); if (queryBlock != null) { return queryBlock.selectItemHasAllColumn(); } } return true; } } return false; }
private SQLSelectQueryBlock getSelect() { SQLSelect select = ast.getSelect(); if (select == null) { throw new SQLParsingException("should never happen!"); } SQLSelectQueryBlock selectQueryBlock = select.getQueryBlock(); if (selectQueryBlock == null) { throw new SQLParsingException("should never happen!"); } return selectQueryBlock; }
recognizer = new MySQLDeleteRecognizer(sql, ast); } else if (ast instanceof SQLSelectStatement) { if (((SQLSelectStatement)ast).getSelect().getQueryBlock().isForUpdate()) { recognizer = new MySQLSelectForUpdateRecognizer(sql, ast);
SQLSelectQueryBlock queryBlock = selectStmt.getSelect().getQueryBlock(); if (queryBlock != null) { String cachedSelectList = queryBlock.getCachedSelectList();
return false; } else if (tableSource instanceof SQLSubqueryTableSource) { SQLSelectQueryBlock queryBlock = ((SQLSubqueryTableSource) tableSource).getSelect().getQueryBlock(); if (queryBlock == null) { return false;
public boolean visit(SQLSelect x) { SQLSelectQueryBlock queryBlock = x.getQueryBlock(); if (queryBlock == null) { return super.visit(x);
public boolean selectItemHasAllColumn(boolean recursive) { for (SQLSelectItem item : this.selectList) { SQLExpr expr = item.getExpr(); boolean allColumn = expr instanceof SQLAllColumnExpr || (expr instanceof SQLPropertyExpr && ((SQLPropertyExpr) expr).getName().equals("*")); if (allColumn) { if (recursive && from instanceof SQLSubqueryTableSource) { SQLSelect subSelect = ((SQLSubqueryTableSource) from).select; SQLSelectQueryBlock queryBlock = subSelect.getQueryBlock(); if (queryBlock != null) { return queryBlock.selectItemHasAllColumn(); } } return true; } } return false; }
SQLSelectQueryBlock queryBlock = selectStmt.getSelect().getQueryBlock(); if (queryBlock != null) { String cachedSelectList = queryBlock.getCachedSelectList();
return false; } else if (tableSource instanceof SQLSubqueryTableSource) { SQLSelectQueryBlock queryBlock = ((SQLSubqueryTableSource) tableSource).getSelect().getQueryBlock(); if (queryBlock == null) { return false;
public boolean visit(SQLSelect x) { SQLSelectQueryBlock queryBlock = x.getQueryBlock(); if (queryBlock == null) { return super.visit(x);
private SQLSelectQueryBlock getSelect() { SQLSelect select = ast.getSelect(); if (select == null) { throw new SQLParsingException("should never happen!"); } SQLSelectQueryBlock selectQueryBlock = select.getQueryBlock(); if (selectQueryBlock == null) { throw new SQLParsingException("should never happen!"); } return selectQueryBlock; }
recognizer = new MySQLDeleteRecognizer(sql, ast); } else if (ast instanceof SQLSelectStatement) { if (((SQLSelectStatement)ast).getSelect().getQueryBlock().isForUpdate()) { recognizer = new MySQLSelectForUpdateRecognizer(sql, ast);