Skip to content

Added support for in-statement variable annotations.#512

Open
Jack12816 wants to merge 1 commit into
ankane:masterfrom
Jack12816:variable-select
Open

Added support for in-statement variable annotations.#512
Jack12816 wants to merge 1 commit into
ankane:masterfrom
Jack12816:variable-select

Conversation

@Jack12816

@Jack12816 Jack12816 commented Dec 2, 2025

Copy link
Copy Markdown

First things first: thank you all very much for this awesome gem! 🙏

- What is it good for

In my company and use case, the people who write and maintain queries in Blazer are not the ones running them, and neither of these groups maintains the Blazer configuration or deploys the application. Smart variables would be useful, but they require configuration changes and deployments. Simple variables are great, but they result in free-text inputs. The people running the queries are not always technical, so it would be helpful if we could annotate variable values so that, instead of free-text inputs, they see select boxes with valid options.

This PR adds a solution for this:

Screenshot_20251202_113229

- What I did

I just added a Blazer::Statement#variable_values method which searches for comments on the statement in a particular format, tries to parse them as JSON, and uses them for displaying on the UI.

- A picture of a cute animal (not mandatory but encouraged)
image

Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
@Jack12816

Copy link
Copy Markdown
Author

@ankane Ping? :)

@marcusg

marcusg commented Apr 24, 2026

Copy link
Copy Markdown

+1 👍

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