mirror of https://gitee.com/bigwinds/arangodb
added derived file
This commit is contained in:
parent
fef641be02
commit
d55f1cdec2
|
@ -1034,7 +1034,7 @@ AQLGenerator.prototype._getLastRestrictableStatementInfo = function() {
|
||||||
|
|
||||||
AQLGenerator.prototype.restrict = function(restrictions) {
|
AQLGenerator.prototype.restrict = function(restrictions) {
|
||||||
var rest = stringToArray(restrictions);
|
var rest = stringToArray(restrictions);
|
||||||
if (rest.length == 0) {
|
if (rest.length === 0) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
this._addToPrint("restrict", restrictions);
|
this._addToPrint("restrict", restrictions);
|
||||||
|
@ -4539,7 +4539,7 @@ Graph.prototype._removeVertexCollection = function(vertexCollectionName, dropCol
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
Graph.prototype._getConnectingEdges = function(vertexExample1, vertexExample2, options) {
|
Graph.prototype._getConnectingEdges = function(vertexExample1, vertexExample2, options) {
|
||||||
var AQLStmt = new AQLGenerator(this);
|
|
||||||
if (!options) {
|
if (!options) {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
@ -4547,11 +4547,26 @@ Graph.prototype._getConnectingEdges = function(vertexExample1, vertexExample2, o
|
||||||
var opts = {
|
var opts = {
|
||||||
};
|
};
|
||||||
|
|
||||||
options.vertex1CollectionRestriction ? opts.startVertexCollectionRestriction = options.vertex1CollectionRestriction : null ;
|
if (options.vertex1CollectionRestriction) {
|
||||||
options.vertex2CollectionRestriction ? opts.endVertexCollectionRestriction = options.vertex2CollectionRestriction : null ;
|
opts.startVertexCollectionRestriction = options.vertex1CollectionRestriction;
|
||||||
options.edgeCollectionRestriction ? opts.edgeCollectionRestriction = options.edgeCollectionRestriction : null ;
|
}
|
||||||
options.edgeExamples ? opts.edgeExamples = options.edgeExamples : null ;
|
|
||||||
vertexExample2 ? opts.neighborExamples = vertexExample2 : null ;
|
if (options.vertex2CollectionRestriction) {
|
||||||
|
opts.endVertexCollectionRestriction = options.vertex2CollectionRestriction;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.edgeCollectionRestriction) {
|
||||||
|
opts.edgeCollectionRestriction = options.edgeCollectionRestriction;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.edgeExamples) {
|
||||||
|
opts.edgeExamples = options.edgeExamples;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vertexExample2) {
|
||||||
|
opts.neighborExamples = vertexExample2;
|
||||||
|
}
|
||||||
|
|
||||||
var query = "RETURN"
|
var query = "RETURN"
|
||||||
+ " GRAPH_EDGES(@graphName"
|
+ " GRAPH_EDGES(@graphName"
|
||||||
+ ',@vertexExample'
|
+ ',@vertexExample'
|
||||||
|
|
Loading…
Reference in New Issue