Open RonnieHegelund opened 9 years ago
How would you actually find the SQL string to check for validity? Strings constructed by StringBuilders are typically the result of multiple operations. Very simple examples where the StringBuilders does not manipulate the initial SQL string could be checked, but thats not really a realistic use case.
I would look for values in the constructor and on the append method, yes it will only work in simple cases.
Yes, it can be done if you limit yourself to very simple scenarios. But is it really worth the effort? Have you seen many (or any at all) developers using StringBuilder for simple SQL statement construction?
Scope, boys, scope...
well now you can use simple stringbuilder functionality, though I agree this maybe not worth the effort!
It should be possible to parse a stringbuilder for sql string