Why This Matters
several SQL tools repeat the exact same "database defaulted to system DB" warning logic.
Read First
app/tools/AzureSQLCurrentQueriesTool/__init__.py
app/tools/AzureSQLSlowQueriesTool/__init__.py
app/tools/PostgreSQLCurrentQueriesTool/__init__.py
app/tools/PostgreSQLSlowQueriesTool/__init__.py
app/tools/MySQLCurrentProcessesTool/__init__.py
app/tools/MariaDBProcessListTool/__init__.py
Scope
- Add one helper under
app/tools/utils/ that takes the default database name and returns the warning string.
- Migrate the six tool wrappers above to use that helper.
- Do not change the warning text beyond making it consistent.
Tests / Coverage
- extend the six existing tool test modules
- add one small direct test module for the new helper
- assert the warning is present only when the database argument was omitted
Acceptance Criteria
- the repeated warning string is built in one place
- all six tools still expose the same response key
- tests prove warning behavior did not change
Why This Matters
several SQL tools repeat the exact same "database defaulted to system DB" warning logic.
Read First
app/tools/AzureSQLCurrentQueriesTool/__init__.pyapp/tools/AzureSQLSlowQueriesTool/__init__.pyapp/tools/PostgreSQLCurrentQueriesTool/__init__.pyapp/tools/PostgreSQLSlowQueriesTool/__init__.pyapp/tools/MySQLCurrentProcessesTool/__init__.pyapp/tools/MariaDBProcessListTool/__init__.pyScope
app/tools/utils/that takes the default database name and returns the warning string.Tests / Coverage
Acceptance Criteria