Skip to content

Commit 68ed02f

Browse files
committed
remove prompt
1 parent ba2fa77 commit 68ed02f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

aiq.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ async function executeWithRetries(adapter, query, client, prompt) {
247247
}
248248

249249

250-
async function processQuery(dbConfigs, connectionNameOrFile, command, client, prompt = true) {
250+
async function processQuery(dbConfigs, connectionNameOrFile, command, client) {
251251
const connectionConfig = await getConnectionConfig(dbConfigs, connectionNameOrFile);
252252
const adapter = getDatabaseAdapter(connectionConfig.type, connectionConfig.config);
253253

@@ -256,7 +256,7 @@ async function processQuery(dbConfigs, connectionNameOrFile, command, client, pr
256256
const shouldExecute = await handleUserPrompt(queryObj, adapter);
257257

258258
if (shouldExecute) {
259-
await executeWithRetries(adapter, queryObj.query, client, prompt);
259+
await executeWithRetries(adapter, queryObj.query, client, USE_PROMPT);
260260
} else {
261261
consoleLog("Query execution aborted by user.");
262262
}
@@ -459,7 +459,7 @@ async function handleExecuteQuery(args, prompt) {
459459
const command = args.slice(1).join(" ");
460460
const dbConfigs = await loadConfig();
461461
const client = await setupClient(command);
462-
await processQuery(dbConfigs, connectionNameOrFile, command, client, prompt);
462+
await processQuery(dbConfigs, connectionNameOrFile, command, client);
463463
if (prompt) {
464464
await promptForCommands(dbConfigs, connectionNameOrFile, client);
465465
}

0 commit comments

Comments
 (0)