Repository navigation
fix: fix global @explain not effective - #860
Merged
TommyLemon merged 1 commit into
APIJSON:master from
Zhengcy05:fix/fix-global-explain
Jun 11, 2026
Merged
Conversation
Copy link
Copy Markdown
Contributor
Ⅰ. Describe what this PR did
This PR fixes the global @Explain propagation logic in AbstractObjectParser.
Previously, root-level @Explain was parsed correctly as a global option, but when the framework applied global defaults to table objects, it checked globalSchema instead of globalExplain before injecting KEY_EXPLAIN. As a result, global @Explain only worked when global @Schema was also present.
This change updates the condition to check the global explain flag itself, so root-level @Explain now works as documented without depending on @Schema .
Ⅱ. Does this pull request fix one issue?
fixes #851
Ⅲ. Why don't you add test cases (unit test/integration test)?
This repository currently does not have an existing test structure under APIJSONORM/src/test, and this PR keeps the change minimal and focused to a one-line bug fix.
The change was verified by compilation and by tracing the request parsing path against the reported issue scenario.
Ⅳ. Describe how to verify it
Run:
mvn -f APIJSONORM/pom.xml -DskipTests compile
Ⅴ. Special notes for reviews
This is a minimal fix that only corrects the propagation condition for global @Explain .
It does not change:
subquery behavior
object-level @Explain behavior
any SQL generation logic beyond the global default injection path
fix: fix global @Explain not effective
5789d66
TommyLemon
approved these changes
Jun 11, 2026
View reviewed changes
TommyLemon
merged commit
461a5cf
into
APIJSON : master
Jun 11, 2026
1 check passed
Copy link
Copy Markdown
Member
|
@Zhengcy05 Thank you for your contribution~
The HTTP API test cases for APIJSON is on http://apijson.cn/api and http://apijson.cn:8080/api
The admin account 13000082001 is for general cases and 13000088888 is for advanced features and complex cases.
However, this PR is too tiny to run the test cases.
But if you are intrested in, you can run them online or locally deploy the server and the SQL files(Document.sql, TestRecord.sql, Random.sql, Chain.sql, etc for MySQL, PostgreSQL etc) and run them to view the effect.
https://github.com/APIJSON/APIJSON-Demo
|
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
2 participants