Skip to content

Derive serde::Serialize for for parse result #48

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

feikesteenbergen
Copy link
Contributor

@feikesteenbergen feikesteenbergen commented Feb 3, 2025

For inspecting statements and storing them (in PostgreSQL as json for example) it is sometimes useful to serialize the parsed query.

@feikesteenbergen
Copy link
Contributor Author

A bit of a discussion item perhaps, but I for one would really appreciate this in this library.

@feikesteenbergen feikesteenbergen force-pushed the feike/allow_serialization branch from 4e5838b to 1f0c194 Compare February 4, 2025 12:32
@seanlinsley
Copy link
Member

This seems reasonable, though I wonder if it needs to be a feature or should be unconditionally enabled.

I wonder why CI is failing; the error seems to be unrelated to this change.

@feikesteenbergen feikesteenbergen force-pushed the feike/allow_serialization branch 2 times, most recently from 5530afb to 4a1a6c1 Compare April 17, 2025 10:39
@feikesteenbergen
Copy link
Contributor Author

@seanlinsley pinging you as I rebased the PR on 6.1.0 and removed the CI failure.

I still wonder if this should be behind a feature flag or not, especially as no additional dependencies are required.

@seanlinsley
Copy link
Member

I think it should be fine to enable it by default.

Note that when making that update, the generated protobuf definitions are now stored in the repo as src/protobuf.rs. A cargo build should update it automatically. If it doesn't, that probably means you need to apt-get install protobuf-compiler or similar

@feikesteenbergen feikesteenbergen force-pushed the feike/allow_serialization branch from 4a1a6c1 to 4aee092 Compare April 18, 2025 06:40
@feikesteenbergen feikesteenbergen changed the title Include serialize feature Derive serde::Serialize for for parse result Apr 18, 2025
For inspecting statements and storing them (in PostgreSQL as json for
example) it is sometimes useful to serialize the parsed query.
@feikesteenbergen feikesteenbergen force-pushed the feike/allow_serialization branch from 4aee092 to 325988c Compare April 18, 2025 06:41
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