Rob van Maris wrote:
On 6/1/2004, "Mark Huijser" <[EMAIL PROTECTED]> wrote:


Ik think that's a solution for another problem ;-) , the
sqlHandlerSupportsMaxNumber just don't belong there in that particlular
condition.


I think you're missing the point, so I'll explain it here.
InformixSqlHanlder contains this code to test support for various
features:

    public int getSupportLevel(int feature, SearchQuery query) throws
SearchQueryException {
        int result;
        switch (feature) {
            case SearchQueryHandler.FEATURE_MAX_NUMBER:
                result = SearchQueryHandler.SUPPORT_OPTIMAL;
                break;

            default:
                result = super.getSupportLevel(feature, query);
        }
        return result;
    }

Now your problem is that FEATURE_MAX_NUMBER is not supported when the
resulting query uses UNION. This is a bug, because this method has not
been updated when the UNION-code was introduced.

To resolve this issue, simply rewrite the code under case
SearchQueryHandler.FEATURE_MAX_NUMBER to encorporate a test for whether
the resulting query uses a UNION.

Yep, I understand that, and i did. I rewrited the getSupportLevel() I'm checking it in right away. But there's still a problem in the BasicQueryHandler.readNodes() methods: If maxNumber is -1 (which it is when no max is given), and is the sqlHandler does not support MaxNumber, the List of results will never be filled, because both these conditions are false. That what i tried to tell you (probably not clear enough, for which i'm sorry)

Regards,

Mark







Rob van Maris
Technical Consultant

Quantiq
xmedia & communication solutions

Koninginneweg 11-13
1217 KP Hilversum

T    +31 (0)356257211
M    +31 (0)651444006
E    [EMAIL PROTECTED]




Reply via email to