I went to see about adding this and saw that there was already some code to do this. It was commented out, and a comment suggests that this was related to an API change within Jupyter itself (https://github.com/catherinedevlin/ipython-sql/commit/1a754661354c7339b7bea1c6b6c13324b110d03f). I've tried to write it in a way that works with both the old and newer APIs, but I've only tested on notebook 6.4.11.
This does not work with JupyterLab, which seems to make this more difficult, likely requiring an extension.
I went to see about adding this and saw that there was already some code to do this. It was commented out, and a comment suggests that this was related to an API change within Jupyter itself (https://github.com/catherinedevlin/ipython-sql/commit/1a754661354c7339b7bea1c6b6c13324b110d03f). I've tried to write it in a way that works with both the old and newer APIs, but I've only tested on notebook 6.4.11.
This does not work with JupyterLab, which seems to make this more difficult, likely requiring an extension.