drift icon indicating copy to clipboard operation
drift copied to clipboard

Use .distinct() by default for streams

Open dickermoshe opened this issue 1 year ago • 4 comments

title says it all

dickermoshe avatar Oct 20 '24 23:10 dickermoshe

I strongly agree !!

You could add an indistinct() method if you want it to do a call for every db update regardless of "real" changes or not.

RoarGronmo avatar Oct 25 '24 09:10 RoarGronmo

BTW: Are we sure that the distinct function will catch if there are similarities. I have situations now, in not too complex datasets that the distinct comparison "fails", so I need to provide with "manual" comparing of the datasets to be sure of the outcome. If drift could somehow provide the comparators of the datasets, it would have been very convenient.

The "failed" comparisons, seems to be produced on datasets where there are joins or partly selections in the queries.

So this could be most gracefully fixed by providing the comparators of the resulting objects in queries with joines and partly selections.

RoarGronmo avatar Nov 05 '24 09:11 RoarGronmo

I may post a suggestion that there should be produced comparators on more complex queries...

RoarGronmo avatar Nov 05 '24 10:11 RoarGronmo

If you enables the override_hash_and_equals_in_result_sets option, it will be even better...

See #3326

RoarGronmo avatar Nov 06 '24 09:11 RoarGronmo