1
0
Fork 0

Merge branch 'spdvpk' of https://github.com/arangodb/arangodb into spdvpk

This commit is contained in:
jsteemann 2016-03-18 13:57:02 +01:00
commit 40682e9c45
4 changed files with 7 additions and 23 deletions

View File

@ -378,7 +378,6 @@ bool IndexBlock::readIndex(size_t atMost) {
bool isReverse = (static_cast<IndexNode const*>(getPlanNode()))->_reverse;
bool isLastIndex = (_currentIndex == lastIndexNr && !isReverse) ||
(_currentIndex == 0 && isReverse);
auto _result = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
while (_cursor != nullptr) {
if (!_cursor->hasMore()) {
startNextCursor();

View File

@ -33,7 +33,7 @@
struct TRI_doc_mptr_t;
namespace arangodb {
class OperationCursor;
struct OperationCursor;
namespace velocypack {
class Slice;

View File

@ -776,7 +776,7 @@ OperationResult Transaction::anyLocal(std::string const& collectionName,
indexScan(collectionName, Transaction::CursorType::ANY, "", {}, skip,
limit, 1000, false);
auto result = std::make_shared<OperationResult>();
auto result = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
while (cursor->hasMore()) {
cursor->getMore(result);
@ -2285,26 +2285,11 @@ std::shared_ptr<OperationCursor> Transaction::indexScan(
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER,
"The index id cannot be empty.");
}
arangodb::Index* idx = nullptr;
if (!arangodb::Index::validateId(indexId.c_str())) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_ARANGO_INDEX_HANDLE_BAD);
}
TRI_idx_iid_t iid = arangodb::basics::StringUtils::uint64(indexId);
idx = document->lookupIndex(iid);
if (idx == nullptr) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_INDEX_NOT_FOUND,
"Could not find index '" + indexId +
"' in collection '" +
collectionName + "'.");
}
// We have successfully found an index with the requested id.
arangodb::Index* idx = getIndexByIdentifier(collectionName, indexId);
// Normalize the search values
VPackBuilder expander;
idx->expandInSearchValues(search, expander);
LOG(INFO) << expander.slice().toJson();
// Now collect the Iterator
IndexIteratorContext ctxt(_vocbase, resolver());

View File

@ -39,7 +39,7 @@
namespace arangodb {
namespace basics {
class AttributeName;
struct AttributeName;
}
namespace velocypack {
@ -50,9 +50,9 @@ class Index;
namespace aql {
class Ast;
class AstNode;
struct AstNode;
class SortCondition;
class Variable;
struct Variable;
}
//////////////////////////////////////////////////////////////////////////////