}
else {
this.skipLeft = skip();
}
if (skipLeft < 0)
throw new NegativeLimitException("OFFSET", skipLeft);
if (isLimitBinding()) {
ValueSource value = bindings.getValue(limit());
if (value.isNull())
this.limitLeft = Integer.MAX_VALUE;
else {
TInstance type = MNumeric.INT.instance(true);
TExecutionContext executionContext =
new TExecutionContext(null, type, context);
Value ivalue = new Value(MNumeric.INT.instance(true));
MNumeric.INT.fromObject(executionContext, value, ivalue);
this.limitLeft = ivalue.getInt32();
}
}
else {
this.limitLeft = limit();
}
if (limitLeft < 0)
throw new NegativeLimitException("LIMIT", limitLeft);
super.open();
} finally {
TAP_OPEN.out();
}
}