so we can skip some sql statements by regex pattern, such as: we do not want run delete/update/drop statements on production environment. just call ResourceDatabasePopulator.ignoreDeleteUpdateDrop to lock sqlIgnorePattern=^\s*(delete|drop|update).+
sorry for my poor english...and someone please help me fix the english javadocs!
Comment From: quaff
I think it's a specific use case, your application should handle it, not framework.
Comment From: quaff
Create a custom Resource
implementation (e.g. SqlSafeResource
) is better.
Comment From: qxo
I think it's a specific use case, your application should handle it, not framework.
It'll be great if this feature native ready by the spring framework :)
SqlSafeResource is a better naming. And with the InitSqlFilter for mini modify:)
Comment From: snicoll
I agree with @quaff, and the high-level method to ignore drops if the line starts with drop
looks very specific to me. In general, skipping something by regexp is better done in a project where such assumption about the format can be done.
Thanks for the PR, in any case!