public class GridSqlQueryParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GridSqlQueryParser.Getter<T,R>
Field getter.
|
static class |
GridSqlQueryParser.PreparedWithRemaining |
| Modifier and Type | Field and Description |
|---|---|
static String |
ORG_H2_COMMAND_COMMAND_LIST |
static String |
PARAM_DATA_REGION
Data region name.
|
static String |
PARAM_WRAP_VALUE |
static GridSqlQueryParser.Getter<TableView,Query> |
VIEW_QUERY |
| Constructor and Description |
|---|
GridSqlQueryParser(boolean useOptimizedSubqry) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Integer> |
cacheIds() |
static boolean |
checkMultipleStatements(PreparedStatement stmt) |
static GridH2Table |
dmlTable(Prepared stmt) |
GridCacheContext |
getFirstPartitionedCache()
Get first (i.e. random, as we need any one) partitioned cache from parsed query
to determine expected query parallelism.
|
static boolean |
isForUpdateQuery(Prepared p) |
boolean |
isLocalQuery()
Check if query may be run locally on all caches mentioned in the query.
|
static boolean |
isStreamableInsertStatement(PreparedStatement nativeStmt)
Check if passed statement is insert statement eligible for streaming.
|
Map<Object,Object> |
objectsMap() |
GridSqlStatement |
parse(Prepared stmt) |
static Prepared |
prepared(PreparedStatement stmt) |
static GridSqlQueryParser.PreparedWithRemaining |
preparedWithRemaining(PreparedStatement stmt) |
static Query |
query(Prepared qry) |
static String |
rewriteQueryForUpdateIfNeeded(Prepared p,
boolean inTx) |
public static final GridSqlQueryParser.Getter<TableView,Query> VIEW_QUERY
public static final String ORG_H2_COMMAND_COMMAND_LIST
public static final String PARAM_WRAP_VALUE
public static final String PARAM_DATA_REGION
public GridSqlQueryParser(boolean useOptimizedSubqry)
useOptimizedSubqry - If we have to find correct order for table filters in FROM clause.
Relies on uniqueness of table filter aliases.public static boolean checkMultipleStatements(PreparedStatement stmt)
stmt - Prepared statement to check.true in case of multiple statements.public static Prepared prepared(PreparedStatement stmt)
stmt - Prepared statement.public static GridSqlQueryParser.PreparedWithRemaining preparedWithRemaining(PreparedStatement stmt)
stmt - Prepared statement.public static boolean isForUpdateQuery(Prepared p)
p - Prepared.p is an SELECT FOR UPDATE query.public static String rewriteQueryForUpdateIfNeeded(Prepared p, boolean inTx)
p - Statement to rewrite, if needed.inTx - Whether there is an active transaction.key and val columns appended to the list of columns,
if it's an FOR UPDATE query, or null if nothing has to be done.public static Query query(Prepared qry)
qry - Prepared.public static GridH2Table dmlTable(Prepared stmt)
stmt - Prepared.public boolean isLocalQuery()
true if query may be run locally on all caches mentioned in the query, i.e. there's no need
to run distributed query.public GridCacheContext getFirstPartitionedCache()
null if it does not involve partitioned caches.public Collection<Integer> cacheIds()
public final GridSqlStatement parse(Prepared stmt)
stmt - Prepared statement.public static boolean isStreamableInsertStatement(PreparedStatement nativeStmt)
nativeStmt - Native statement.True if streamable insert.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2-p3 Release Date : April 25 2019