Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle query interpolation multi-valued variable (#32)
This is a follow up after PR #31. This makes it possible to query with both single- and multi-valued variables. After this PR, the following query in Grafana: ```sql SELECT * FROM backend WHERE application_name IN ($application) OR duration_ms IN ($duration) OR sub = '$sub' ``` In to: ```sql SELECT * FROM backend WHERE application_name IN ('Elfskot.Api','Elfsquad.ConfiguratorApi','Elfsquad.OdataApi') OR duration_ms IN ('30', '8') OR sub = '1ff96bd8-53d8-4214-85b9-08da00dc987f' ``` The `WHERE IN (x, y, z)` with single quotes seems to work for both numbers & strings. The logic in the formatter might need to be improved for more complex data types. --------- Signed-off-by: Stan van Rooy <[email protected]> Signed-off-by: Stan van Rooy <[email protected]>
- Loading branch information