livebook-dev / kino_db

Database integrations for Livebook
Apache License 2.0
40 stars 16 forks source link

Fix SQL cell to keep the selected connection when not in binding #75

Closed jonatanklosko closed 3 months ago

jonatanklosko commented 3 months ago

Scenario:

[Connection cell: conn1]
[Connection cell: conn2]
[SQL cell: using conn2]

Let's say we restart the runtime and evaluate the first connection cell. Currently, the SQL cell would pick up conn1 and even starting the second connection wouldn't roll that back.

This is a regression from #2. The corresponding change was made to update the selected database type, in case the user changes the connection cell to use different database and assigns into the same variable name.

I added tests for both #2 and the regression :)

josevalim commented 3 months ago

We can ship a new release already, right? We don't have to wait?

jonatanklosko commented 3 months ago

Yes, will do!

jonatanklosko commented 3 months ago

Done!