有时,即使在path步骤中使用了from和to 调节器步骤也没有返回您所感兴趣的结果。使用和前一小节中相似的方式即一个select 步骤和一些as步骤,我们就可以选取到遍历path中指定的部分。下面的这个查询是从LAX出发找航线(route)并返回path.
Sometimes, even using the from and to modulating steps along with a path step will not give you the
results you are interested in. Using a select step and some as steps in a similar way to the example
in the previous section we can select specific parts of a traversal’s "path". Consider the query below
that finds a route from Los Angeles (LAX) and returns the path.
现在,想像一下,我们想要只是把所有标记为stop的部分作为我们的查询的返回结果。下面的例子显示了如何做到这些的。
Now, imagine we want to just return every other stop as the result from our query. The example
below shows how to do just that.
浙公网安备 33010602011771号