You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by André Rodrigues Pena <an...@gmail.com> on 2007/07/01 10:14:00 UTC

Pagination

Hi all,
I'm new to iBatis. I'd like to see a complete example of how to use
pagination in my queries. I searched google but I didn't find an example
including both query and java example of usage.

Thanks in advance

-- 
André Rodrigues Pena

Re: Pagination

Posted by André Rodrigues Pena <an...@gmail.com>.
Thanks Larry,
What about transaction management? (start, commit, rollback and end). Can I
use it normally?

On 7/1/07, Larry Meadors <lmeadors@apache.org > wrote:
>
> The best example is one that doesn't exist: don't use it. :)
>
> It's not going to be in iBATIS 3 because it's not really part of the
> core of what iBATIS does - mapping data.
>
> Most all modern databases provide similar functionality that will
> perform better, and use fewer resources.
>
> Larry
>
>
> On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> > Hi all,
> > I'm new to iBatis. I'd like to see a complete example of how to use
> > pagination in my queries. I searched google but I didn't find an example
> > including both query and java example of usage.
> >
> > Thanks in advance
> >
> > --
> > André Rodrigues Pena
>



-- 
André Rodrigues Pena

Re: Pagination

Posted by Ashok Madhavan <as...@gmail.com>.
Hi Larry,

I our project for pagination, we use sql. we do the nested select within a
select within a select.

Is there a better way to do it in general and in iBatis.

regards
Ashok

On 7/2/07, Larry Meadors <lm...@apache.org> wrote:
>
> ..unless you can do it in the SQL instead. :)
>
> Some drivers want to bring back all the data before processing it, so
> it can cost you dearly to do this in the Java side.
>
> Larry
>
>
> On 7/2/07, Clinton Begin <cl...@gmail.com> wrote:
> > Right.  Don't use the paginator stuff...but feel free to still use the
> > query limits:
> >
> > queryForList("statement", param, offset, maxrows)
> >
> > clinton
> >
> > On 7/1/07, Larry Meadors <lm...@apache.org> wrote:
> > > The best example is one that doesn't exist: don't use it. :)
> > >
> > > It's not going to be in iBATIS 3 because it's not really part of the
> > > core of what iBATIS does - mapping data.
> > >
> > > Most all modern databases provide similar functionality that will
> > > perform better, and use fewer resources.
> > >
> > > Larry
> > >
> > >
> > > On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> > > > Hi all,
> > > > I'm new to iBatis. I'd like to see a complete example of how to use
> > > > pagination in my queries. I searched google but I didn't find an
> example
> > > > including both query and java example of usage.
> > > >
> > > > Thanks in advance
> > > >
> > > > --
> > > > André Rodrigues Pena
> > >
> >
>

Re: Pagination

Posted by Larry Meadors <lm...@apache.org>.
..unless you can do it in the SQL instead. :)

Some drivers want to bring back all the data before processing it, so
it can cost you dearly to do this in the Java side.

Larry


On 7/2/07, Clinton Begin <cl...@gmail.com> wrote:
> Right.  Don't use the paginator stuff...but feel free to still use the
> query limits:
>
> queryForList("statement", param, offset, maxrows)
>
> clinton
>
> On 7/1/07, Larry Meadors <lm...@apache.org> wrote:
> > The best example is one that doesn't exist: don't use it. :)
> >
> > It's not going to be in iBATIS 3 because it's not really part of the
> > core of what iBATIS does - mapping data.
> >
> > Most all modern databases provide similar functionality that will
> > perform better, and use fewer resources.
> >
> > Larry
> >
> >
> > On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> > > Hi all,
> > > I'm new to iBatis. I'd like to see a complete example of how to use
> > > pagination in my queries. I searched google but I didn't find an example
> > > including both query and java example of usage.
> > >
> > > Thanks in advance
> > >
> > > --
> > > André Rodrigues Pena
> >
>

RE: Pagination

Posted by "Hemant.Kamatgi" <He...@target.com>.
Correct, In our project we've used the below api to achieve pagination successfully.

public List queryForList(String id, Object parameterObject, int skip, int max)

Rgds
HK

-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Monday, July 02, 2007 10:59 AM
To: user-java@ibatis.apache.org; lmeadors@apache.org
Subject: Re: Pagination

Right.  Don't use the paginator stuff...but feel free to still use the
query limits:

queryForList("statement", param, offset, maxrows)

clinton

On 7/1/07, Larry Meadors <lm...@apache.org> wrote:
> The best example is one that doesn't exist: don't use it. :)
>
> It's not going to be in iBATIS 3 because it's not really part of the
> core of what iBATIS does - mapping data.
>
> Most all modern databases provide similar functionality that will
> perform better, and use fewer resources.
>
> Larry
>
>
> On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> > Hi all,
> > I'm new to iBatis. I'd like to see a complete example of how to use
> > pagination in my queries. I searched google but I didn't find an example
> > including both query and java example of usage.
> >
> > Thanks in advance
> >
> > --
> > André Rodrigues Pena
>

Re: Pagination

Posted by Clinton Begin <cl...@gmail.com>.
Right.  Don't use the paginator stuff...but feel free to still use the
query limits:

queryForList("statement", param, offset, maxrows)

clinton

On 7/1/07, Larry Meadors <lm...@apache.org> wrote:
> The best example is one that doesn't exist: don't use it. :)
>
> It's not going to be in iBATIS 3 because it's not really part of the
> core of what iBATIS does - mapping data.
>
> Most all modern databases provide similar functionality that will
> perform better, and use fewer resources.
>
> Larry
>
>
> On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> > Hi all,
> > I'm new to iBatis. I'd like to see a complete example of how to use
> > pagination in my queries. I searched google but I didn't find an example
> > including both query and java example of usage.
> >
> > Thanks in advance
> >
> > --
> > André Rodrigues Pena
>

Re: Pagination

Posted by Larry Meadors <lm...@apache.org>.
The best example is one that doesn't exist: don't use it. :)

It's not going to be in iBATIS 3 because it's not really part of the
core of what iBATIS does - mapping data.

Most all modern databases provide similar functionality that will
perform better, and use fewer resources.

Larry


On 7/1/07, André Rodrigues Pena <an...@gmail.com> wrote:
> Hi all,
> I'm new to iBatis. I'd like to see a complete example of how to use
> pagination in my queries. I searched google but I didn't find an example
> including both query and java example of usage.
>
> Thanks in advance
>
> --
> André Rodrigues Pena