Commit 73c19f84 authored by Andrew McDonnell's avatar Andrew McDonnell

Update test case regression test comment for lp:1196027

parent e87960d3
......@@ -593,3 +593,73 @@ TRUNCATE TABLE graph_base;
DROP TABLE graph_base;
DROP TABLE graph;
#-- Reminder - the basic spec is at http://openquery.com/graph/doc
#-- Query edges stored in graph engine (latch=NULL)
#-- SELECT * FROM foo;
#-- Results:
#-- vertex id for origin of edge in origid column.
#-- vertex id for destination of edge in destid column.
#-- weight of edge in weight column.
#-- Essentially this returns the values (origid,destid pairs with optional weight) you put in, in this mode OQGRAPH looks very close to a real table. But it also does nothing special, it's just store/retrieve for those columns. The other columns will be returned as NULL.
#--
#-- Query vertices stored in graph engine (latch=0)
#-- SELECT * FROM foo WHERE latch = 0;
#-- Results:
#-- vertex id in linkid column
#--
#-- Query out-edges for vertex (latch=0 AND origid=N)
#-- SELECT * FROM foo WHERE latch = 0 AND origid = 2;
#-- Results:
#-- vertex id in linkid column
#-- edge weight in weight column
#--
#-- Query in-edges for vertex (latch=0 AND destid=N)
#-- SELECT * FROM foo WHERE latch = 0 AND destid = 6;
#-- Results:
#-- vertex id in linkid column
#-- edge weight in weight column
#--
#-- Dijkstra's shortest path algorithm (latch=1)
#-- Find shortest path:
#-- SELECT * FROM foo WHERE latch = 1 AND origid = 1 AND destid = 6;
#-- Results:
#-- latch, origid, destid are same as input.
#-- vertex id of the current step in linkid column.
#-- weight of traversed edge in weight column.
#-- step counter in seq column, so you can sort and use the result (starting at step 0).
#-- Example: SELECT GROUP_CONCAT(linkid ORDER BY seq) ...
#--
#-- Find reachable vertices:
#-- SELECT * FROM foo WHERE latch = 1 AND origid = 1;
#-- Results:
#-- latch, origid, destid are same as input.
#-- vertex id in linkid column.
#-- aggregate of weights in weight column.
#--
#-- Find originating vertices:
#-- SELECT * FROM foo WHERE latch = 1 AND destid = 6;
#-- Results:
#-- latch, origid, destid are same as input.
#-- vertex id in linkid column.
#-- aggregate of weights in weight column.
#--
#-- Breadth-first search (latch=2, assumes that each vertex is weight 1)
#-- Find shortest path:
#-- SELECT * FROM foo WHERE latch = 2 AND origid = 1 AND destid = 6;
#-- Results:
#-- vertex id in linkid column.
#-- weight column = 1 for each hop.
#--
#-- Find reachable vertices:
#-- SELECT * FROM foo WHERE latch = 2 AND origid = 1;
#-- Results:
#-- vertex id in linkid column.
#-- computed number of hops in weight column.
#--
#-- Find originating vertices:
#-- SELECT * FROM foo WHERE latch = 2 AND destid = 6;
#-- Results:
#-- vertex id in linkid column.
#-- computed number of hops in weight column.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment