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

Don't auto-format SQL on page load #601

Merged
merged 1 commit into from Oct 18, 2019
Merged

Don't auto-format SQL on page load #601

merged 1 commit into from Oct 18, 2019

Conversation

simonw
Copy link
Owner

@simonw simonw commented Oct 18, 2019

Refs #600

@simonw
Copy link
Owner Author

simonw commented Oct 18, 2019

@rixx does this look like the right way to do #600 to you?

@rixx
Copy link
Contributor

rixx commented Oct 18, 2019

That looks right, and I completely agree with the intent.

@rixx
Copy link
Contributor

rixx commented Oct 18, 2019

The only negative impact that comes to mind is that now you have no way to get the read-only query to be formatted nicely, I think, so maybe a second PR adding the formatting functionality even to the read-only page would be good?

@simonw simonw merged commit e877b1c into master Oct 18, 2019
2 checks passed
@simonw
Copy link
Owner Author

simonw commented Oct 18, 2019

That's a good idea. It could even be smart about it and only show the "Format SQL" button on that page of the output of the function would differ from what's there already.

rixx added a commit to rixx/datasette that referenced this pull request Oct 20, 2019
Following discussion in simonw#601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.
@rixx
Copy link
Contributor

rixx commented Oct 20, 2019

Submitted in #602!

simonw pushed a commit that referenced this pull request Nov 4, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
simonw added a commit that referenced this pull request Nov 11, 2019
simonw pushed a commit that referenced this pull request Nov 11, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
simonw added a commit that referenced this pull request Nov 15, 2019
simonw pushed a commit that referenced this pull request Nov 15, 2019
Following discussion in #601, this PR adds a "Format SQL" button to
read-only SQL (if the SQL actually differs from the formatting result).

It also removes a console error on readonly SQL queries.

Thanks, @rixx!
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.

None yet

2 participants