Skip to content

feat(sqlquery):支持多条sql查询 - #3234

Open
RankRao wants to merge 6 commits into
hhyo:masterfrom
RankRao:feat-sqlquery
Open

feat(sqlquery):支持多条sql查询#3234
RankRao wants to merge 6 commits into
hhyo:masterfrom
RankRao:feat-sqlquery

Conversation

@RankRao

@RankRao RankRao commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

#1378
#3144

功能优化:SQL查询页面,当前默认支持第一条sql查询,改为支持多条SQL查询。

分割方法:在后端使用sqlparse分割SQL语句;
如果是redis实例,使用换行符分割,即一行为一条命令。

异常处理:对于SQL查询异常或者查询结果没有数据的情况,直接在对应Tab返回对应的异常结果。
例如:错误: test 文档不存在!
没有找到匹配的记录

兜底策略:多条查询会给浏览器带来加载压力,可能导致卡顿,当前限制单次提交最大允许的语句条数为 10 条,超出10条的SQL会被丢弃。
注:DBeaver等数据库客户端单次也只支持20个SQL查询。

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.02%. Comparing base (459c680) to head (b6faf8e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3234      +/-   ##
==========================================
+ Coverage   87.82%   88.02%   +0.20%     
==========================================
  Files         157      157              
  Lines       28486    28649     +163     
==========================================
+ Hits        25018    25219     +201     
+ Misses       3468     3430      -38     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 629063026b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/sqlquery.html Outdated
Comment thread sql/templates/sqlquery.html
Comment thread sql/services/sqlquery_service.py
Comment thread sql/services/sqlquery_service.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63223bafea

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/sqlquery.html

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00a13915eb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/sqlquery.html Outdated
Comment thread sql/services/sqlquery_service.py
Comment thread sql/services/sqlquery_service.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42844303ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread sql/templates/sqlquery.html
@RankRao

RankRao commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@hhyo @LeoQuote 有空帮忙审核一下这个PR,后续会在其他PR增加,收藏功能解耦,也支持多行语句收藏。

#3144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant