mirror of
https://github.com/executeautomation/mcp-database-server.git
synced 2025-12-09 21:12:57 +08:00
MySQL Adaptor: Using information_schema to get list of tables
This commit is contained in:
@@ -133,7 +133,7 @@ export class MysqlAdapter implements DbAdapter {
|
|||||||
* Get database-specific query for listing tables
|
* Get database-specific query for listing tables
|
||||||
*/
|
*/
|
||||||
getListTablesQuery(): string {
|
getListTablesQuery(): string {
|
||||||
return "SHOW TABLES";
|
return `SELECT table_name AS name FROM information_schema.tables WHERE table_schema = '${this.database}'`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user