tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountArrayTupleSource(updateCount);
tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountArrayTupleSource(updateCount);
tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountArrayTupleSource(updateCount);
tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
private void checkForUpdates(AtomicResultsMessage results, Command command, EventDistributor distributor, int commandIndex, long ts) { if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) { return; } ProcedureContainer pc = (ProcedureContainer)command; GroupSymbol gs = pc.getGroup(); Integer zero = Integer.valueOf(0); if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) { return; } Object metadataId = gs.getMetadataID(); if (metadataId == null) { return; } if (!(metadataId instanceof Table)) { if (metadataId instanceof TempMetadataID) { TempMetadataID tid = (TempMetadataID)metadataId; if (tid.getTableData().getModel() != null) { tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0)); } } return; } Table t = (Table)metadataId; t.setLastDataModification(ts); if (distributor != null) { distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName()); } }
tid.getTableData().dataModified(1); return result; tid.getTableData().dataModified(1); return result; } finally {
tid.getTableData().dataModified(1); return result; tid.getTableData().dataModified(1); return result; } finally {
private void checkForUpdates(AtomicResultsMessage results, Command command, EventDistributor distributor, int commandIndex, long ts) { if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) { return; } ProcedureContainer pc = (ProcedureContainer)command; GroupSymbol gs = pc.getGroup(); Integer zero = Integer.valueOf(0); if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) { return; } Object metadataId = gs.getMetadataID(); if (metadataId == null) { return; } if (!(metadataId instanceof Table)) { if (metadataId instanceof TempMetadataID) { TempMetadataID tid = (TempMetadataID)metadataId; if (tid.getTableData().getModel() != null) { tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0)); } } return; } Table t = (Table)metadataId; t.setLastDataModification(ts); if (distributor != null) { distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName()); } }
private void checkForUpdates(AtomicResultsMessage results, Command command, EventDistributor distributor, int commandIndex, long ts) { if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) { return; } ProcedureContainer pc = (ProcedureContainer)command; GroupSymbol gs = pc.getGroup(); Integer zero = Integer.valueOf(0); if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) { return; } Object metadataId = gs.getMetadataID(); if (metadataId == null) { return; } if (!(metadataId instanceof Table)) { if (metadataId instanceof TempMetadataID) { TempMetadataID tid = (TempMetadataID)metadataId; if (tid.getTableData().getModel() != null) { tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0)); } } return; } Table t = (Table)metadataId; t.setLastDataModification(ts); if (distributor != null) { distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName()); } }
tid.getTableData().dataModified(1); return result; tid.getTableData().dataModified(1); return result; } finally {
public TupleSource delete(Criteria crit) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { final TupleBrowser browser = createTupleBrower(crit, OrderBy.ASC); UpdateProcessor up = new UpdateProcessor(crit, browser, true) { @Override protected void tuplePassed(List tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { browser.removed(); deleteTuple(tuple); } @Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } }; long updateCount = up.process(); tid.setCardinality(tree.getRowCount()); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount)); }
public TupleSource delete(Criteria crit) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { final TupleBrowser browser = createTupleBrower(crit, OrderBy.ASC); UpdateProcessor up = new UpdateProcessor(crit, browser, true) { @Override protected void tuplePassed(List tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { browser.removed(); deleteTuple(tuple); } @Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } }; long updateCount = up.process(); tid.setCardinality(tree.getRowCount()); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount)); }
public TupleSource delete(Criteria crit) throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { final TupleBrowser browser = createTupleBrower(crit, OrderBy.ASC); UpdateProcessor up = new UpdateProcessor(crit, browser, true) { @Override protected void tuplePassed(List tuple) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { browser.removed(); deleteTuple(tuple); } @Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } }; long updateCount = up.process(); tid.setCardinality(tree.getRowCount()); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount)); }
public long truncate(boolean force) { this.tid.getTableData().dataModified(tree.getRowCount()); return tree.truncate(force); }
public long truncate(boolean force) { this.tid.getTableData().dataModified(tree.getRowCount()); return tree.truncate(force); }
public long truncate(boolean force) { this.tid.getTableData().dataModified(tree.getRowCount()); return tree.truncate(force); }