feat: add MySQL database support with SQL translation
- Add MySQLConnection class with automatic SQL Server to MySQL translation - Add connection factory to support both SQL Server and MySQL - Update config schema to support MySQL configuration (host, port, db_type) - Update default config to use MySQL (localhost:3306) - Translate table names: [schema].[table] -> schema_table - Translate placeholders: ? -> %s - Translate MERGE statements to INSERT ... ON DUPLICATE KEY UPDATE Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -195,5 +195,9 @@ def get_connection() -> DatabaseConnection:
|
||||
|
||||
Returns:
|
||||
DatabaseConnection: 数据库连接对象
|
||||
|
||||
Note:
|
||||
此函数现在从 connection_factory 导入,以支持 MySQL 和 SQL Server
|
||||
"""
|
||||
return DatabaseConnection()
|
||||
from db.connection_factory import get_connection as factory_get_connection
|
||||
return factory_get_connection()
|
||||
|
||||
Reference in New Issue
Block a user