Skip to content
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

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

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

jonatanklosko
Copy link
Member

@jonatanklosko jonatanklosko commented Aug 15, 2024

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 :)

Comment on lines +82 to +83
# TODO: Use Code.env_for_eval on Elixir v1.14+
env = :elixir.env_for_eval([])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kino requires Elixir v1.14, so we can bump it here too. I will push directly to main after the PR.

@josevalim
Copy link
Contributor

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

@jonatanklosko
Copy link
Member Author

Yes, will do!

@jonatanklosko jonatanklosko merged commit b44f4ab into main Aug 15, 2024
1 check passed
@jonatanklosko jonatanklosko deleted the jk-multi-conn branch August 15, 2024 07:10
@jonatanklosko
Copy link
Member Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants