blob: 08319e29324ed392c1cc4aa0f1c7d803c158f0bf [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Test each path function (edges, hop-count, labels, vertices).
FROM GRAPH VERTEX (:User)
PRIMARY KEY (user_id)
AS Yelp.Users,
EDGE (:User)-[:FRIENDS_WITH]->(:User)
SOURCE KEY (user_id)
DESTINATION KEY (friend)
AS ( FROM Yelp.Friends F
SELECT F.user_id AS user_id,
F.friend AS friend )
MATCH (n1)-[e{1,2}]->(n2)->(n3) AS p
SELECT EDGES(p) AS pEdges,
EDGES(e) AS eEdges,
HOP_COUNT(p) AS pHopCount,
VERTICES(p) AS pVertices,
VERTICES(e) AS eVertices
ORDER BY n1, e, n2, n3;