fix(striker-ui-api): output SQL query when debug

main
Tsu-ba-me 2 years ago
parent 3bbc9c03c7
commit 3d6f051a7d
  1. 8
      striker-ui-api/src/lib/accessModule.ts

@ -113,8 +113,12 @@ const dbJobAnvilSyncShared = (
return execModuleSubroutine('insert_or_update_jobs', { subParams }).stdout;
};
const dbQuery = (query: string, options?: SpawnSyncOptions) =>
execAnvilAccessModule(['--query', query], options);
const dbQuery = (query: string, options?: SpawnSyncOptions) => {
// For printing SQL query to debug.
// process.stdout.write(`${query.replace(/\s+/g, ' ')}\n`);
return execAnvilAccessModule(['--query', query], options);
};
const dbSubRefreshTimestamp = () =>
execModuleSubroutine('refresh_timestamp').stdout;

Loading…
Cancel
Save