I have legacy SQL, and I want to break it down into its constituent parts, and then add additional criteria, order order, etc.
Are there any existing Java libraries that interpret SQL as follows?
So I want to do something like
deconstructedSQL.getCriteria().add("price > 100");
or
deconstructedSQL.getOrderBy().add("price");
or
String select = deconstructedSQL.getSelect();
if ("*".equals(select))
{
deconstructedSQL.setSelect("my_table.*");
}
I can use the Dialects of Hibernate, to add information specific to my database for the swap ( setFirstResultand setMaxResult), but I would go one step further.
source
share