Re: Fetching Specified "Raw Rows" with SelectQuery

From: Andrew Lindesay (ap..indesay.co.nz)
Date: Sun Apr 25 2010 - 06:33:48 EDT

  • Next message: Aristedes Maniatis: "Re: Fetching Specified "Raw Rows" with SelectQuery"

    Hello Andrus;

    > Not impossible, but is indeed rather involved and I don't see much point doing it.

    I worked through SelectTranslator.appendQueryColumns(..) and I assume this method would require quite a bit of re-hashing -- yes; looks like hard work to change!

    In actual fact, I want to get the primary keys so that I can randomly page-through a list of ObjectId-s faulting a page at a time. Looking at SelectTranslator.appendIdColumns, this may happen to mostly give me the behaviour I need. I see this is tied to "setPageSize()" where the feature assumes linear pagination through a result-set of indeterminate size. The problem is that I want to know the size of the result-set so I know how many pages to present.

    Does there exist a mechanism to get the size of the results-set when in "pagination mode" at all or does one have to just page through [prev|next] until you hit the end? Failing that, would it be possible for me to alter "SelectQuery" and "SelectTranslator" to allow an option where only the primary keys for the query-root were returned in "data rows" mode?

    > I see. Here is this branch location:
    > https://svn.apache.org/repos/asf/cayenne/main/branches/STABLE-3.0/

    Sorry; wrong terminology -- I am working off that one at the moment.

    cheers.

    ___
    Andrew Lindesay
    www.silvereye.co.nz



    This archive was generated by hypermail 2.0.0 : Sun Apr 25 2010 - 06:34:37 EDT