logo
2
1
Login

rookie_text2data

Author: jaguarliuu Version: 1.0.1 Type: tool

Description

A tool that converts natural language into secure and optimized SQL queries, supporting both MySQL and PostgreSQL databases.

声明

We are truly grateful for the overwhelming interest in this experimental project. Your feedback is invaluable for improving this plugin. Join our WeChat group for discussions and collaboration opportunities!

Contact:

  • Wechat: L1763077056

✨ Core Features

​Multi-Database Support

  • Native support for MySQL and PostgreSQL syntax differences
  • Automatic SQL syntax adaptation based on database type (e.g., LIMIT vs FETCH FIRST)

​Security Mechanisms

  • Mandatory result set limits (default LIMIT 100)
  • DML operation prohibition (SELECT statements only)
  • Field whitelist validation (based on database metadata)
  • Least privilege principle for query execution

Supported Databases

MySQL PostgreSQL

Supported LLMs

Compatible with ​all non-deep-thinking models

  • ChatGLM-6B
  • DeepSeek V3
  • Qwen-max ...

Quick Start

SQL Generation Component

  1. Import the rookie_text2data plugin
  2. Configure basic parameters:
ParameterTypeRequiredDescriptionMultilingual Support
db_typeselectYesDatabase type (MySQL/PostgreSQL)CN/EN/PT
hoststringYesDatabase host/IP addressCN/EN/PT
portnumberYesDatabase port (1-65535)CN/EN/PT
db_namestringYesTarget database nameCN/EN/PT
table_namestringNoComma-separated table names (empty for all tables)CN (format hints)
usernamestringYesDatabase usernameCN/EN/PT
passwordsecret-inputYesDatabase passwordCN/EN/PT
modelmodel-selectorYesLLM model configurationCN/EN/PT
querystringYesNatural language query statementCN/EN/PT
  1. Select Model,We recommend using the Qwen-max model. Other models can be tested but deep-thinking models are unsupported.
  2. Generate SQL queries using natural language

SQL Execution Component

  1. Import the rookie_execute_sql plugin
  2. Configure basic parameters:
ParameterTypeRequiredDescriptionMultilingual Support
db_typeselectYesDatabase type (MySQL/PostgreSQL)CN/EN/PT
hoststringYesDatabase host/IP addressCN/EN/PT
portnumberYesDatabase port (1-65535)CN/EN/PT
db_namestringYesTarget database nameCN/EN/PT
sqlstringYesSQL query to executeCN/EN/PT
  1. Click "Execute" to run the SQL statement

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

No description, topics, or website provided.
50.88 MiB
2 forks1 stars6 branches12 TagREADMEOther license
Language
Python83.1%
Jinja15.5%
Dockerfile1.4%