mirror of https://gitee.com/bigwinds/arangodb
jslint
This commit is contained in:
parent
289a25bf5f
commit
5af79e0daf
|
@ -278,7 +278,7 @@ var buildEdgeCollectionRestriction = function(collections) {
|
|||
collections = [ collections ];
|
||||
}
|
||||
return collections.map(collection => "`" + collection + "`").join(",");
|
||||
}
|
||||
};
|
||||
|
||||
var buildVertexCollectionRestriction = function(collections, varname) {
|
||||
if (!Array.isArray(collections)) {
|
||||
|
@ -290,7 +290,7 @@ var buildVertexCollectionRestriction = function(collections, varname) {
|
|||
}).join(" OR ")}
|
||||
)`;
|
||||
return `${filter}`;
|
||||
}
|
||||
};
|
||||
|
||||
var buildFilter = function(examples, bindVars, varname) {
|
||||
var varcount = 0;
|
||||
|
@ -1204,7 +1204,7 @@ Graph.prototype._edges = function(vertexExample, options) {
|
|||
${Array.isArray(options.edgeCollectionRestriction) && options.edgeCollectionRestriction.length > 0 ? buildEdgeCollectionRestriction(options.edgeCollectionRestriction) : "GRAPH @graphName"}
|
||||
${buildFilter(options.edgeExamples, bindVars, "e")}
|
||||
RETURN DISTINCT ${options.includeData === true ? "e" : "e._id"}`;
|
||||
if(!Array.isArray(options.edgeCollectionRestriction) || options.edgeCollectionRestriction.length == 0) {
|
||||
if(!Array.isArray(options.edgeCollectionRestriction) || options.edgeCollectionRestriction.length === 0) {
|
||||
bindVars.graphName = this.__name;
|
||||
}
|
||||
return db._query(query, bindVars).toArray();
|
||||
|
@ -1324,7 +1324,7 @@ Graph.prototype._neighbors = function(vertexExample, options) {
|
|||
${buildFilter(options.edgeExamples, bindVars, "e")}
|
||||
${Array.isArray(options.vertexCollectionRestriction) && options.vertexCollectionRestriction.length > 0 ? buildVertexCollectionRestriction(options.vertexCollectionRestriction,"v") : ""}
|
||||
RETURN DISTINCT ${options.includeData === true ? "v" : "v._id"}`;
|
||||
if(!Array.isArray(options.edgeCollectionRestriction) || options.edgeCollectionRestriction.length == 0) {
|
||||
if(!Array.isArray(options.edgeCollectionRestriction) || options.edgeCollectionRestriction.length === 0) {
|
||||
bindVars.graphName = this.__name;
|
||||
}
|
||||
return db._query(query, bindVars).toArray();
|
||||
|
|
Loading…
Reference in New Issue