Hi Andri,
Thanks for your advice. I go to follow it because i'm searching performance in
fetching for my app. I fetch between 2000 and 49000 data.
Ray
Message du : 30/06/2011
De : Andri vonAllmen andri.vonall...@cedes.com
A : naneon.raym...@neuf.fr
Copie à :
Sujet : Re: Antw: Using StoredProcedure
Good morning Ray!
These temporary tables I've mentioned are database tables. They're
created slightly different than normal ones. Something like this (Oracle
DDL):
CREATE GLOBAL TEMPORARY TABLE SOME_TEMP_TABLE ( SOME_ATTRIBUTE
VARCHAR2(5) NOT NULL ) ON COMMIT PRESERVE ROWS -- OR DELETE ROWS
/
You can reverse engineer these tables like normal ones using the
EOModeler in order to create the corresponding enterprise object
classes.
Depending on your needs, you can configure these tables to store the
data for a single transaction only or the whole life-spawn of your db
session. You can even make global temporary tables, providing data for
more than a single db session.
Andri
schrieb am Mittwoch, 29. Juni 2011 um
16:36 in
Nachricht 3795951.581211309358199770.JavaMail.www@wsfrf1212:
Hi Andri,
Thanks for your help,
I want to know the temporary table, it's a class or it's a virtual
table
create automatically by EOFetchSpecification.
a little example code of your tempory table is welcome.
Ray
Message du : 29/06/2011
De : Andri vonAllmen
A : naneon.raym...@neuf.fr
Copie à :
Sujet : Antw: Using StoredProcedure
'loha,
I'm doing it this way:
The stored procedures I'm using do not return data, but they fill
(temporary) tables. If the procedure returns data, it's always an
array
filled with dictionaries and you'll have to cast the data. If using
(temporary) tables, you'll just have to execute the procedure and
you'll be
able to fetch the data as usual afterwards.
Some code:
--
// some dictionary taking the parameters for executing the stored
procedure
NSMutableDictionary dict = new NSMutableDictionary();
// add some parameters (if there are any)
dict.setObjectForKey(someObject, keyForSomeObject);
// execute the stored procedure filling some (temporary) table
EOUtilities.executeStoredProcedureNamed(editingContext(),
yourStoredProcName, dict);
// fetch your data
results = editingContext().objectsWithFetchSpecification(new
EOFetchSpecification(TemporaryTableFilledByStoredProcedure, null,
null));
--
Regards
Andri
PS: My e-mails don't get on the mailing list because of some
reason...just
don't care about that...
schrieb am Mittwoch, 29. Juni 2011 um 13:32 in
Nachricht 27064366.520171309347169380.JavaMail.www@wsfrf1212:
Hi,
I want to know how to use a stored procedure in WO. I created a
configurable
stored procedure that returns more than 2000 data. My question is,
data returned would be EOF or should I cast to an entity? Could
these data
be stored in a WODisplayGroup? What should contain my method to
execute the
stored procedure? A few bits of code would be welcome.
Thanks a lot
--- Disclaimer:
-
This email and contents is for use only by the intended recipient. If
you are
not the individual or entity to whom it is addressed, you are hereby
formally
notified that any use, copying or distribution of this email and
attachments,
in whole or in part, is strictly prohibited. If you have received
this email
in error, please notify the sender and delete the message and
attachment(s)
from your system. Any views, opinions or information, expressed or
contained
in this email, are those of the sender and not necessarily reflect
those of
CEDES. To help protect our environment, please avoid printing out
this
information unnecessarily.
--- Disclaimer:
- This email and
contents is for use only by the intended recipient. If you are not the
individual or entity to whom it is addressed, you are hereby formally
notifi
ed that any use, copying or distribution of this email and
attachments, in whole or in part, is strictly prohibited. If you have
received this email in error, please notify the sender and delete the
message and attachment(s) from your system. Any views, opinions or
information, expressed or contained in this email, are those of the
sender and not necessarily reflect those of CEDES. To help protect our
environment, please avoid printing out this information unnecessarily.
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com