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

Re: EOStoredProcedure


  • Subject: Re: EOStoredProcedure
  • From: Mike Schrag <email@hidden>
  • Date: Mon, 10 Sep 2012 14:51:03 -0400

yes and yes. it's terrible. here's a chunk that might be usefulish:

            EODatabaseContext context = EOUtilities.databaseContextForModelNamed(ec, modelName);
            results = ERXEOAccessUtilities.executeAdaptorChannelOperation(context, 3, new ERXEOAccessUtilities.AdaptorChannelOperation<NSDictionary>() {
            	public NSDictionary execute(EODatabaseContext databaseContext, EOAdaptorChannel channel) throws Exception {
                    EOStoredProcedure procedure = EOUtilities.modelGroup(ec).storedProcedureNamed(storedProcedure);
                    channel.executeStoredProcedure(procedure, params);
                    NSDictionary results = channel.returnValuesForLastStoredProcedureInvocation();
                    if (results == null) {
                        NSDictionary row;
                        while ((row = channel.fetchRow()) != null);
                        results = channel.returnValuesForLastStoredProcedureInvocation();
                    }
                    return results;
            	}
            });


On Sep 10, 2012, at 2:00 PM, Ramsey Gurley <email@hidden> wrote:

> Does anybody use EOStoredProcedure?
>
> It looks like I would need to drop down to the adaptor channel to call executeStoredProcedure, then follow with repeat calls to fetchRow, followed by returnValuesForLastStoredProcedureInvocation. Is the API for this really that terrible? :-)
>
> I see if I model a fetch spec, I can specify a stored procedure on it, but according to the really old WO4 docs I found, there's no way to pass arguments to it. That of course, assumes it even works :-)  I see the StoredProcedureNameHintKey on EODatabaseContext, but I don't see any place where it is ever referenced.
>
> Ramsey
>
>
> _______________________________________________
> 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

  • Follow-Ups:
    • Re: EOStoredProcedure
      • From: Chuck Hill <email@hidden>
References: 
 >EOStoredProcedure (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Eclipse source of problems?
  • Next by Date: Re: EOStoredProcedure
  • Previous by thread: EOStoredProcedure
  • Next by thread: Re: EOStoredProcedure
  • Index(es):
    • Date
    • Thread