예제 #1
0
 @Override
 public void open() {
   TAP_OPEN.in();
   try {
     if (isSkipBinding()) {
       ValueSource value = bindings.getValue(skip());
       if (!value.isNull()) this.skipLeft = value.getInt32();
     } 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();
   }
 }
예제 #2
0
 @Override
 public void open() {
   TAP_OPEN.in();
   try {
     CursorLifecycle.checkIdle(this);
     filter = bindings.getBloomFilter(bindingPosition);
     bindings.setBloomFilter(bindingPosition, null);
     inputCursor.open();
     idle = false;
   } finally {
     TAP_OPEN.out();
   }
 }