ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Pagination by objects
Date Mon, 27 Jul 2009 18:27:54 GMT
Ah, I know what you're talking about.
There's no way to solve that, other than to load less data, or load each
object up separately.  If I'm not mistaken, not even a full ORM will be able
to do that without first building the entire map of keyed relationships.

For example, an ORM could look up all of the unique primary key values,
select the first 1000 out of 200,000, then generate an IN clause and add it
to the join.

You could do the same with iBATIS, but you have to do it manually.

Clinton

On Mon, Jul 27, 2009 at 12:00 PM, John Seer <pulsphoto@yahoo.com> wrote:

>
> >>You could start with the documentation...or even just your IDE code
> >>completion... :-)
>
> >>Look up the queryForList  method signatures..
>
> queryForList  is taking start row number and end row number.
> For example if I have temp table with 200k rows which was build using left
> joins, and if I will ask return from 0, 1000 it will return 6 Objects the
> 6th object will not be complete because the rest of the data is in rows
> from
> 1001-1300
>
> Example of the table
>
> ROW   ID A    B     C  D  E F
> 1        1  null null  0  0  0 0
> 2        1  null null  0  0  0 1
> 3        1  null null  0  0  1 0
> 4        1  null null  0  0  1 1
> 5        1  null null  0  1  0 0
> 6        1  null null  0  1  0 1
> 7        1  null null  0  1  1 0
> 8        1  null null  1  1  0 0
> 9        2  null null  0  0  0 0
> 10      2  null null  0  0  0 1
> 11      2  null null  0  0  1 0
> 12      2  null null  0  0  1 1
> 13      2  null null  0  1  0 0
> 14      2  null null  0  1  0 1
> 15      2  null null  0  1  1 0
> 16      2  null null  1  1  0 0
>
> If I will ask to get from
> queryForList("get", 0,10)
>
> I will get 2 Objects but second object will not be complete
>
>
>
> Clinton Begin wrote:
> >
> > You could start with the documentation...or even just your IDE code
> > completion... :-)
> >
> > Look up the queryForList  method signatures..
> >
> > Clinton
> >
> > On Fri, Jul 24, 2009 at 4:39 PM, John Seer <pulsphoto@yahoo.com> wrote:
> >
> >>
> >> Hello,
> >>
> >> I am using in one of my projects ibatis and have a problem with
> >> pagination.
> >>
> >> For example I want to select 100 objects at a time and skip first 100 of
> >> them. I didn't find any good way of doing it and nothing exciting about
> >> scrolling too.
> >>
> >>
> >> Any suggestion how to achieve/solve my problem?
> >>
> >>
> >> Thanks
> >> John
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> >> For additional commands, e-mail: user-java-help@ibatis.apache.org
> >>
> >>
> >
> >
>
> The
>
> --
> View this message in context:
> http://www.nabble.com/Pagination-by-objects-tp24652955p24685472.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

Mime
View raw message