mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'spdvpk' of https://github.com/arangodb/arangodb into spdvpk
This commit is contained in:
commit
c955db2feb
|
@ -538,13 +538,6 @@ static void RequestEdges(VPackSlice const& vertexSlice,
|
|||
return;
|
||||
}
|
||||
|
||||
std::vector<std::string> parts =
|
||||
arangodb::basics::StringUtils::split(vertexId, "/");
|
||||
if (parts.size() != 2) {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DOCUMENT_HANDLE_BAD,
|
||||
vertexId);
|
||||
}
|
||||
|
||||
VPackBuilder searchValueBuilder;
|
||||
EdgeIndex::buildSearchValue(direction, vertexId, searchValueBuilder);
|
||||
VPackSlice search = searchValueBuilder.slice();
|
||||
|
@ -2821,12 +2814,8 @@ AqlValue Functions::Edges(arangodb::aql::Query* query,
|
|||
|
||||
if (vertexSlice.isArray()) {
|
||||
for (auto const& v : VPackArrayIterator(vertexSlice)) {
|
||||
try {
|
||||
RequestEdges(v, trx, collectionName, indexId, direction,
|
||||
matcher.get(), includeVertices, *builder.get());
|
||||
} catch (...) {
|
||||
// Errors in Array are simply ignored
|
||||
}
|
||||
}
|
||||
} else {
|
||||
RequestEdges(vertexSlice, trx, collectionName, indexId, direction,
|
||||
|
|
|
@ -128,7 +128,7 @@ static void EdgesQuery(TRI_edge_direction_e direction,
|
|||
if (obj->Has(TRI_V8_ASCII_STRING(TRI_VOC_ATTRIBUTE_ID))) {
|
||||
builder->add(VPackValue(TRI_ObjectToString(obj->Get(TRI_V8_ASCII_STRING(TRI_VOC_ATTRIBUTE_ID)))));
|
||||
} else {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, "object does not have _id attribute");
|
||||
builder->add(VPackValue(""));
|
||||
}
|
||||
} else {
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, "invalid value type. expecting string or object value");
|
||||
|
|
Loading…
Reference in New Issue