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

enhancement(result-set): only query table constraints when it's necessary #2958

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

LuckyPickleZZ
Copy link
Collaborator

What type of PR is this?

type-enhancement

What this PR does / why we need it:

When editing result set, ODC would always query constraints. Sometimes this is not necessary. Like only edit rows with rowid.

Which issue(s) this PR fixes:

Fixes #2952

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


yhilmare
yhilmare previously approved these changes Jul 12, 2024
Copy link
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

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

lgtm

PeachThinking
PeachThinking previously approved these changes Jul 12, 2024
Copy link
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

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

lgtm

@yhilmare yhilmare merged commit 502bf7e into dev/4.3.x Jul 22, 2024
7 checks passed
@yhilmare yhilmare deleted the wenmu_431_enhancement_lazy_load_constraints branch July 22, 2024 06:26
* @date: 2024/7/11
*/
public class Lazy<T> {
private static final Object NO_INIT = new Object();
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, Lazy may not give accurate meaning of the class intend to do. This class want to provide a delayed function call if needed. It's more like a local cache, if missing then provide a value use provider.
If supplier call returns NO_INIT, get method will be always invoked. Get method seems not a high frequent access function. So move synchronized keyword to method declare, use init flag to control supplier get seems more reasonable

@LuckyPickleZZ LuckyPickleZZ restored the wenmu_431_enhancement_lazy_load_constraints branch July 24, 2024 09:01
@LuckyPickleZZ LuckyPickleZZ deleted the wenmu_431_enhancement_lazy_load_constraints branch July 24, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Developed
Development

Successfully merging this pull request may close these issues.

5 participants