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

fix: set active database from query #6103

Merged
merged 13 commits into from
Jul 19, 2024
Merged

Conversation

alespour
Copy link
Contributor

@alespour alespour commented Jul 17, 2024

For InfluxQL metaqueries to work with Cloud Serverless, active database needs to be set (via db HTTP query parameter). Current version only supports settings active via USE clause.

This PR adds sets active database using value of ON clause if present in the query and no db was set with USE.

@alespour alespour marked this pull request as ready for review July 17, 2024 10:38
@alespour alespour requested a review from bednar July 17, 2024 10:53
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! 👍 Before we can proceed with accepting it, there are a few requirements that need to be met:

The InfluxDB v1 allows the creation of database names with spaces. We should also cover this use case:

image

server/influx_test.go Show resolved Hide resolved
server/influx_test.go Show resolved Hide resolved
server/influx.go Outdated Show resolved Hide resolved
server/influx.go Outdated Show resolved Hide resolved
alespour and others added 5 commits July 19, 2024 08:44
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
@alespour alespour requested a review from bednar July 19, 2024 09:42
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@alespour alespour merged commit 0333316 into master Jul 19, 2024
3 checks passed
@alespour alespour deleted the fix/set-active-database-from-query branch July 19, 2024 10:29
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