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() |
boolean |
hasRows() |
boolean |
isLocalSubquery() |
UpdateMode |
mode() |
UpdateResult |
processFast(Object[] args)
Process fast DML operation if possible.
|
IgniteBiTuple<?,?> |
processRow(List<?> row)
Convert a row into key-value pair.
|
T3<Object,Object,Object> |
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, @Nullable FastUpdate fastUpdate, @Nullable 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, @Nullable FastUpdate fastUpdate, @Nullable DmlDistributedPlanInfo distributed)
mode - Mode.tbl - Table.selectQry - Select query.fastUpdate - Fast update arguments (if any).distributed - Distributed plan (if any)public IgniteBiTuple<?,?> processRow(List<?> row) throws IgniteCheckedException
row - Row to process.IgniteCheckedException - if failed.public T3<Object,Object,Object> processRowForUpdate(List<?> row) throws IgniteCheckedException
row - Row to process.IgniteCheckedException - if failed.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 UpdateMode mode()
public GridCacheContext cacheContext()
@Nullable public DmlDistributedPlanInfo distributedPlan()
public int rowCount()
public String selectQuery()
public boolean isLocalSubquery()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018