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

Generated SQL Tab UI Enhancement #101

Closed
allisonletts opened this issue Nov 15, 2021 · 3 comments · Fixed by #198
Closed

Generated SQL Tab UI Enhancement #101

allisonletts opened this issue Nov 15, 2021 · 3 comments · Fixed by #198
Labels
enhancement New feature or request ui/ux User Interface or Experience related

Comments

@allisonletts
Copy link
Contributor

Summary
Change the "Generated SQL" tab to Preview | Run | Save

Please describe the problem you are trying to solve.
Generate SQL, to me, means "write out the SQL".
Save SQL, to me, means "save the SQL for later".
Neither of them, to me, mean "execute the SQL on a database I'm going to tell you about".

Proposed Solution
I'd love to see three buttons here:

  1. Preview SQL
  2. Run SQL
  3. Save SQL
@allisonletts
Copy link
Contributor Author

Theoretically some of the detail from #102 could be moved out into the main UI, Run SQL - Drop Existing or Run SQL - Create New Only

@acrosman acrosman added the enhancement New feature or request label Nov 21, 2021
@acrosman
Copy link
Owner

Related to #107, which also overhauls this step.

@acrosman
Copy link
Owner

PR #120 updates to labels on the elements mentioned to be clearer. Adding a button to preview the SQL is an interesting idea, but runs into a few issues:

  1. That just a lot of SQL to see at once without a proper editor. So then it would either need to be copy/pasted to an editor or at least formatting and colorizing needs to happen here.
  2. KnexJS is handling several different SQL dialects internally, and doesn't make it easy to generate the statements until after a connection has been made – which is why the tool currently only allows for saving after it has been run.
  3. The process is already self-healing on a couple details, most notably when the rows get too big it swaps data-types on text fields to make them play more nicely. Getting that reflected in the preview is another layer to the challenge.

I am leaving this open for future thoughts and ideas. Others are welcome to offer PRs to take this further.

@acrosman acrosman added the ui/ux User Interface or Experience related label Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui/ux User Interface or Experience related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants