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

SQL util functions #7

Merged
merged 2 commits into from
Dec 15, 2021
Merged

SQL util functions #7

merged 2 commits into from
Dec 15, 2021

Conversation

andresmgot
Copy link
Collaborator

Ref: grafana/grafana-aws-sdk#28

This PR includes some more functions shared between SQL datasources (used in Suggestions and the Datasource class).

@andresmgot andresmgot requested review from a team, fridgepoet, iwysiu, sunker and sarahzinger and removed request for a team December 13, 2021 12:31
Copy link
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

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

The functions in the utils file doesn't really seems aws plugin specific, but more SQL plugin specific. The filterQuery function would not be usable in the X-ray plugin for example. I know we've talked about introducing a new, SQL package at some point. But for now, can we rename that function or the util file in some way so that it becomes obvious that this is only applicable for SQL plugins?

@andresmgot
Copy link
Collaborator Author

But for now, can we rename that function or the util file in some way so that it becomes obvious that this is only applicable for SQL plugins?

I am okay changing the name of the function but this is nicely covered by typescript. The function filterQuery is expecting a SQLQuery as an argument (this is a query with the value rawSQL) so this could not be used by X-ray. In any case, I am fine making the function names explicit.

Copy link
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

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

Nice!

@andresmgot andresmgot merged commit 2ed1b11 into main Dec 15, 2021
@andresmgot andresmgot deleted the sqlUtils branch December 15, 2021 15:06
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