public class SqlHandler extends Object
| Constructor and Description |
|---|
SqlHandler(TaintHandler taintHandler) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Set<String>> |
extractColumnsInvolvedInWhere(net.sf.jsqlparser.statement.Statement statement)
Check the fields involved in the WHERE clause (if any).
|
SqlExecutionsDto |
getExecutionDto() |
List<SqlCommandWithDistance> |
getSqlDistances(List<InsertionDto> successfulInitSqlInsertions,
boolean queryFromDatabase)
compute (SELECT, DELETE and UPDATE) sql distance for sql commands which exists in [buffer]
Note that we skip `SELECT 1` (typically for testing sql connection) since its distance is 0
|
void |
handle(SqlExecutionLogDto sqlExecutionLogDto)
handle executed sql info
|
boolean |
isAdvancedHeuristics() |
boolean |
isCalculateHeuristics() |
boolean |
isExtractSqlExecution() |
void |
reset() |
void |
setAdvancedHeuristics(boolean advancedHeuristics) |
void |
setCalculateHeuristics(boolean calculateHeuristics) |
void |
setConnection(Connection connection) |
void |
setExtractSqlExecution(boolean extractSqlExecution) |
void |
setSchema(DbSchemaDto schema) |
public SqlHandler(TaintHandler taintHandler)
public void reset()
public void setConnection(Connection connection)
public void setSchema(DbSchemaDto schema)
public void handle(SqlExecutionLogDto sqlExecutionLogDto)
sqlExecutionLogDto - to be handledpublic SqlExecutionsDto getExecutionDto()
public List<SqlCommandWithDistance> getSqlDistances(List<InsertionDto> successfulInitSqlInsertions, boolean queryFromDatabase)
public Map<String,Set<String>> extractColumnsInvolvedInWhere(net.sf.jsqlparser.statement.Statement statement)
public boolean isCalculateHeuristics()
public boolean isExtractSqlExecution()
public void setCalculateHeuristics(boolean calculateHeuristics)
public void setExtractSqlExecution(boolean extractSqlExecution)
public boolean isAdvancedHeuristics()
public void setAdvancedHeuristics(boolean advancedHeuristics)
Copyright © 2016–2024. All rights reserved.