Database Reference
In-Depth Information
Listing 5-2. Cypher Command for All Users to Follow All Other Users
MATCH (n1:`User`),(n2:`User`)
WITH n1,n2
CREATE UNIQUE (n1-[:FOLLOWS]->n2)
WITH n1,n2
WHERE n1<> n2
RETURN n1,n2
When you run the Cypher statement in the web UI from Listing 5-2, the result—when separated a bit for
readability—should look like the image in Figure 5-1 and show all users following all other users.
Figure 5-1. Graph of all users following all other users
Test Data with Load CSV
When you are building an application and the data needs to be representative and as close to production-ready as
possible, using the LOAD CSV option is the next step. In this example, we are going to stick with the social application
example and use CSV files to generate users, relationships between users, posts, and posts that users have selected as
their favorites.
 
Search WWH ::




Custom Search