public void updateOrInsertBy(String outputTableId, OutputStream.OutputEventType outputEventType, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, outputEventType, updateSetAttributes, onUpdateExpression); }
/** * Generates a QueryOutputConfig of type 'update or insert into' * @param updateOrInsertStream Siddhi UpdateOrInsertStream * @return QueryOutputConfig * @throws DesignGenerationException Error while generating QueryOutputConfig */ private QueryOutputConfig generateUpdateOrInsertIntoOutputConfig(UpdateOrInsertStream updateOrInsertStream) throws DesignGenerationException { List<SetAttributeConfig> setAttributeConfigList = null; if (updateOrInsertStream.getUpdateSet() != null) { setAttributeConfigList = generateSetAttributeConfigsList(updateOrInsertStream.getUpdateSet().getSetAttributeList()); } return new QueryOutputConfig( QueryOutputType.UPDATE_OR_INSERT_INTO.toString(), new UpdateInsertIntoOutputConfig( updateOrInsertStream.getOutputEventType().name(), setAttributeConfigList, ConfigBuildingUtilities.getDefinition( updateOrInsertStream.getOnUpdateExpression(), siddhiAppString)), updateOrInsertStream.getId()); }
/** * Method to set an updateOrInsertStream as the outputStream of the store query * @param outputTableId id of the table which is going to be queried * @param updateSetAttributes updateSet for the attributes which are going to be updated. * @param onUpdateExpression expression for the update or insert operation defined in the store query */ public void updateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, updateSetAttributes, onUpdateExpression); }
public void updateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, updateSetAttributes, onUpdateExpression); }
/** * Method to set an updateOrInsertStream as the outputStream of the store query * @param outputTableId id of the table which is going to be queried * @param updateSetAttributes updateSet for the attributes which are going to be updated. * @param onUpdateExpression expression for the update or insert operation defined in the store query */ public void updateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, updateSetAttributes, onUpdateExpression); }
public void updateOrInsertBy(String outputTableId, OutputStream.OutputEventType outputEventType, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, outputEventType, updateSetAttributes, onUpdateExpression); }
public void updateOrInsertBy(String outputTableId, UpdateSet updateSetAttributes, Expression onUpdateExpression) { this.outputStream = new UpdateOrInsertStream(outputTableId, updateSetAttributes, onUpdateExpression); }
outputStream = new UpdateOrInsertStream(source.streamId, (UpdateSet) visit(ctx.set_clause()), (Expression) visit(ctx.expression())); populateQueryContext(outputStream, ctx); } else { outputStream = new UpdateOrInsertStream(source.streamId, (Expression) visit(ctx.expression())); populateQueryContext(outputStream, ctx);
OutputStream outputStream = new UpdateOrInsertStream(source.streamId, (OutputStream.OutputEventType) visit(ctx.output_event_type()), (UpdateSet) visit(ctx.set_clause()), return outputStream; } else { OutputStream outputStream = new UpdateOrInsertStream(source.streamId, (OutputStream.OutputEventType) visit(ctx.output_event_type()), (Expression) visit(ctx.expression())); OutputStream outputStream = new UpdateOrInsertStream(source.streamId, (UpdateSet) visit(ctx.set_clause()), (Expression) visit(ctx.expression())); populateQueryContext(outputStream, ctx); return outputStream; } else { OutputStream outputStream = new UpdateOrInsertStream(source.streamId, (Expression) visit(ctx.expression())); populateQueryContext(outputStream, ctx);