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

Support storing preparable statements in external files #6

Open
nikita-volkov opened this issue Dec 16, 2019 · 1 comment
Open

Support storing preparable statements in external files #6

nikita-volkov opened this issue Dec 16, 2019 · 1 comment

Comments

@nikita-volkov
Copy link
Owner

nikita-volkov commented Dec 16, 2019

Yeah would be really cool if we could keep our preparable statements in separate sql files. Definitely second this feature.
P.S. Great work on this library!

Am I right in understanding that you want to store SQL of each statement in a separate file? Why do you need that?

I am having complex queries, that sometimes spawns 100s of lines, I like to have them in separate files, because of syntax highlighting and readability.

Originally posted by @popara in #5 (comment) and @charlescrain in #5 (comment)

@nikita-volkov nikita-volkov changed the title Support storing _preparable statements_ in external files Support storing preparable statements in external files Dec 16, 2019
@nikita-volkov
Copy link
Owner Author

This seems to be implementable on top of "hasql-th". "hasql-th" exposes all the functionality needed for that. It should be pretty easy to implement.

Because ATM we have no evidence of this being a popular problem and likely to never get one, I likely won't be implementing that myself or merging such functionality into "hasql-th".

However this can easily be released as an extension library with the person releasing it taking on the maintenance responsibilities for that functionality. See the Benefits of being an ecosystem section of Hasql Readme for more on 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

No branches or pull requests

1 participant