Hi,
Jan's implementation of the test did show another bug: adding a non persistent field, which isn't part of the select seems not to be supported by now. Fixing this bug was simple (not uploaded by now).
According filtering over an calculated Field:
In current state Zeos filters/sorts using the internal resultsets which are loads faster than using the TDataSet-Fields. Using such fields means running into the TDataSet bottleneck of ton's of events and notifications fired by moving the row position, and buffer copies from internals to TField.Data and back into the filter-stack.
If i change (add the fieldcalc condition) Jan's filter conditions to:
Code: Select all
Query.Filter := '(dep_name +'' ''+ dep_address) LIKE ' + QuotedStr('*Krasnodar*');
the test passes fine.
The question was if it is supported... Nope it isn't yet. We could add the support but the performance loss is high.
Do WE need to support that? I don't think so.
May i ask which components did you use before?
Solution 1: We do not support it, change the filter to emulate the calced field inside the filter. -> We just need to document it.
Solution 2: Change the code as described using the TField-values and live with the performance loss. Loads of code for filtering/sorting needs to be rewritten than. The code is untested and a breaking change.
Solution 3: Find a two way solution which increases the maintained code.
What you guy's thinking about?
I'd like to vote for point 1.