1
0
Fork 0

Activated Externals in OperationCursor. This commit might break tests again.

This commit is contained in:
Michael Hackstein 2016-03-29 11:08:31 +02:00
parent 9095e57fb3
commit a5d20b0041
4 changed files with 10 additions and 10 deletions

View File

@ -77,15 +77,11 @@ void OperationCursor::getMore(std::shared_ptr<OperationResult>& opRes,
while (batchSize > 0 && _limit > 0 && (mptr = _indexIterator->next()) != nullptr) {
--batchSize;
--_limit;
#if 0
if (useExternals) {
builder.add(VPackValue(mptr->vpack(), VPackValueType::External));
} else {
#endif
builder.add(VPackSlice(mptr->vpack()));
#if 0
builder.add(VPackSlice(mptr->vpack()));
}
#endif
}
if (batchSize > 0 || _limit == 0) {
// Iterator empty, there is no more

View File

@ -2232,12 +2232,13 @@ std::shared_ptr<OperationCursor> Transaction::indexScan(
"The index id cannot be empty.");
}
// Normalize the search values
VPackBuilder expander;
idx->expandInSearchValues(search, expander);
// VPackBuilder expander;
// idx->expandInSearchValues(search, expander);
// Now collect the Iterator
IndexIteratorContext ctxt(_vocbase, resolver());
iterator.reset(idx->iteratorForSlice(this, &ctxt, expander.slice(), reverse));
// iterator.reset(idx->iteratorForSlice(this, &ctxt, expander.slice(), reverse));
iterator.reset(idx->iteratorForSlice(this, &ctxt, search, reverse));
}
}
if (iterator == nullptr) {

View File

@ -305,9 +305,12 @@ std::string VelocyPackHelper::getStringValue(VPackSlice const& slice,
/// or it is not a string
////////////////////////////////////////////////////////////////////////////////
std::string VelocyPackHelper::getStringValue(VPackSlice const& slice,
std::string VelocyPackHelper::getStringValue(VPackSlice slice,
char const* name,
std::string const& defaultValue) {
if (slice.isExternal()) {
slice = VPackSlice(slice.getExternal());
}
TRI_ASSERT(slice.isObject());
if (!slice.hasKey(name)) {
return defaultValue;

View File

@ -172,7 +172,7 @@ class VelocyPackHelper {
/// or it is not a string
//////////////////////////////////////////////////////////////////////////////
static std::string getStringValue(VPackSlice const&, char const*,
static std::string getStringValue(VPackSlice, char const*,
std::string const&);
//////////////////////////////////////////////////////////////////////////////