Michael Mauger <mmau...@protonmail.com> writes:

> I'd suggest remembering the buffer itself rather than the buffer name. Also, 
> like `sql-product-interactive', you can control a portion of the buffer name 
> in the `sql-connect' call. But again, it would be safer to use the buffer 
> itself to memoize the session. Your org session name would translate to the 
> buffer rather than the potentially changed buffer name.

Org mode markup communicates "session" by naming it.
So, one way or another, Org mode APIs expect some way to link session
name string to actual buffer.

API-wise, it is done via `org-babel-session-buffer', which can
optionally use special function org-babel-session-buffer:sql (if
defined) to perform backend-specific logic.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to