Skip to content

Commit 540c105

Browse files
authored
Merge pull request #19 from boyzoid/main
Update index.ts
2 parents b763fe8 + 904cf5c commit 540c105

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,12 @@ const parser = new Parser();
459459

460460
async function getQueryTypes(query: string): Promise<string[]> {
461461
try {
462-
console.log("Parsing SQL query: ", query);
462+
console.error("Parsing SQL query: ", query);
463463
// Parse into AST or array of ASTs
464464
const astOrArray: AST | AST[] = parser.astify(query, { database: 'mysql' });
465465
const statements = Array.isArray(astOrArray) ? astOrArray : [astOrArray];
466466

467-
console.log("Parsed SQL AST: ", statements.map(stmt => stmt.type?.toLowerCase() ?? 'unknown'));
467+
console.error("Parsed SQL AST: ", statements.map(stmt => stmt.type?.toLowerCase() ?? 'unknown'));
468468

469469
// Map each statement to its lowercased type (e.g., 'select', 'update', 'insert', 'delete', etc.)
470470
return statements.map(stmt => stmt.type?.toLowerCase() ?? 'unknown');
@@ -807,4 +807,4 @@ process.on('unhandledRejection', (reason, promise) => {
807807
runServer().catch((error: unknown) => {
808808
console.error('Server error:', error)
809809
safeExit(1)
810-
})
810+
})

0 commit comments

Comments
 (0)