Announcement Announcement Module
Collapse
No announcement yet.
Code generator for stored procedures Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code generator for stored procedures

    Hi there,

    at my current job they have their own framework for calling stored procedures. It works fine however there are issues:

    1. Tightly coupled to their framework.
    2. No unit tests. Basically need to have the app. running which requires a fortune of configuration.

    I have under taken to convert 1 project to use the springframework. There I have gone through 180 stored procedures and don't want to repeat the process again

    I have seen firestorm dao supports code generation(tho testing it seemed to find only 1 stored proc. Not sure if this is cause it's an evaluation version)

    Are there any tools out there that could take the utilize jdbc DataBaseMetadata to generate 50%+ of the code? Ultimately I can write a code generator myself, but would prefer to explore other solutions first.

    Thanks.

  • #2
    Originally posted by demerol View Post
    Are there any tools out there that could take the utilize jdbc DataBaseMetadata to generate 50%+ of the code? Ultimately I can write a code generator myself, but would prefer to explore other solutions first.
    As someone who has been creating and using code generators since around 1997 I would highly recommend you just write your own. I say this because everyone has their own requirements and it's just easier to address those requirements with your own template based code generator rather than trying to use one created by someone else who may not address your requirements.

    Comment


    • #3
      You recommend any libs?

      Only java based code gen lib I know is codemodel which is employed by jaxb. Can you recommend anything else?

      Thanks

      Comment


      • #4
        Originally posted by demerol View Post
        Only java based code gen lib I know is codemodel which is employed by jaxb. Can you recommend anything else?

        Thanks
        Again, I would just recommend writing your own. It's easy enough to query the metadata for the datasource (procedures included) and go from there. This combined with a template engine like fremarker has worked great on several projects I have worked on in the past.

        Comment

        Working...
        X