isSingleXXX in AbstractJdbc1Statement
От | Chris Smith |
---|---|
Тема | isSingleXXX in AbstractJdbc1Statement |
Дата | |
Msg-id | 027c01c3f4a6$40b88990$6f00000a@KYA обсуждение исходный текст |
Ответы |
Re: isSingleXXX in AbstractJdbc1Statement
|
Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: