@@ -1087,6 +1087,34 @@ exports.test = function (global) {
10871087 ) ;
10881088 } ,
10891089
1090+ kShortestOutbound = function ( params ) {
1091+ db . _query (
1092+ "WITH @@v FOR v IN OUTBOUND K_SHORTEST_PATHS @start TO @dest @@c RETURN v" ,
1093+ {
1094+ "@c" : params . collection ,
1095+ "@v" : params . collection . replace ( "edges" , "values" ) ,
1096+ start : params . collection . replace ( / e d g e s / , "values" ) + "/test0" ,
1097+ dest : params . collection . replace ( / e d g e s / , "values" ) + "/test99999"
1098+ } ,
1099+ { } ,
1100+ { silent }
1101+ ) ;
1102+ } ,
1103+
1104+ kShortestAny = function ( params ) {
1105+ db . _query (
1106+ "WITH @@v FOR v IN ANY K_SHORTEST_PATHS @start TO @dest @@c RETURN v" ,
1107+ {
1108+ "@c" : params . collection ,
1109+ "@v" : params . collection . replace ( "edges" , "values" ) ,
1110+ start : params . collection . replace ( / e d g e s / , "values" ) + "/test9991" ,
1111+ dest : params . collection . replace ( / e d g e s / , "values" ) + "/test501"
1112+ } ,
1113+ { } ,
1114+ { silent }
1115+ ) ;
1116+ } ,
1117+
10901118 // /////////////////////////////////////////////////////////////////////////////
10911119 // documentTests
10921120 // /////////////////////////////////////////////////////////////////////////////
@@ -2524,6 +2552,14 @@ exports.test = function (global) {
25242552 name : "shortest-any" ,
25252553 params : { func : shortestAny }
25262554 } ,
2555+ {
2556+ name : "k-shortest-outbound" ,
2557+ params : { func : shortestOutbound }
2558+ } ,
2559+ {
2560+ name : "k-shortest-any" ,
2561+ params : { func : shortestAny }
2562+ } ,
25272563 {
25282564 name : "subquery-exists-path" ,
25292565 params : { func : subqueryExistsPath }
0 commit comments