Skip to content

Added highlight for SQL queries#62

Merged
itsgoingd merged 2 commits intounderground-works:masterfrom
edgardmessias:highlight_sql
Dec 1, 2020
Merged

Added highlight for SQL queries#62
itsgoingd merged 2 commits intounderground-works:masterfrom
edgardmessias:highlight_sql

Conversation

@edgardmessias
Copy link
Contributor

Added highlight for SQL queries

Light Theme:
image

Dark Theme:
image

@edgardmessias edgardmessias force-pushed the highlight_sql branch 3 times, most recently from 8acb5fc to 816c8a7 Compare October 26, 2020 11:56
@edgardmessias
Copy link
Contributor Author

@itsgoingd , what you think about to add @sqltools/formatter?

@itsgoingd
Copy link
Member

itsgoingd commented Oct 28, 2020

Hey, PR looks cool. I will need to pull this and try it out before merging, will try to get this done before 5.0 release.

@sqltools/formatter - not sure, how would you like to use it? We already do uppercase keywords server-side. I think multi-line formatting would make it harder to find relevant queries in the database tab (too much scrolling). I feel like the highlighting might be the better idea.

Thanks for all the PRs lately btw!

@edgardmessias
Copy link
Contributor Author

Thanks @itsgoingd

My fear is about long queries horizontally.

Maybe we can use an option to show only a few lines and a button to "show more".

@itsgoingd
Copy link
Member

I wouldn't be against implementing this as a toggle on the queries table. Eg. the timeline has a toggle to always show event details. In a similar fashion we could have a toolbar item on the queries table itself that would enable formatting queries when active.

@edgardmessias
Copy link
Contributor Author

@itsgoingd , great suggestion and I already updated with this change

@edgardmessias
Copy link
Contributor Author

ping @itsgoingd

@itsgoingd
Copy link
Member

Hey, sorry for the delay, I'm pretty busy atm. I've played with this a bit and it looks pretty cool. Didn't want to make big changes or delay the 5.0 release though. So I've decoded to keep this for 5.1, will merge into master soon to iterate on it a bit more.

@itsgoingd
Copy link
Member

Merging to master now for the next release cycle, thanks!

@itsgoingd itsgoingd merged commit 3d208d1 into underground-works:master Dec 1, 2020
@edgardmessias edgardmessias deleted the highlight_sql branch December 2, 2020 11:04
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