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

Add meta_util.schema procedure that generates graph schema as a graph result #187

Merged
merged 20 commits into from Jan 30, 2023

Conversation

tonilastre
Copy link
Contributor

@tonilastre tonilastre commented Dec 19, 2022

Description

Module meta_util can be used to generate a graph schema as a graph result. It can be used like this:

// Get schema without properties count
CALL meta_util.schema() YIELD nodes, relationships RETURN nodes, relationships;

// Get schema, but with properties count
CALL meta_util.schema(true) YIELD nodes, relationships RETURN nodes, relationships;

It will show graph view only in Lab version >= 2.4.0. For earlier versions of the Lab, UNWIND needs to be called on returned object properties nodes and edges.

Pull request type

  • Algorithm/Module

Module/Algorithm

######################################

@tonilastre tonilastre marked this pull request as draft December 19, 2022 16:33
@tonilastre tonilastre added type: enhancement lang: python Issue on Python codebase status: draft PR is in draft phase labels Dec 19, 2022
@katarinasupe katarinasupe marked this pull request as ready for review January 24, 2023 12:24
@katarinasupe katarinasupe self-assigned this Jan 24, 2023
@katarinasupe katarinasupe added status: ready PR is ready for review and removed status: draft PR is in draft phase labels Jan 24, 2023
Copy link
Collaborator

@antepusic antepusic left a comment

Choose a reason for hiding this comment

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

All looks OK, just check out the suggestions I left 😄

README.md Outdated Show resolved Hide resolved
python/meta.py Outdated Show resolved Hide resolved
python/meta.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@antepusic antepusic left a comment

Choose a reason for hiding this comment

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

Good job!

python/meta.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@antoniofilipovic antoniofilipovic left a comment

Choose a reason for hiding this comment

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

Looks good, but from the optimization side, I think we should make this change of order when checking if the graph is empty, and make sure tests don't break.

@antoniofilipovic antoniofilipovic added status: change PR reviewed - needs changes and removed status: ready PR is ready for review labels Jan 26, 2023
@katarinasupe katarinasupe added status: ready PR is ready for review and removed status: change PR reviewed - needs changes labels Jan 26, 2023
@katarinasupe katarinasupe changed the title New: Add graph_schema query modules that generates graph schema as a graph result New: Add meta_util.schema procedure that generates graph schema as a graph result Jan 27, 2023
@katarinasupe katarinasupe changed the title New: Add meta_util.schema procedure that generates graph schema as a graph result Add meta_util.schema procedure that generates graph schema as a graph result Jan 27, 2023
@antoniofilipovic antoniofilipovic merged commit 2fc6066 into main Jan 30, 2023
@antoniofilipovic antoniofilipovic deleted the new-graph-schema-module branch January 30, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: python Issue on Python codebase status: ready PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants