Skip to content

Condition Filter and Map are now Interfaces #921

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

Merged
merged 15 commits into from
Mar 14, 2025

Conversation

jeffgbutler
Copy link
Member

In #917 we added the ability to implement arbitrary conditions. With this PR, we make that easier to do - primarily by extracting the filter and map methods into interfaces that may or may not be implemented. This makes it easier to implement simple conditions and gives developers more choice over what they implement.

The built-in conditions all implement both filter and map, so there is no impact to existing code.

Verified

This commit was signed with the committer’s verified signature.
jieyouxu 许杰友 Jieyou Xu (Joe)

Verified

This commit was signed with the committer’s verified signature.
jieyouxu 许杰友 Jieyou Xu (Joe)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
# Conflicts:
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsInCaseInsensitive.java
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsInCaseInsensitiveWhenPresent.java
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsLikeCaseInsensitive.java
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsNotInCaseInsensitive.java
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsNotInCaseInsensitiveWhenPresent.java
#	src/main/java/org/mybatis/dynamic/sql/where/condition/IsNotLikeCaseInsensitive.java

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@coveralls
Copy link

coveralls commented Mar 14, 2025

Coverage Status

coverage: 100.0% (+0.08%) from 99.923%
when pulling 7cb17bd on jeffgbutler:improve-conditions
into 3375691 on mybatis:master.

@jeffgbutler jeffgbutler merged commit ea3b0a8 into mybatis:master Mar 14, 2025
7 checks passed
@jeffgbutler jeffgbutler deleted the improve-conditions branch March 14, 2025 20:25
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.

None yet

2 participants