SQL: Add macro support in select case (#88514)

* Feat: timeGroup macro handling in VQB

* Add tests

* Add functions to SQL ds

* Fix lint errors

* Add feature toggle

* Add rendering based on object

* Fix lint

* Fix CI failures

* Fix tests

* Address review comments

* Add docs

* Fix JSX runtime warnings

* Remove docs part that mentions suggest more macros

* Update docs/sources/shared/datasources/sql-query-builder-macros.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Add smoke test for this feature

* lint

* Add supported macros to influx

* Add setupTests.ts to include in tsconfig.json

* Import jest-dom instead of setupTests.ts

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
Zoltán Bedi
2024-11-04 17:13:35 +01:00
committed by GitHub
co-authored by Jack Baldry
parent aacc83be5c
commit 85c696c4ad
39 changed files with 1103 additions and 139 deletions
+4 -4
View File
@@ -21,14 +21,14 @@ export const tablesResponse = {
},
};
export const fieldsResponse = {
export const fieldsResponse = (refId: string) => ({
results: {
fields: {
[refId]: {
status: 200,
frames: [
{
schema: {
refId: 'fields',
refId,
meta: {
executedQueryString:
"SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'DataMaker' AND table_name = 'RandomIntsWithTimes' ORDER BY column_name",
@@ -48,7 +48,7 @@ export const fieldsResponse = {
],
},
},
};
});
export const datasetResponse = {
results: {