Add postgres schema query to ElectronAPI
Related to #3
Add IPC function to query PostgreSQL schema.
* **src/main.ts**
- Import `Client` from `pg`.
- Add IPC handler `get-pg-schema` to connect to PostgreSQL, execute the specified query, and return the schema information.
* **src/preload.ts**
- Add `getPgSchema` function to the ElectronAPI to invoke the `get-pg-schema` IPC handler.
* **src/types.ts**
- Add `getPgSchema` function definition to the ElectronAPI interface.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/williamcotton/guish/issues/3?shareId=3708c57f-5b64-40a1-837a-89e3f16e1a7e).
合并状态:已合并 合并于 2024-07-30 关闭于 2024-07-30 1 条评论