Result getResult(Session session) { switch (type) { case StatementTypes.SIGNAL: case StatementTypes.RESIGNAL: // todo case StatementTypes.ITERATE: case StatementTypes.LEAVE: case StatementTypes.RETURN: case StatementTypes.CONDITION: return this.getResultValue(session); case StatementTypes.ASSIGNMENT: { Object[] variables = variable.getType() == SchemaObject.PARAMETER ? session.sessionContext.routineArguments : session.sessionContext.routineVariables; try { Object o = expression.getValue(session, variable.getDataType()); variables[variableIndex] = o; return Result.updateZeroResult; } catch (HsqlException e) { return Result.newErrorResult(e); } } default: throw Error.runtimeError(ErrorCode.U_S0500, ""); } }
ExpressionColumn(ColumnSchema column) { super(OpTypes.COLUMN); this.column = column; this.dataType = column.getDataType(); columnName = column.getName().name; }
void setAttributesAsColumn(RangeVariable range, int i) { columnIndex = i; column = range.getColumn(i); dataType = column.getDataType(); rangeVariable = range; if (range.rangeType == RangeVariable.TABLE_RANGE) { rangeVariable.addColumn(columnIndex); } }
void setAutoAttributesAsColumn(RangeVariable range, int i) { columnIndex = i; column = range.getColumn(i); dataType = column.getDataType(); columnName = range.getColumnAlias(i).name; tableName = range.getTableAlias().name; rangeVariable = range; rangeVariable.addColumn(columnIndex); }
void setAttributesAsColumn(ColumnSchema column, boolean isWritable) { this.column = column; dataType = column.getDataType(); this.isWritable = isWritable; }