{
  "type": "sql-runner",
  "description": "Named SQL source for descendant components.",
  "hasChildren": true,
  "propsSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "sql": {
        "type": "string",
        "description": "DuckDB SQL query with {{source_name}} and $param_name placeholders. The result becomes available to descendant SQL widgets as {{name}}."
      },
      "name": {
        "type": "string",
        "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
        "description": "Logical source name exposed to descendant SQL widgets via {{name}}."
      },
      "maxRows": {
        "default": 10000,
        "description": "Safety limit appended when the SQL has no LIMIT clause. Defaults to 10000.",
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "required": [
      "sql",
      "name"
    ],
    "description": "Runs a DuckDB query and exposes its result as a named SQL source to descendant components."
  }
}
