import { type BlockExecutor } from '../orchestration-schema.js'; /** * @serverBlockDoc * { * "version": 1, * "functionName": "schema", * "displayName": "读取数据库结构", * "category": "database", * "description": "读取 datasource 当前默认 schema/database 的基础表和列信息。", * "inputs": [ * { "key": "datasource", "type": "string", "required": true, "description": "数据源名称,对应 ${datasource}_DATABASE_URL。" } * ], * "outputs": [ * { "key": "tables", "type": "DatabaseSchemaTable[]", "description": "表结构数组,包含表名和列信息。" } * ], * "errors": [ * { "code": "BLOCK_DATABASE_TYPE_MISSING", "description": "执行器未获得数据库类型。" } * ], * "config": [], * "runtime": [ * { "key": "requiresDatasource", "type": "boolean", "value": true, "description": "需要 datasource,并使用 information_schema 或 pg_catalog 查询结构。" } * ], * "examples": [ * { "title": "读取 Mokelay 数据库结构", "block": { "uuid": "schema_block", "functionName": "schema", "inputs": { "datasource": "Mokelay" }, "outputs": ["tables"], "nextBlock": null } } * ] * } */ export declare const executeSchemaBlock: BlockExecutor;