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

Make ApplyFiltering, ApplySorting and ApplyPagination protected virtu… #144

Merged
merged 1 commit into from
May 17, 2021

Conversation

ITDancer13
Copy link
Collaborator

Make ApplyFiltering, ApplySorting and ApplyPagination protected virtual.
Closes #139

Copy link
Collaborator

@hasanmanzak hasanmanzak left a comment

Choose a reason for hiding this comment

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

It's ok. But, we know this would open the way to some veeery unpleasant dependencies in the future, right? As of very very breaking API changes...

@ITDancer13
Copy link
Collaborator Author

Mhm you're right. Didn't think about that point in this case. But I think we need to open Sieve. When I take a look at some of our projects, which are based on Sieve, we had to implement some ugly workarounds, too.

Pros and cons...

@hasanmanzak
Copy link
Collaborator

Tell me about it :) I had to write a veeery fat builder for multiple entities including using a runtime compiler..

Copy link
Owner

@Biarity Biarity left a comment

Choose a reason for hiding this comment

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

Hm I'm happy with this change, however my general outlook is to implement any extensions ourselves rather than declaring a "wontfix" and leaving developers to manually override these methods.

Eg. the skip/top request in #138 - rather than make Sieve more extensible through this PR, we can just implement skip/top as a core part of Sieve.

The reality is there is not an infinite amount of ways to sort/filter/paginate/select, there is only a few practical ways - so it might be worth us directly implementing them to keep quality up and uphold the "out of the box" claim in the readme! I'd be interesting in hearing about workarounds you guys have had to make as that's exactly what we should tackle :)

@ITDancer13
Copy link
Collaborator Author

I like the idea to put as much as possible to Sieve. Maybe we should think about splitting the SieveProcessor (which does most oft the work now) into smaller pieces to tackle it. But maybe we should start a discussion about "How to make Sieve more flexible" ;-)

But I think that Sieve should still be as extensible as possible. There will be edge cases which we won't support by our core implementation.

@ITDancer13 ITDancer13 added this to the v2.5 milestone May 17, 2021
@ITDancer13 ITDancer13 merged commit 7542ec0 into releases/2.5.0 May 17, 2021
@ITDancer13 ITDancer13 deleted the #releases-2.5.0/apply-protected branch May 17, 2021 06:58
@Biarity
Copy link
Owner

Biarity commented May 17, 2021

I'm fully on board with splitting up the SieveProcessor - perhaps by separating the sorting, filtering, and pagination bits entirely. I think I saw an issue for it a while back but can't find it now

I think we should list up some scenarios that Sieve can't handle right now and use that to decide next steps, eg. #146

ITDancer13 added a commit that referenced this pull request Aug 29, 2021
* Setup release 2.5.0 with automated build and pre-releases

* #80 added support for escaping pipe control characters (#113)

* #80 added support for escaping comma and pipe control characters

* Update SieveModel.cs

Fix build. Accidentally broken by resolving conflicts.

* Migrate UnitTests to xUnit

Co-authored-by: Clayton Andersen <[email protected]>
Co-authored-by: ITDancer13 <[email protected]>
Co-authored-by: ITDancer139 <[email protected]>

* SieveProcessor.Options made protected property (#134)

Mapper assignment in constructor is moved to a null-coalescing member pair (a field and a property)
"IncludeScopes" switch is removed from appSettings.{env}.json files

* Revert to _mapper assignment in constructor. (#140)

* reverting fix (#142)

* Revert to _mapper assignment in constructor.

* reverting fix

* pass filter values as parameters (#112)

make GetClosureOverConstant really work

* Make ApplyFiltering, ApplySorting and ApplyPagination protected virtual #139 (#144)

* stop excluding null values when filtering using notEqual (#114)

* stop excluding null values when filtering using notEqual
* add IgnoreNullsOnNotEqual config field, to enable/disable the new feature

Co-authored-by: AnasZakarneh <[email protected]>

Co-authored-by: Clayton Andersen <[email protected]>
Co-authored-by: Clayton Andersen <[email protected]>
Co-authored-by: ITDancer139 <[email protected]>
Co-authored-by: Hasan Manzak <[email protected]>
Co-authored-by: alicak <[email protected]>
Co-authored-by: AnasZakarneh <[email protected]>
Co-authored-by: AnasZakarneh <[email protected]>
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.

Make ApplyFiltering, ApplySorting and ApplyPagination protected virtual
3 participants