execute_query
Run SQL queries on CockroachDB with customizable parameters, output formats, and row limits. Retrieve results in JSON, CSV, or table format for efficient data handling.
Instructions
Execute a SQL query with optional parameters and formatting.
Args: query (str): SQL query to execute. params (List, optional): Query parameters. format (str): Output format ('json', 'csv', 'table'). limit (int, optional): Limit number of rows returned.
Returns: The query resultset in json or csv format.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
format | No | json | |
limit | No | ||
params | No | ||
query | Yes |
Input Schema (JSON Schema)
{
"properties": {
"format": {
"default": "json",
"title": "Format",
"type": "string"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
},
"params": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Params"
},
"query": {
"title": "Query",
"type": "string"
}
},
"required": [
"query"
],
"title": "execute_queryArguments",
"type": "object"
}