Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 696 Bytes

README.md

File metadata and controls

58 lines (40 loc) · 696 Bytes

Data Structures

The nodes will have the types:

type User = {
  handler: string,
  id: number,
}

type Repo = {
  handler: string,
  id: number
}

type Org = {
  handler: string,
  id: number
}

Relationships

type follows = [User, User]

type belongsTo = [User, Org]

type has = [Org, Repo]

Constraints

http://blog.armbruster-it.de/2013/12/indexing-in-neo4j-an-overview/

CREATE CONSTRAINT ON (p:User) ASSERT p.handler IS UNIQUE

All

MATCH (n) RETURN n LIMIT 1000

Cyclic

MATCH (a:User), (b:User) WHERE (a)-[:FOLLOWS]->(b) AND (b)-[:FOLLOWS]->(a) RETURN a, b

Delete

MATCH (n) DETACH
DELETE n