Closed
Description
Some data sources plugin, such as the one for Athena, will need to be able to switch database inside the query editor without having to change the connection in the config editor. The query
method in the go sql package takes a variadic function parameter for args, so we should be able to use that to pass additional arguments to the driver.
Unfortunately, the args might differ from plugin to plugin, making it hard to provide proper typings for this. For that reason, I think the Query type needs to take the args as json. Something like this:
type Query struct {
RawSQL string `json:"rawSql"`
Format FormatQueryOption `json:"format"`
Args json.RawMessage `json:args`
...
}