public class ParserUtils extends Object
| Constructor and Description |
|---|
ParserUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.sf.jsqlparser.statement.Statement |
asStatement(String statement) |
static boolean |
canParseSqlStatement(String statement) |
static net.sf.jsqlparser.expression.Expression |
getWhere(net.sf.jsqlparser.statement.Statement statement) |
static boolean |
isDelete(String sql) |
static boolean |
isInsert(String sql) |
static boolean |
isSelect(String sql)
We only use the selects that refer to objects in the database that are meaningful for testing purposes,
when code access to a sequence for example when getting the next id for a new object in the table,
then we don't want to use that select as a target.
|
static boolean |
isSelectOne(String sql)
check if the sql is `Select 1`
detected by proxyprint as
ERROR - FAILED TO COMPUTE HEURISTICS FOR SQL: SELECT 1
https://stackoverflow.com/questions/3668506/efficient-sql-test-query-or-validation-query-that-will-work-across-all-or-most
|
static boolean |
isUpdate(String sql) |
public static boolean isSelect(String sql)
sql - public static boolean isDelete(String sql)
public static boolean isUpdate(String sql)
public static boolean isInsert(String sql)
public static boolean isSelectOne(String sql)
public static net.sf.jsqlparser.expression.Expression getWhere(net.sf.jsqlparser.statement.Statement statement)
public static net.sf.jsqlparser.statement.Statement asStatement(String statement)
public static boolean canParseSqlStatement(String statement)
Copyright © 2016–2024. All rights reserved.