Skip to content

Add serde support to AST structs and enums #196

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

Merged
merged 2 commits into from
Jun 10, 2020
Merged

Add serde support to AST structs and enums #196

merged 2 commits into from
Jun 10, 2020

Conversation

panarch
Copy link
Contributor

@panarch panarch commented Jun 10, 2020

Apply serde to AST structs and enums to be serializable/deserializable.
serde support is optional, can be activated by feature named "serde".

It resolves the issue https://github.com/andygrove/sqlparser-rs/issues/183

I applied to all enums and structs which has #[derive(Debug, Clone, PartialEq, Eq, Hash)] in ast directory.

panarch added 2 commits June 5, 2020 18:05
Apply serde to AST structs and enums to be serializable/deserializable.
serde support is optional, can be activated by feature named "serde".
@coveralls
Copy link

Pull Request Test Coverage Report for Build 130824818

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.716%

Totals Coverage Status
Change from base Build 130660351: 0.0%
Covered Lines: 4063
Relevant Lines: 4430

💛 - Coveralls

@nickolay nickolay merged commit 2f10153 into apache:master Jun 10, 2020
@nickolay
Copy link
Contributor

Excellent, thanks! I think it might be a good idea to add a note about this in README and/or update the cli example to output this instead of Debug representation when available, but this can be done separately.

@panarch
Copy link
Contributor Author

panarch commented Jun 10, 2020

@nickolay wow, really fast, thanks!
It also sounds good to add code example, I'll make a new PR for that.

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.

3 participants