Пример #1
0
bool PlanIterator::consumeNext(
    store::Item_t& result,
    const PlanIterator* iter,
    PlanState& planState)
{
  if (planState.theHasToQuit) 
  {
    // std::cout << "Plan interupted" << std::endl;

    throw FlowCtlException(FlowCtlException::INTERRUPT);
  }
  bool status = iter->produceNext(result, planState);

  if (planState.theCompilerCB->theConfig.print_item_flow)
  {
    if (Properties::instance().getStableIteratorIDs())
      std::cout << "next (" << iter->getId();
    else
      std::cout << "next (" << iter;

    std::cout << " = " << iter->getNameAsString() // typeid (*iter).name()
              << ") -> "
              << "status: " << status << " -> "
              << ((status && result != NULL) ? result->show().c_str() : "null")
              << std::endl;
  }
  return status;
}