1
0
Fork 0

Add NoResultsBlock.

This commit is contained in:
Max Neunhoeffer 2014-08-21 10:32:38 +02:00
parent 6ae1432db5
commit b1be847af4
2 changed files with 70 additions and 0 deletions

View File

@ -2514,6 +2514,29 @@ void ExecutionBlock::VarOverview::after (ExecutionBlock *eb) {
eb->_varOverview = *me;
}
// -----------------------------------------------------------------------------
// --SECTION-- class NoResultsBlock
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief initCursor, only call base
////////////////////////////////////////////////////////////////////////////////
int NoResultsBlock::initCursor (AqlItemBlock* items, size_t pos) {
_done = true;
return TRI_ERROR_NO_ERROR;
}
int NoResultsBlock::getOrSkipSome (size_t atLeast,
size_t atMost,
bool skipping,
AqlItemBlock*& result,
size_t& skipped) {
TRI_ASSERT(result == nullptr && skipped == 0);
return TRI_ERROR_NO_ERROR;
}
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"

View File

@ -1237,6 +1237,53 @@ namespace triagens {
};
// -----------------------------------------------------------------------------
// --SECTION-- NoResultsBlock
// -----------------------------------------------------------------------------
class NoResultsBlock : public ExecutionBlock {
public:
NoResultsBlock (AQL_TRANSACTION_V8* trx, SingletonNode const* ep)
: ExecutionBlock(trx, ep) {
}
~NoResultsBlock () {
}
int initialize () {
return ExecutionBlock::initialize();
}
////////////////////////////////////////////////////////////////////////////////
/// @brief initCursor, store a copy of the register values coming from above
////////////////////////////////////////////////////////////////////////////////
int initCursor (AqlItemBlock* items, size_t pos);
bool hasMore () {
return false;
}
int64_t count () {
return 0;
}
int64_t remaining () {
return 0;
}
private:
int getOrSkipSome (size_t atLeast,
size_t atMost,
bool skipping,
AqlItemBlock*& result,
size_t& skipped);
};
} // namespace triagens::aql
} // namespace triagens