G'morning (or as appropriate for your time zone),
I'm working on refactoring some code from AbstractJdbc1Statement, and there
are comments and design all over the place indicating or assuming that the
isSingleStatement, isSingleDML, and isSingleSelect methods are terribly
expensive. As far as I can see, though, they aren't! isSingleStatement is
implicitly calculated when parsing the query, and the other two involve a
single calls to each of String.trim, String.toLowerCase, and
String.startsWith. I suppose the String.toLowerCase might be an issue for
absolutely gigantic queries, but it looks like we could deal with that by
simply doing a substring to grab the first seven letters before doing the
compare.
Anyone disagree?
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation