Support for execution of any single or multi query statements with discarded completions/rows #1023
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I was looking for a way to execute any statements without being able to know in advance whether it's going to be a query or command as well as whether it'll contain single or multiple queries which is currently not possible.
Use case with some background:
We are using skunk in our code base for database access which has been working out great. For running migrations / versioning the database though we are still seeking support from flyway. Considering that we only use a fraction of Flyway features, only with Postgres and we already have a library for database access which could take care of that, it adds a lot of dependencies on top like JDBC with drivers and keeps us tied to the JVM. Flyway cli also ships with a jre.
I am attempting to replace Flyway with dumbo. For that I'd like to read any SQL statements from a file, send it to Postgres and let it take care of the rest. Returned Completions/Rows are not really relevant. I'm currently missing the ability to let skunk just send any kind of statement, query or command, single or multiple to Postgres without the need to parse the contents or split into single statements.
I currently ended up with adding an extended Session version as in this PR that ships with a "simple"
and was wondering whether this or something similar could be considered as part of skunk 🤔
Related issue about multi-query statements support: #695
This one is maybe also somewhat related #959