55** Type:** tool
66
77### Description
8- A tool that converts natural language into secure and optimized SQL queries, supporting both MySQL and PostgreSQL databases.
8+ A tool that converts natural language into secure and optimized SQL queries, supporting multiple mainstream databases including MySQL, PostgreSQL, Oracle, SQL Server, and Chinese domestic databases (GaussDB, KingbaseES, DM) .
99
1010
1111### 声明
@@ -17,17 +17,26 @@ We are truly grateful for the overwhelming interest in this experimental project
1717### ✨ Core Features
1818
1919#### Multi-Database Support
20- - Native support for MySQL and PostgreSQL syntax differences
20+ - Native support for 7 database types with automatic syntax adaptation
21+ - International databases: MySQL, PostgreSQL, Oracle, SQL Server
22+ - Chinese domestic databases: GaussDB (Huawei), KingbaseES (KINGBASE), DM (Dameng)
2123- Automatic SQL syntax adaptation based on database type (e.g., LIMIT vs FETCH FIRST)
24+ - Schema-aware query generation for databases that support schemas
25+
2226#### Security Mechanisms
23- - Mandatory result set limits (default LIMIT 100)
27+ - Mandatory result set limits (default LIMIT 100, configurable up to 100,000 )
2428- DML operation prohibition (SELECT statements only)
2529- Field whitelist validation (based on database metadata)
2630- Least privilege principle for query execution
2731
2832### Supported Databases
29- MySQL
30- PostgreSQL
33+ - ** MySQL** - Full support with optimized query generation
34+ - ** PostgreSQL** - Native support with schema awareness
35+ - ** Oracle** - Enterprise database with schema support
36+ - ** SQL Server** - Microsoft SQL Server support
37+ - ** GaussDB** - Huawei's enterprise-grade database (openGauss compatible)
38+ - ** KingbaseES** - Kingbase's PostgreSQL-compatible database
39+ - ** DM (Dameng)** - Dameng's Oracle-compatible database
3140
3241### Supported LLMs
3342Compatible with all non-deep-thinking models
@@ -41,35 +50,56 @@ Compatible with all non-deep-thinking models
41501 . Import the rookie_text2data plugin
42512 . Configure basic parameters:
4352
44- | Parameter | Type | Required | Description | Multilingual Support |
45- | ----------------| ----------------| ----------| ---------------------------------------------------| --------------------------|
46- | db_type | select | Yes | Database type (MySQL/PostgreSQL) | CN/EN/PT |
47- | host | string | Yes | Database host/IP address | CN/EN/PT |
48- | port | number | Yes | Database port (1-65535) | CN/EN/PT |
49- | db_name | string | Yes | Target database name | CN/EN/PT |
50- | table_name | string | No | Comma-separated table names (empty for all tables)| CN (format hints) |
51- | username | string | Yes | Database username | CN/EN/PT |
52- | password | secret-input | Yes | Database password | CN/EN/PT |
53- | model | model-selector | Yes | LLM model configuration | CN/EN/PT |
54- | query | string | Yes | Natural language query statement | CN/EN/PT |
55-
56- 3 . Select Model,We recommend using the Qwen-max model. Other models can be tested but deep-thinking models are unsupported.
53+ | Parameter | Type | Required | Description | Multilingual Support |
54+ | ----------------| ----------------| ----------| ----------------------------------------------------------------| --------------------------|
55+ | db_type | select | Yes | Database type (MySQL/PostgreSQL/Oracle/SQL Server/GaussDB/KingbaseES/DM) | CN/EN/PT |
56+ | host | string | Yes | Database host/IP address | CN/EN/PT |
57+ | port | number | Yes | Database port (1-65535) | CN/EN/PT |
58+ | db_name | string | Yes | Target database name | CN/EN/PT |
59+ | table_names | string | No | Comma-separated table names (empty for all tables) | CN (format hints) |
60+ | schema_name | string | No | Schema name (PostgreSQL default: public, Oracle/DM: uppercase username) | CN/EN/PT |
61+ | username | string | Yes | Database username | CN/EN/PT |
62+ | password | secret-input | Yes | Database password | CN/EN/PT |
63+ | model | model-selector | Yes | LLM model configuration | CN/EN/PT |
64+ | query | string | Yes | Natural language query statement | CN/EN/PT |
65+ | limit | number | No | Query result limit (1-100000, default 100) | CN/EN/PT |
66+ | result_format | select | No | Result format (JSON/TEXT, default JSON) | CN/EN/PT |
67+ | custom_prompt | string | No | Custom prompt for fine-tuning query generation | CN/EN/PT |
68+ | with_comment | boolean | No | Include database comments in schema metadata | CN/EN/PT |
69+
70+ 3 . Select Model - We recommend using the Qwen-max model. Other models can be tested but deep-thinking models are unsupported.
57714 . Generate SQL queries using natural language
5872
5973#### SQL Execution Component
60741 . Import the rookie_execute_sql plugin
61752 . Configure basic parameters:
6276
63- | Parameter | Type | Required | Description | Multilingual Support |
64- | ---------------| ----------| ----------| ------------------------------------------| --------------------------|
65- | db_type | select | Yes | Database type (MySQL/PostgreSQL) | CN/EN/PT |
66- | host | string | Yes | Database host/IP address | CN/EN/PT |
67- | port | number | Yes | Database port (1-65535) | CN/EN/PT |
68- | db_name | string | Yes | Target database name | CN/EN/PT |
69- | sql | string | Yes | SQL query to execute | CN/EN/PT |
77+ | Parameter | Type | Required | Description | Multilingual Support |
78+ | ----------------| --------------| ----------| ----------------------------------------------------------------| --------------------------|
79+ | db_type | select | Yes | Database type (MySQL/PostgreSQL/Oracle/SQL Server/GaussDB/KingbaseES/DM) | CN/EN/PT |
80+ | host | string | Yes | Database host/IP address | CN/EN/PT |
81+ | port | number | Yes | Database port (1-65535) | CN/EN/PT |
82+ | db_name | string | Yes | Target database name | CN/EN/PT |
83+ | username | string | Yes | Database username | CN/EN/PT |
84+ | password | secret-input | Yes | Database password | CN/EN/PT |
85+ | schema | string | No | Schema name (PostgreSQL default: public, Oracle/DM: uppercase username) | CN/EN/PT |
86+ | sql | string | Yes | SQL query to execute | CN/EN/PT |
87+ | result_format | select | No | Result format (JSON/TEXT/CSV, default JSON) | CN/EN/PT |
7088
71893 . Click "Execute" to run the SQL statement
7290
91+ ### Database-Specific Notes
92+
93+ #### Chinese Domestic Databases
94+ - ** GaussDB** : Compatible with PostgreSQL protocol, uses SCRAM-SHA-256 authentication
95+ - ** KingbaseES** : PostgreSQL-compatible, supports schema-based organization
96+ - ** DM (Dameng)** : Oracle-compatible, uses Oracle-style schema management
97+
98+ #### Schema Configuration
99+ - ** PostgreSQL/GaussDB/KingbaseES** : Default schema is ` public ` , can be customized
100+ - ** Oracle/DM** : Default schema is the uppercase version of your username (e.g., user ` admin ` → schema ` ADMIN ` )
101+ - ** MySQL/SQL Server** : Schema parameter not required
102+
73103### License
74104
75105This project is licensed under the Apache License 2.0 - see the [ LICENSE] ( LICENSE ) file for details.
0 commit comments