• 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
SELECT COUNT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SELECT COUNT


  • Subject: SELECT COUNT
  • From: Benoit Mangez <email@hidden>
  • Date: Fri, 3 Sep 2004 10:58:58 +0200

Hi,

Just a simple question...

I have an huge EOQualifier (build by the user). I would like to perform
a simple SELECT COUNT(*) FROM myEntity WHERE (huge qualifier) without
fetching the corresponding objects.
I can't find a simple way to do this.

I tried to translate the 'huge qualifier' into SQL using the following
code:

				EOAdaptor adaptor = EOAdaptor.adaptorWithModel(anEntity.model());
	            	EOSQLExpressionFactory sqlfac = new
EOSQLExpressionFactory(adaptor);

	sqlfac.createExpression(anEntity).setUseBindVariables(true);
	            	EOSQLExpression sql =
sqlfac.selectStatementForAttributes(new NSArray(anAttribute), false,
fs, anEntity);
	            	System.out.println("sql:"+sql.statement());


This works fine with FrontBase, but with Oracle: the bindings are
missing in sql.statement().

Any ideas ?

Benoit Mangez
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Question about WOPupUpButton
  • Next by Date: RE: SELECT COUNT
  • Previous by thread: RE: problem with selectedObject of EOFormController in Java Client
  • Next by thread: RE: SELECT COUNT
  • Index(es):
    • Date
    • Thread