I have a simple MySQL script that I use in a web application to complete the recovery / reset of my database to a clean initial state. So in this script, I define the various tables, stored procedures, etc. that I need.
This is a pretty good initial b / c solution, it is simple and does the job without overflow. However, there are some disadvantages. One example is input. It would be nice to define stored procs with richer types, so I don't need to repeat declarations like VARCHAR (64).
So my question is: is there a good DSL for manipulating MySQL scripts? (for example, it can ultimately generate valid MySQL scripts), which is actually a good DSL over MySQL, without trying to make too many too many bells and whistles. It would be nice if the language itself had decent DSL support, but more importantly, it would be nice to find something that was not tied to a specific web infrastructure.
Some cursory searches yielded nothing obvious.
I suggest that one practical alternative is to simply use your favorite ORM as a way to get an effective solution. Thus, part of the motivation for this question is to see if the DSL approach has been successfully studied.
source share