MatTableInfo info = globalStore.getMatTableInfo(matTableName); if (!info.isValid()) { return CollectionTupleSource.createUpdateCountTupleSource(-1);
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)); }
return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rows));
return CollectionTupleSource.createUpdateCountTupleSource(count);
@Test public void testUpdateCountSource() { CollectionTupleSource nts = CollectionTupleSource.createUpdateCountTupleSource(5); // Walk it and get no data List tuple = nts.nextTuple(); nts.closeSource(); assertEquals("Didn't get termination tuple for first tuple", Arrays.asList(5), tuple); //$NON-NLS-1$ }
return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rows));
return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rows));
return CollectionTupleSource.createUpdateCountTupleSource(count);
return CollectionTupleSource.createUpdateCountTupleSource(count);
long updateCount = up.process(); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
long updateCount = up.process(); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
long updateCount = up.process(); tid.getTableData().dataModified(updateCount); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, updateCount));
contextStore.addTempTable(tempTableName, create, bufferManager, true, context); return CollectionTupleSource.createUpdateCountTupleSource(0); return CollectionTupleSource.createUpdateCountTupleSource(0);
success = true; LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30014, tableName, rowCount)); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rowCount)); } catch (BlockedException e) { throw e;
success = true; LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30014, tableName, rowCount)); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rowCount)); } catch (BlockedException e) { throw e;
success = true; LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30014, tableName, rowCount)); return CollectionTupleSource.createUpdateCountTupleSource((int)Math.min(Integer.MAX_VALUE, rowCount)); } catch (BlockedException e) { throw e;
return CollectionTupleSource.createUpdateCountTupleSource(-1);
return CollectionTupleSource.createUpdateCountTupleSource(-1);