-
Notifications
You must be signed in to change notification settings - Fork 163
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 for execution of any single or multi query statements with discarded completions/rows #1023
Support for execution of any single or multi query statements with discarded completions/rows #1023
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1023 +/- ##
==========================================
+ Coverage 85.54% 85.56% +0.01%
==========================================
Files 135 135
Lines 2041 2057 +16
Branches 239 228 -11
==========================================
+ Hits 1746 1760 +14
- Misses 295 297 +2 ☔ View full report in Codecov by Sentry. |
This seems like a good idea. Any ideas for a better name than |
How about |
I guess I could also add a version which accepts arguments if this extension is ok like: |
Update:
I think I underestimated that one. It would make this pull request somewhat bigger 🤔 I guess it would need to run through prepare as well and require a new type like |
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