Skip to content

Commit

Permalink
[withPointsKSP][docqueries] Updating for withPointsKSP and migration …
Browse files Browse the repository at this point in the history
…docs
  • Loading branch information
AbhinJ committed Aug 22, 2023
1 parent 1cde46c commit 06ef775
Show file tree
Hide file tree
Showing 4 changed files with 274 additions and 110 deletions.
31 changes: 31 additions & 0 deletions docqueries/src/migration.result
Original file line number Diff line number Diff line change
Expand Up @@ -868,5 +868,36 @@ SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD(
(10 rows)

/* --withpointsdd5 */
/* --withPointsKSP1 */
SELECT * FROM pgr_withPointsKSP(
$$SELECT id, source, target, cost, reverse_cost FROM edges$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
6, 10, 1,'r');
seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
-----+---------+----------+-----------+---------+------+------+------+----------
1 | 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0
2 | 1 | 2 | 6 | 10 | 7 | 8 | 1 | 1
3 | 1 | 3 | 6 | 10 | 11 | 9 | 1 | 2
4 | 1 | 4 | 6 | 10 | 16 | 16 | 1 | 3
5 | 1 | 5 | 6 | 10 | 15 | 3 | 1 | 4
6 | 1 | 6 | 6 | 10 | 10 | -1 | 0 | 5
(6 rows)

/* --withPointsKSP2 */
SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_withPointsKSP(
$$SELECT id, source, target, cost, reverse_cost FROM edges$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
6, 10, 1,'r');
seq | path_seq | node | edge | cost | agg_cost
-----+----------+------+------+------+----------
1 | 1 | 6 | 4 | 1 | 0
2 | 2 | 7 | 8 | 1 | 1
3 | 3 | 11 | 9 | 1 | 2
4 | 4 | 16 | 16 | 1 | 3
5 | 5 | 15 | 3 | 1 | 4
6 | 6 | 10 | -1 | 0 | 5
(6 rows)

/* --withPointsKSP3 */
ROLLBACK;
ROLLBACK
13 changes: 13 additions & 0 deletions docqueries/src/migration.test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,16 @@ SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD(
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
-5, 2.3, 'r');
/* --withpointsdd5 */
/* --withPointsKSP1 */
SELECT * FROM pgr_withPointsKSP(
$$SELECT id, source, target, cost, reverse_cost FROM edges$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
6, 10, 1,'r');

/* --withPointsKSP2 */
SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_withPointsKSP(
$$SELECT id, source, target, cost, reverse_cost FROM edges$$,
$$SELECT pid, edge_id, fraction, side from pointsOfInterest$$,
6, 10, 1,'r');

/* --withPointsKSP3 */
Loading

0 comments on commit 06ef775

Please sign in to comment.