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

Adding comments to generated SQL #643

Open
charJe opened this issue Nov 3, 2022 · 1 comment
Open

Adding comments to generated SQL #643

charJe opened this issue Nov 3, 2022 · 1 comment

Comments

@charJe
Copy link

charJe commented Nov 3, 2022

Is there a way to construct SQL statement in the usual way, then add a an SQL comment with custom content, to the query before sending it to the database? Ideally this comment would be able to be added at any point in the construction process; for example, I could add a comment to a filter_ and it would show up above the where in SQL. It would also be acceptable to only be able to add the comment right before runBeamPostgres or runSelect*; Maybe a different version of these functions that would take a comment string.

@tathougies
Copy link
Collaborator

All the database syntaxes in this repository are ultimately newtype wrappers over what amounts to string builders, so this is fairly easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants