The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/store/entity/sqlstash/sqltemplate/args.go

18 lines
532 B

package sqltemplate
// Args keeps the data that needs to be passed to the engine for execution in
// the right order. Add it to your data types passed to SQLTemplate, either by
// embedding or with a named struct field if its Arg method would clash with
// another struct field.
type Args []any
// Arg can be called from within templates to pass arguments to the SQL driver
// to use in the execution of the query.
func (a *Args) Arg(x any) string {
*a = append(*a, x)
return "?"
}
func (a *Args) GetArgs() Args {
return *a
}