This repository has been archived on 2023-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
gitops-tbrnt/monitoring/vendor/github.com/grafana/grafonnet-lib/grafonnet/sql.libsonnet

24 lines
458 B
Plaintext
Raw Normal View History

2020-02-11 21:21:17 +00:00
{
2020-05-12 17:42:23 +00:00
/**
2020-09-17 19:38:08 +00:00
* Creates an SQL target.
*
2020-05-12 17:42:23 +00:00
* @name sql.target
2020-09-17 19:38:08 +00:00
*
* @param rawSql The SQL query
* @param datasource (optional)
* @param format (default `'time_series'`)
2021-05-01 14:24:35 +00:00
* @param alias (optional)
2020-05-12 17:42:23 +00:00
*/
2020-02-11 21:21:17 +00:00
target(
rawSql,
datasource=null,
format='time_series',
2021-05-01 14:24:35 +00:00
alias=null,
2020-02-11 21:21:17 +00:00
):: {
[if datasource != null then 'datasource']: datasource,
format: format,
2021-05-01 14:24:35 +00:00
[if alias != null then 'alias']: alias,
2020-02-11 21:21:17 +00:00
rawSql: rawSql,
},
}