Added support for running scripts as queries #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a new connection type called 'script'.
It allows running scripts that returns the same JSON format as other data sources. The data is received by printing it to the standard output.
To configure it CONNECTION_STRING must be a path under which the scripts exist. Each script must be flagged for execution.
To run a script create a new query and enter the filename of the script (the path will be automatically concatenated).
Safety Features:
Added support for a connection type called 'url'.
It allows settings URL to retrieve JSON results with the same format as other query runners.
To run a query, the query itself needs to be the URL.
If CONNECTION_STRING is set it will be used as the base URL to which the query is appended. In that case it will enforce that the query is a relative path to the base URL set in CONNECTION_STRING.