RE: LIMIT and OFFSET?

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Mon Jul 25 2005 - 08:57:01 EDT

  • Next message: Dhruti Ramani: "Deleting Object from M to M relation"

    If your logic depends on those features, it is probably easiest to use
    an SQLTemplate:

    http://www.objectstyle.org/cayenne/userguide/fetch/sqltemplate.html

    However, you could look into using a paginated query, too:

    http://www.objectstyle.org/cayenne/userguide/perform/paged-queries.html

    /dev/mrg

    -----Original Message-----
    From: Jeff de Vries [mailto:jdevrie..frog.com]
    Sent: Saturday, July 23, 2005 5:05 AM
    To: cayenne-use..bjectstyle.org
    Subject: LIMIT and OFFSET?

    I'm new to Cayenne and have just started looking at using it as a
    replacement for a bunch of JDBC code. The existing code is using SQL
    LIMIT and OFFSET clauses (with an appropriate ORDER BY clause in place)
    to step though groups of records incrementally for display as web
    pages. I think I've found the Cayenne way of doing LIMIT
    (setFetchLimit?), but I can't seem to find the equivalent of OFFSET.
    The underlying database is PostgreSQL 8.

    Thanks,
    Jeff



    This archive was generated by hypermail 2.0.0 : Mon Jul 25 2005 - 08:57:05 EDT