I am currently working on a portal application for a restaurant. The backend database used is Mysql and I am using Spring JDBC support for writing data access logic.
Some of my DAOs are cluttered with multiple queries and are getting upto thousand lines of code in size. I think I can reduce the size and complexity by moving some of my logic into a SQL-PSM procedure (Since data binding and glue code in Java is an abomination from hell).
However I do not have DDL rights on the Db and hence cannot create the procedure.
I was wondering if there is a way to create a discard-ableemporary procedure that you can execute directly like a DML statement without having to create it first.
i.e. I want a procedure minus the create keyword, that would do my work, return the result and disappear.
Googled it a lot but couldn't find anything. :'( Just wondering if you folks know an elegant solution.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…