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

refactor: extract the translation logic from the TranslationMapping class #3780

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Jan 16, 2024

What this PR changes/adds

second refactoring toward the solution of #3736

in this PR the "translation" logic that was implemented in the TranslationMapping hierarchy has been extracted to a new interface FieldTranslator and its hierarchy, while TranslationMapping remains a simple tree data structure that can provide the FieldTranslator to the caller (we could find a better name for it, suggestions welcome)

Why it does that

now that we have the FieldTranslator we can add a method there that can return a WhereClause directly, giving the possibility to translate the whole criteria following the specific SQL implementation

Further notes

Linked Issue(s)

Part of #3736

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@ndr-brt ndr-brt added the refactoring Cleaning up code and dependencies label Jan 16, 2024
@ndr-brt ndr-brt requested review from wolf4ood and jimmarino January 16, 2024 16:32
@ndr-brt ndr-brt force-pushed the 3736-sql-contains-operator branch from 39cdb24 to 62971e9 Compare January 17, 2024 08:27

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ndr-brt ndr-brt force-pushed the 3736-sql-contains-operator branch from ff546df to f450688 Compare January 17, 2024 08:37
@ndr-brt ndr-brt merged commit 99fe10e into eclipse-edc:main Jan 17, 2024
@ndr-brt ndr-brt deleted the 3736-sql-contains-operator branch January 17, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Cleaning up code and dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants