query-table
Retrieve, filter, paginate, and sort data from PostgreSQL tables using precise WHERE conditions, array matches, and LIKE patterns for efficient database queries.
Instructions
Query data from a specific table with filtering, pagination, and sorting. Supports WHERE conditions with exact matches, arrays (IN), and LIKE patterns.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
columns | No | ||
pagination | No | ||
sort | No | ||
table | Yes | ||
where | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"columns": {
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
},
"pagination": {
"additionalProperties": false,
"properties": {
"limit": {
"default": 50,
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"offset": {
"default": 0,
"minimum": 0,
"type": "integer"
}
},
"type": "object"
},
"sort": {
"additionalProperties": false,
"properties": {
"column": {
"minLength": 1,
"type": "string"
},
"direction": {
"default": "ASC",
"enum": [
"ASC",
"DESC"
],
"type": "string"
}
},
"required": [
"column"
],
"type": "object"
},
"table": {
"minLength": 1,
"type": "string"
},
"where": {
"additionalProperties": {},
"type": "object"
}
},
"required": [
"table"
],
"type": "object"
}