public final class UpdatePlan extends Object
| Constructor and Description |
|---|
UpdatePlan(UpdateMode mode,
GridH2Table tbl,
String[] colNames,
int[] colTypes,
KeyValueSupplier keySupplier,
KeyValueSupplier valSupplier,
int keyColIdx,
int valColIdx,
String selectQry,
boolean isLocSubqry,
List<List<DmlArgument>> rows,
int rowsNum,
FastUpdate fastUpdate,
DmlDistributedPlanInfo distributed)
Constructor.
|
UpdatePlan(UpdateMode mode,
GridH2Table tbl,
String selectQry,
FastUpdate fastUpdate,
DmlDistributedPlanInfo distributed)
Constructor for delete operation or fast update.
|
| Modifier and Type | Method and Description |
|---|---|
GridCacheContext |
cacheContext() |
List<List<List<?>>> |
createRows(List<Object[]> argss)
Extract rows from plan without performing any query.
|
List<List<?>> |
createRows(Object[] args)
Extract rows from plan without performing any query.
|
DmlDistributedPlanInfo |
distributedPlan() |
static EnlistOperation |
enlistOperation(UpdateMode updMode) |
boolean |
fastResult() |
IgniteBiTuple |
getFastRow(Object[] args) |
boolean |
hasRows() |
boolean |
isLocalSubquery() |
<any> |
iteratorForTransaction(IgniteH2Indexing idx,
<any> cur)
Create iterator for transaction.
|
UpdateMode |
mode() |
UpdateResult |
processFast(Object[] args)
Process fast DML operation if possible.
|
<any> |
processRow(List<?> row)
Convert a row into key-value pair.
|
Object |
processRowForTx(List<?> row) |
<any> |
processRowForUpdate(List<?> row)
Convert a row into value.
|
int |
rowCount() |
String |
selectQuery() |
public UpdatePlan(UpdateMode mode, GridH2Table tbl, String[] colNames, int[] colTypes, KeyValueSupplier keySupplier, KeyValueSupplier valSupplier, int keyColIdx, int valColIdx, String selectQry, boolean isLocSubqry, List<List<DmlArgument>> rows, int rowsNum, FastUpdate fastUpdate, DmlDistributedPlanInfo distributed)
mode - Mode.tbl - Table.colNames - Column names.colTypes - Column types.keySupplier - Key supplier.valSupplier - Value supplier.keyColIdx - Key column index.valColIdx - value column index.selectQry - Select query.isLocSubqry - Local subquery flag.rows - Rows for query-less INSERT or MERGE.rowsNum - Rows number.fastUpdate - Fast update (if any).distributed - Distributed plan (if any)public UpdatePlan(UpdateMode mode, GridH2Table tbl, String selectQry, FastUpdate fastUpdate, DmlDistributedPlanInfo distributed)
mode - Mode.tbl - Table.selectQry - Select query.fastUpdate - Fast update arguments (if any).distributed - Distributed plan (if any)public <any> processRow(List<?> row) throws IgniteCheckedException
row - Row to process.IgniteCheckedException - if failed.public <any> processRowForUpdate(List<?> row) throws IgniteCheckedException
row - Row to process.IgniteCheckedException - if failed.public boolean fastResult()
True if DML can be fast processed.public UpdateResult processFast(Object[] args) throws IgniteCheckedException
args - QUery arguments.null if fast update is not applicable for plan.IgniteCheckedException - If failed.public boolean hasRows()
True if predefined rows exist.public List<List<?>> createRows(Object[] args) throws IgniteCheckedException
args - Original query arguments.List of rows from the plan for a single query.
For example, if we have multiple args in a query: INSERT INTO person VALUES (k1, v1), (k2, v2), (k3, v3); List of List with items {[k1, v1], [k2, v2], [k3, v3]}.IgniteCheckedException - if failed.public List<List<List<?>>> createRows(List<Object[]> argss) throws IgniteCheckedException
argss - Batch of arguments.List of rows from the plan for each query.
For example, if we have a batch of queries with multiple args:
INSERT INTO person VALUES (k1, v1), (k2, v2), (k3, v3);
INSERT INTO person VALUES (k4, v4), (k5, v5), (k6, v6);
we will get a List of List of List with items:
{[k1, v1], [k2, v2], [k3, v3]},
{[k4, v4], [k5, v5], [k6, v6]}
IgniteCheckedException - If failed.public <any> iteratorForTransaction(IgniteH2Indexing idx, <any> cur)
idx - Indexing.cur - Cursor.public static EnlistOperation enlistOperation(UpdateMode updMode)
updMode - Update plan mode.public UpdateMode mode()
public GridCacheContext cacheContext()
public DmlDistributedPlanInfo distributedPlan()
public int rowCount()
public String selectQuery()
public boolean isLocalSubquery()
public IgniteBiTuple getFastRow(Object[] args) throws IgniteCheckedException
args - Query parameters.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2-p3 Release Date : April 25 2019