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

Show how to store a custom schema on file #676

Merged
merged 2 commits into from
Oct 19, 2018

Conversation

Mats-SX
Copy link
Member

@Mats-SX Mats-SX commented Oct 15, 2018

Solves #587

Co-authored-by: Sören Reichardt [email protected]

Copy link
Contributor

@s1ck s1ck left a comment

Choose a reason for hiding this comment

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

LGTM


// If we didn't already have the schema (first time we connect to a Neo4j db, or the db has changed and we need to update)
// We can write it to file like this:
// Get the schema for the graph
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe two lines would be better:

// Get the schema for the graph; MetaLabelSupport.entireGraphName refers to the whole database
val schema = pdgs.schema(MetaLabelSupport.entireGraphName).get
// Convert the schema to a serializable JSON format
val jsonString = schema.toJson

@Mats-SX Mats-SX merged commit fea056d into opencypher:master Oct 19, 2018
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.

2 participants