Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds DISTINCT #40

Merged
merged 2 commits into from May 2, 2024
Merged

Adds DISTINCT #40

merged 2 commits into from May 2, 2024

Conversation

jackboyla
Copy link
Contributor

from grandcypher import GrandCypher
import networkx as nx

G = nx.DiGraph()

# Add nodes with attributes
G.add_node(1, name="Alice", age=30)
G.add_node(2, name="Bob", age=30)
G.add_node(3, name="Alice", age=25)
G.add_node(4, name="Alice", age=30)

# Add edges
G.add_edge(1, 2)
G.add_edge(2, 3)
G.add_edge(3, 4)

out = GrandCypher(G).run("""
MATCH (n) 
RETURN DISTINCT n.name, n.age
""")
print(out)

# {'n.name': ['Bob', 'Alice'], 'n.age': [25, 30]}

@j6k4m8
Copy link
Member

j6k4m8 commented May 2, 2024

Woah @jackboyla, this rocks!! Thank you so much, this is a great improvement! Can I merge, or is this awaiting anything else?

@jackboyla
Copy link
Contributor Author

@j6k4m8 hey thanks! 😁 this library is really cool. That's all I have on my side so you can go ahead and merge :)

@j6k4m8
Copy link
Member

j6k4m8 commented May 2, 2024

Woo! Awesome :) So glad the library has been helpful to you! Thanks a ton for this work, it's SUPER appreciated!!!

@j6k4m8 j6k4m8 merged commit 6f4e32c into aplbrain:master May 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants