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

Creating a table does not reflect in the TUI #118

Closed
gytic opened this issue Nov 11, 2024 · 3 comments · Fixed by #123
Closed

Creating a table does not reflect in the TUI #118

gytic opened this issue Nov 11, 2024 · 3 comments · Fixed by #123
Assignees

Comments

@gytic
Copy link
Contributor

gytic commented Nov 11, 2024

When you use the SQL Editor to create a table, it does not reflect inside the TUI and you have to restart lazysql to see the changes.

Reproduction

This was tested with SQLite

  1. open lazysql
  2. connect to a database
  3. open SQL Editor and execute CREATE TABLE query
    • CREATE TABLE test (id integer PRIMARY KEY);
  4. switch back to table list -> new table is not visible

Expectation

It would be nice to 'refresh' the table list after a new table was created, and maybe even add a shortcut for manual refreshing of the table list.

Would it be possible to filter the query-string for 'CREATE' or 'create' and if either one of them is present refresh the table list after the query was executed?

@jorgerojas26
Copy link
Owner

Thanks for pointing out this. Maybe the manual refresh shortcut can solve this for now.

I'm planning to refactor the table Tree logic soon, the code is not that good.

Can you open a PR adding the shortcut "r" to refresh the tree?

@gytic
Copy link
Contributor Author

gytic commented Nov 16, 2024

Yeah I can do that.

Should it be a global hotkey or just when the tree is focused?

@jorgerojas26
Copy link
Owner

Yeah I can do that.

Should it be a global hotkey or just when the tree is focused?

A tree hotkey, not global.

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 a pull request may close this issue.

2 participants