/** * Calculate and get the start value of this range. * * @param session the session * @return the start value */ public long getMin(Session session) { optimize(session); return min.getValue(session).getLong(); }
/** * Create a new range with the given start and end expressions. * * @param schema the schema (always the main schema) * @param min the start expression * @param max the end expression * @param noColumns whether this table has no columns */ public RangeTable(Schema schema, Expression min, Expression max, boolean noColumns) { super(schema, NAME); Column[] cols = noColumns ? new Column[0] : new Column[] { new Column("X", Value.LONG) }; this.min = min; this.max = max; setColumns(cols); }
private Table getDualTable(boolean noColumns) { Schema main = database.findSchema(Constants.SCHEMA_MAIN); Expression one = ValueExpression.get(ValueLong.get(1)); return new RangeTable(main, one, one, noColumns); }
Expression max = readExpression(); read(")"); table = new RangeTable(mainSchema, min, max, false); } else { Expression expr = readFunction(schema, tableName);
/** * Calculate and get the end value of this range. * * @param session the session * @return the end value */ public long getMax(Session session) { optimize(session); return max.getValue(session).getLong(); }