Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize: getLastVersionStateMachine sql adds condition 'LIMIT 1' #7184

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from

Conversation

MaoMaoandSnail
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@@ -62,6 +62,10 @@ public String getQueryStateMachinesByNameAndTenantSql(String dbType) {
return queryStateMachinesByNameAndTenantSql;
}

public String getLastVersionStateMachine(String dbType) {
return getQueryStateMachinesByNameAndTenantSql(dbType) + " LIMIT 1";
Copy link
Member

Choose a reason for hiding this comment

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

The LIMIT syntax is not part of the SQL standard, and there are several databases that do not support the LIMIT syntax.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The LIMIT syntax is not part of the SQL standard, and there are several databases that do not support the LIMIT syntax.

OK, I will optimize it.

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.58%. Comparing base (117e57a) to head (9a904ff).
Report is 2 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #7184      +/-   ##
============================================
+ Coverage     51.56%   51.58%   +0.01%     
- Complexity     6812     6815       +3     
============================================
  Files          1169     1169              
  Lines         41482    41505      +23     
  Branches       4851     4857       +6     
============================================
+ Hits          21389    21409      +20     
- Misses        18072    18073       +1     
- Partials       2021     2023       +2     

see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants