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

new: use _graphs instead of nxadb_graphs #66

Merged
merged 9 commits into from
Oct 21, 2024

Conversation

aMahanna
Copy link
Member

@aMahanna aMahanna commented Oct 15, 2024

Scratches nxadb_graphs in favour of the _graphs system collection.

We once spoke about using this, but stopped because we couldn't guarantee that the database user has access to _graphs.

This is still valid, but I am suggesting we simply parameterize the Graph Collection Name (and have it by default set to _graphs), instead of polluting every user DB with an nxadb_graphs collection.

IMO this is much cleaner. We no longer need to manually delete a graph from nxadb_graphs once a Graph has been removed from _graphs, which was getting annoying.

Functionality remains the same, we simply embed the Graph Properties of the nxadb.Graph object under a a field called networkx within the associated _graph document. UX does not change, user doesn't even need to know about this networkx nested field.

Comment on lines -107 to +114
For now, the collection is called 'nxadb_graphs'.
The default collection is called `_graphs`. However, if the
`DATABASE_GRAPH_COLLECTION` environment variable is specified,
then that collection will be used. This variable is useful when the
database user does not have permission to access the `_graphs`
system collection.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

highlighting

@aMahanna aMahanna merged commit a9b92fd into main Oct 21, 2024
7 checks passed
@aMahanna aMahanna deleted the use-graphs-system-collections branch October 21, 2024 16:18
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.

1 participant