-
Notifications
You must be signed in to change notification settings - Fork 1
WIP: Allow Driver
as argument to from_neo4j
#169
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
base: main
Are you sure you want to change the base?
Conversation
Lets you do:
|
graph = result.execute_query( | ||
f"MATCH (n)-[r]->(m) RETURN n,r,m LIMIT {row_limit}", | ||
routing_=RoutingControl.READ, | ||
result_transformer_=Result.graph, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think if we allow a driver here, we should also allow to specify a query here instead of the row_limit.
Otherwise we end up with building a Cypher query builder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I agree with that. If they want to do their own query they can do it first, and then just provide the Result
. The idea of this is to make it so that they don't even have to make a query - that's the added value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay if thats the main part, how about just passing the url + auth instead and we construct the client as well?
I think its always a bit to remember how to construct the driver (>0s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a cool idea! I'll try it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I don't like is that it requires more parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can have a dataclass to combine url + auth. gds has DbmsConnectionInfo
now.
Thank you for your contribution to the Graph Visualization for Python project by Neo4j.
Before submitting this PR, please read Contributing to the Neo4j Ecosystem.
Make sure: