From: Rod J. <rod...@in...> - 2003-02-24 20:32:10
|
Guys, I'm impressed with what Thomas has been doing, and I think he should be the lead on the JDBC stuff. However, I know other people have contributions in this area, so it's important we coordinate. Yann, can you please drop a quick email to Thomas when you check your JDBC stuff in? Maybe just forward one of your old emails to the P2P list? Regards, Rod ----- Original Message ----- From: "Thomas Risberg" <tri...@tr...> To: <spr...@li...> Sent: Monday, February 24, 2003 8:16 PM Subject: [Springframework-developer] Changes to jdbc.object.StroredProcedure class > Hi guys, > > I have just joined the group and I'm really looking forward to working > on this framework. Great stuff so far. I have e-mailed Rod with a few > suggestions for the SQLExceptionTranslater functionality, we should be > able to add some of the new features to CVS real soon. > > While testing the changes to the SQLTranslation logic on different > databases I ran across a problem with using the StoredProcedure class > from the jdbc.object package. > > It currently only supports the "{call my_proc(?, ?)}" syntax and this > worked fine for procedures but not for stored functions. With functions > you have to use the following call syntax "{? = call my_func(?)}". Since > all stored procedures in Postgres are declared as functions (CREATE > FUNCTION ...) it was a problem. > > I came up with two solutions, and would like to know which one you would > prefer. > > 1. Add a boolean instance variable isFunction = false to the > StoredProcedure. This could be set to true if the call is to a function > or left false if it is to a procedure. Then the StoredProcedure could > use the correct syntax while it is "compiling" the callString > > 2. Create a StoredFunction class that does the same thing the current > StoredProcedure does, except for the call syntax. We could use > sub-classing to avoid code duplication > > The first solution is simpler and less code, but maybe not as clear as > the second one. > > This would be a good feature not only for Postgres, but for any database > that supports the CREATE FUNCTION feature - Oracle, MS SQL, DB2 ... > > Let me know what you think. > > Also - is anybody working on any other parts of the jdbc package? I'd > be interested to look at other issues, but I don't want to solve/fix > something that someone else is already looking at. > > > -- Thomas > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |