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

Sqllab dont send empty queries to db #3459

Merged

Conversation

timifasubaa
Copy link
Contributor

Fixes:
#2102

Ideally I would have liked the button to communicate that it isn't listening to queries (by turning yellow or something) but that was beginning to be unnecessarily complicated. After this change, if you type in an empty query it just doesn't send anything to the db.

@mistercrunch @ascott

@@ -76,7 +76,9 @@ class SqlEditor extends React.PureComponent {
if (!this.props.database.allow_run_sync) {
effectiveRunAsync = true;
}
this.startQuery(effectiveRunAsync);
if (this.props.queryEditor.sql) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the right place to add it, maybe an early return at the top of the function instead?

if (!this.props.queryEditor.sql)
    return;

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 55dc463 on timifasubaa:sqllab--dont_send_empty_queries_to_db into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 1cf492a on timifasubaa:sqllab--dont_send_empty_queries_to_db into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 1cf492a on timifasubaa:sqllab--dont_send_empty_queries_to_db into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 7d14512 on timifasubaa:sqllab--dont_send_empty_queries_to_db into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling df03355 on timifasubaa:sqllab--dont_send_empty_queries_to_db into 8223729 on apache:master.

@mistercrunch mistercrunch merged commit 31b7b9a into apache:master Sep 14, 2017
@timifasubaa timifasubaa deleted the sqllab--dont_send_empty_queries_to_db branch September 15, 2017 16:38
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants