public StreamDefinition attribute(String attributeName, Attribute.Type type) { checkAttribute(attributeName); this.attributeList.add(new Attribute(attributeName, type)); return this; }
public TableDefinition attribute(String attributeName, Attribute.Type type) { checkAttribute(attributeName); this.attributeList.add(new Attribute(attributeName, type)); return this; }
public StreamDefinition attribute(String attributeName, Attribute.Type type) { checkAttribute(attributeName); this.attributeList.add(new Attribute(attributeName, type)); return this; }
public TableDefinition attribute(String attributeName, Attribute.Type type) { checkAttribute(attributeName); this.attributeList.add(new Attribute(attributeName, type)); return this; }
@Override public void beginVisitStreamVariable(String id, String streamId, String attributeName, Attribute.Type type) { String name = this.generateStreamVarName(); this.placeholders.put(name, new Attribute(id, type)); conditionOperands.push(name); }
@Override public void beginVisitStreamVariable(String id, String streamId, String attributeName, Attribute.Type type) { String name = this.generateStreamVarName(); this.placeholders.put(name, new Attribute(id, type)); conditionOperands.push(name); }
@Override public void beginVisitStreamVariable(String id, String streamId, String attributeName, Attribute.Type type) { String name; if (nextProcessContainsPattern) { name = this.generatePatternStreamVarName(); nextProcessContainsPattern = false; } else { name = this.generateStreamVarName(); } this.placeholders.put(name, new Attribute(id, type)); condition.append("[").append(name).append("]").append(RDBMSTableConstants.WHITESPACE); }
@Override protected List<Attribute> init(AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) { this.executionPlanContext = executionPlanContext; if (attributeExpressionExecutors.length == 1) { if (attributeExpressionExecutors[0] instanceof VariableExpressionExecutor) { if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.STRING) { expressionExecutor = (VariableExpressionExecutor) attributeExpressionExecutors[0]; } else { throw new ExecutionPlanValidationException("Json Flat Map Event Duplicator stream Processor 1st " + "attribute should be String, but found " + attributeExpressionExecutors[0].getReturnType()); } } else { throw new ExecutionPlanValidationException("Event duplicate stream Processor 1st parameter " + "needs to be dynamic variable but found a constant attribute " + attributeExpressionExecutors[0].getClass().getCanonicalName()); } } else { throw new ExecutionPlanValidationException("Json Flat Map Event Duplicator stream Processor should only " + "have one parameter (<string> jsonString) but found " + attributeExpressionExecutors.length + " input attributes"); } List<Attribute> attributeList = new ArrayList<>(); attributeList.add(new Attribute("key", Attribute.Type.STRING)); attributeList.add(new Attribute("value", Attribute.Type.STRING)); return attributeList; }
public static Attribute convertToSiddhiAttribute(org.wso2.carbon.databridge.commons.Attribute attribute, String prefix) { Attribute.Type type; switch (attribute.getType()) { case LONG: type = Attribute.Type.LONG; break; case INT: type = Attribute.Type.INT; break; case FLOAT: type = Attribute.Type.FLOAT; break; case DOUBLE: type = Attribute.Type.DOUBLE; break; case BOOL: type = Attribute.Type.BOOL; break; default: type = Attribute.Type.STRING; break; } return new Attribute(prefix + attribute.getName(), type); }
"but found an attribute of type '" + splitAttributeDef[1] + "'."); return new Attribute(splitAttributeDef[0], attributeType); }).collect(Collectors.toList()); return this.attributeList;
return Collections.singletonList(new Attribute("numRecords", Attribute.Type.INT));
attributeList.add(new Attribute("role", Attribute.Type.STRING)); return attributeList;
attributeList.add(new Attribute("extremaType", Attribute.Type.STRING)); return attributeList;
attributeList.add(new Attribute("extremaType", Attribute.Type.STRING)); return attributeList;
attributes.add(new Attribute("jsonElement", Attribute.Type.OBJECT)); return attributes;
attributes.add(new Attribute("jsonElement", Attribute.Type.STRING)); return attributes;