public class SelectHeuristics extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
UNNAMED_TABLE |
| Constructor and Description |
|---|
SelectHeuristics() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addFieldsToSelect(String select)
The constraints in the WHERE clause might reference
fields that are not retrieved in the SELECT.
|
static double |
computeDistance(String select,
QueryResult data) |
static Map<String,Set<String>> |
getReadDataFields(String select) |
static Map<String,String> |
getTableAliases(net.sf.jsqlparser.statement.select.Select select)
Workaround to JDBC limitations: it does not provide any API to
query meta-data on table aliases!!! ad-hoc solutions for each
possible imaginable DB are not scalable.
|
static String |
removeConstraints(String select) |
static String |
removeOperations(String select)
For example, when we have "select count(*)" we are not interested
in the count, but the actual involved fields, so we want to
transform it into "select *" by removing the count() operation.
|
public static final String UNNAMED_TABLE
public static String addFieldsToSelect(String select)
select - the string containing the SQL SELECT commandpublic static String removeOperations(String select)
select - public static double computeDistance(String select, QueryResult data)
public static Map<String,String> getTableAliases(net.sf.jsqlparser.statement.select.Select select)
select - the string containing the SQL SELECT commandCopyright © 2016–2018. All rights reserved.