Open desinent opened 1 year ago
I second this. There is a comment on the code saying the author doesn't have a use for it, but I use it extensively to reuse query results. I could be doing that some other way, but I think it is reasonable for a Org Babel back-end to support this. I could probably take a stab at it, but I won't have time available for the foreseeable months...
I would also like to add that it wouldn't be much trouble to support passing user, password, database and such as header arguments, while still letting sql.el
handle it (referencing this other comment) just like its being done with sql-product
, we'd just have to get these arguments and bind the appropriate variables (i.e. sql-user
, sql-password
, sql-database
, ...)
The two cases suggested in this issue — variables (:var) and arguments — e.g. header-arguments for connection — are covered by ob-sql-session. Regarding the last comment, please note that while org variables are, for some programming languages, a simple matter of substitution/evaluation, and as such a piece of cake, arguments, on the other hand, requires careful handling.
Yeah, at the time of writing this comment ob-sql-session wasn't a thing but I agree it covers the cases mentioned
As compared to the back-end ob-sql, I miss the ability to pass argument values to source blocks.
For instance, this does not work:
I have only tried PostgreSQL this far, but judging from the error messages, it is the argument passing which fails.