Comments - OQGRAPH Examples

6 years ago Mike Reiche

Is it possible to query the previous node for the sequence?

SELECT * FROM oq_graph g
WHERE g.latch='dijkstras' AND g.origid=1;

Actual result:

latch	origid	destid	weight	seq	linkid
dijkstras	1	NULL	4	6	5
dijkstras	1	NULL	3	5	4
dijkstras	1	NULL	2	4	6
dijkstras	1	NULL	2	3	3
dijkstras	1	NULL	1	2	2
dijkstras	1	NULL	0	1	1

Expected result:

latch	origid	destid	weight	seq	linkid	prev
dijkstras	1	NULL	4	6	5	4
dijkstras	1	NULL	3	5	4	3
dijkstras	1	NULL	2	4	6	2
dijkstras	1	NULL	2	3	3	2
dijkstras	1	NULL	1	2	2	1
dijkstras	1	NULL	0	1	1	NULL
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.