R – Maintaining / Auto-generating IBatis SQL Maps

ibatisibatis.netoracle10gorm

I just started a new job and inherited the project from hell.
Hell = {2 years over schedule, overly complex, uses both oracle and sql server}

There are 100+ stored procedures in the Oracle server and each one has a IBatis SQL Map. Some share the same result map. The DBA likes to change stores procs on a daily basis and not tell me.

Question:
Are there any tools out there that can examine all the IBatis SQL Maps in the solution.
Ideally it would verify:

  1. Store Procedure exists
  2. Store Procedure parameters match the ones in the parameter map
  3. Store Procedure result [column names] match the ones in the result map
  4. Store Procedure result is not missing anything specified on the result map
  5. The object property titles in the result map match the ones listed on the result map

Background: I normally use just SQL Server and SubSonic 2.2 as an ORM. This way I just execute a command and my DAL is magically auto-generated, this way if a column that I need is missing I get a nice easy to understand compile time error and not a confusing run time error. Is there a similar tool I could use here?

thanks for your help!

Best Answer

There is a tool called Ibator but I don't think it was intended for what you're describing. My approach would be to create tests which exercise the iBatis code. That way, when a test fails you know something is wrong. Something else you can do is use metadata from Oracle to test for the existence of the procedures, etc. These checks could be additional tests.