(conn: pg.PoolClient)
| 64 | } |
| 65 | |
| 66 | async function mainShellLoop(conn: pg.PoolClient) { |
| 67 | while (true) { |
| 68 | const query = await promptForQuery(); |
| 69 | if (query.toLowerCase() === ".exit") { |
| 70 | break; |
| 71 | } |
| 72 | |
| 73 | if (query === "") { |
| 74 | continue; |
| 75 | } |
| 76 | |
| 77 | if (await confirmDangerousQuery(query)) { |
| 78 | await interactiveExecuteQuery(query, conn); |
| 79 | } else { |
| 80 | logger.info(clc.yellow("Query cancelled.")); |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | type ShellOptions = Options & { service?: string; location?: string }; |
| 86 |
no test coverage detected
searching dependent graphs…