• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: fetch limit vs FrontBase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetch limit vs FrontBase


  • Subject: Re: fetch limit vs FrontBase
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 05 Mar 2015 16:52:08 +0000
  • Thread-topic: fetch limit vs FrontBase

There is also ERXBatchingDisplayGroup which may or may not suit your needs.

Chuck


On 2015-03-05, 8:48 AM, "Ramsey Gurley" wrote:

ERXSQLHelper has a FrontBaseSQLHelper subclass which implements limitExpressionForSQL(). Assuming that works, you could try

EOFetchSpecification spec = … //your fetch spec here
EOModel model = EOModelGroup.defaultGroup().entityNamed(spec.entityName()).model();
ERXSQLHelper sqlHelper = ERXSQLHelper.newSQLHelper(ec, model.name());
String sql = sqlHelper.limitExpressionForSQL(null, spec, “", start, end);
EOFetchSpecification fs = new EOFetchSpecification(spec.entityName(), null, null);
fs.setHints(new NSDictionary(sql, EODatabaseContext.CustomQueryExpressionHintKey));

On Mar 5, 2015, at 6:16 AM, OC <email@hidden> wrote:

Hello there,
unless I am missing something, it looks like with FrontBase, EOF/Wonder alas limits fetches application-side, e.g., my code
===
        def fs=...
        fs.fetchLimit=1
        ec.objectsWithFetchSpecification(fs)
===
with SQL logging switched on yields a result of
===
14:00:57.072 DEBUG  === Begin Internal Transaction
14:00:57.073 DEBUG  evaluateExpression: <com.webobjects.jdbcadaptor.FrontbasePlugIn$FrontbaseExpression: "SELECT t0."C_EDITED_AUCTION_ID", t0."C_CREATION_DATE", t0."C_CREATOR_ID", t0."C_IP_ADDRESS", t0."C_KIND", t0."C_MARKET_ID", t0."C_TITLE", t0."C_UID", t0."C_EDITED_USER_ID" FROM "T_AUDIT" t0 ORDER BY t0."C_CREATION_DATE" ASC" withBindings: >
14:00:57.592 DEBUG fetch canceled
14:00:57.592 DEBUG 1 row(s) processed
14:00:57.600 DEBUG  === Commit Internal Transaction
===
FrontBase, nevertheless, does support fetch limits with the TOP syntax, e.g., this SQL would work database-level:
===
SELECT TOP(1) t0."C_EDITED_AUCTION_ID", t0."C_CREATION_DATE", t0."C_CREATOR_ID", t0."C_IP_ADDRESS", t0."C_KIND", t0."C_MARKET_ID", t0."C_TITLE", t0."C_UID", t0."C_EDITED_USER_ID" FROM "T_AUDIT" t0 ORDER BY t0."C_CREATION_DATE" ASC
===
Is there anything I could do to fix that my applicatio(s) really use this and don't try to fetch the complete table?
Thanks,
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >fetch limit vs FrontBase (From: OC <email@hidden>)
 >Re: fetch limit vs FrontBase (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: fetch limit vs FrontBase
  • Next by Date: blocking other instances from activity
  • Previous by thread: Re: fetch limit vs FrontBase
  • Next by thread: blocking other instances from activity
  • Index(es):
    • Date
    • Thread