public final class SqlFieldsQueryEx extends SqlFieldsQuery
SqlFieldsQuery with experimental and internal features.DFLT_PAGE_SIZE| Constructor and Description |
|---|
SqlFieldsQueryEx(String sql,
Boolean isQry) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatchedArgs(Object[] args)
Adds batched arguments.
|
List<Object[]> |
batchedArguments()
Returns batched arguments.
|
void |
clearBatchedArgs()
Clears batched arguments.
|
SqlFieldsQuery |
copy() |
NestedTxMode |
getNestedTxMode() |
boolean |
isAutoCommit() |
boolean |
isBatched()
Checks if query is batched.
|
Boolean |
isQuery() |
boolean |
isSkipReducerOnUpdate()
Gets server side update flag.
|
SqlFieldsQueryEx |
setArgs(Object... args)
Sets SQL arguments.
|
void |
setAutoCommit(boolean autoCommit) |
SqlFieldsQueryEx |
setCollocated(boolean collocated)
Sets flag defining if this query is collocated.
|
SqlFieldsQueryEx |
setDistributedJoins(boolean distributedJoins)
Specify if distributed joins are enabled for this query.
|
SqlFieldsQueryEx |
setEnforceJoinOrder(boolean enforceJoinOrder)
Sets flag to enforce join order of tables in the query.
|
SqlFieldsQueryEx |
setLocal(boolean loc)
Sets whether this query should be executed on local node only.
|
void |
setNestedTxMode(NestedTxMode nestedTxMode) |
SqlFieldsQueryEx |
setPageSize(int pageSize)
Sets optional page size, if
0, then default is used. |
SqlFieldsQuery |
setSkipReducerOnUpdate(boolean skipReducerOnUpdate)
Sets server side update flag.
|
SqlFieldsQueryEx |
setSql(String sql)
Sets SQL clause.
|
SqlFieldsQueryEx |
setTimeout(int timeout,
TimeUnit timeUnit)
Sets the query execution timeout.
|
getArgs, getPartitions, getSchema, getSql, getTimeout, getUpdateBatchSize, isCollocated, isDistributedJoins, isEnforceJoinOrder, isLazy, isReplicatedOnly, setLazy, setPartitions, setReplicatedOnly, setSchema, setUpdateBatchSize, toStringgetPageSize, isLocal, preparepublic Boolean isQuery()
public SqlFieldsQueryEx setSql(String sql)
setSql in class SqlFieldsQuerysql - SQL clause.this For chaining.public SqlFieldsQueryEx setArgs(Object... args)
setArgs in class SqlFieldsQueryargs - SQL arguments.this For chaining.public SqlFieldsQueryEx setTimeout(int timeout, TimeUnit timeUnit)
setTimeout in class SqlFieldsQuerytimeout - Timeout value. Zero value disables timeout.timeUnit - Time unit.this For chaining.public SqlFieldsQueryEx setCollocated(boolean collocated)
setCollocated in class SqlFieldsQuerycollocated - Flag value.this For chaining.public SqlFieldsQueryEx setEnforceJoinOrder(boolean enforceJoinOrder)
true
query optimizer will not reorder tables in join. By default is false.
It is not recommended to enable this property until you are sure that your indexes and the query itself are correct and tuned as much as possible but query optimizer still produces wrong join order.
setEnforceJoinOrder in class SqlFieldsQueryenforceJoinOrder - Flag value.this For chaining.public SqlFieldsQueryEx setDistributedJoins(boolean distributedJoins)
setDistributedJoins in class SqlFieldsQuerydistributedJoins - Distributed joins enabled.this For chaining.public SqlFieldsQueryEx setPageSize(int pageSize)
0, then default is used.setPageSize in class SqlFieldsQuerypageSize - Optional page size.this for chaining.public SqlFieldsQueryEx setLocal(boolean loc)
setLocal in class SqlFieldsQueryloc - Local flag.this for chaining.public SqlFieldsQuery setSkipReducerOnUpdate(boolean skipReducerOnUpdate)
By default, when processing DML command, Ignite first fetches all affected intermediate rows for analysis to the node which initiated the query and only then forms batches of updated values to be sent to remote nodes. For simple DML commands (that however affect great deal of rows) such approach may be an overkill in terms of network delays and memory usage on initiating node. Use this flag as hint for Ignite to do all intermediate rows analysis and updates in place on corresponding remote data nodes.
There are limitations to what DML command can be optimized this way. The command containing LIMIT, OFFSET, DISTINCT, ORDER BY, GROUP BY, sub-query or UNION will be processed the usual way despite this flag setting.
Defaults to false, meaning that intermediate results will be fetched to initiating node first.
Only affects DML commands. Ignored when Query.isLocal() is true.
Note that when set to true, the query may fail in the case of even single node failure.
skipReducerOnUpdate - Server side update flag.this For chaining.public boolean isSkipReducerOnUpdate()
See setSkipReducerOnUpdate(boolean) for more information.
public NestedTxMode getNestedTxMode()
public void setNestedTxMode(NestedTxMode nestedTxMode)
nestedTxMode - Nested transactions handling mode - behavior when the user attempts to open a transaction
in scope of another transaction.public boolean isAutoCommit()
public void setAutoCommit(boolean autoCommit)
autoCommit - Auto commit flag.public SqlFieldsQuery copy()
copy in class SqlFieldsQuerypublic void addBatchedArgs(Object[] args)
args - Batched arguments.public void clearBatchedArgs()
public List<Object[]> batchedArguments()
public boolean isBatched()
True if batched.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020