& Ldquo; Static verification & rdquo; For SQL calls in Java / Eclipse?

Writing Java in Eclipse, I’ve recently been bitten by a few trivial bugs where my SQL syntax has been off (e.g., not properly quoting a constant). Are there any tools I could use to help myself catch these as I write them?

IDEA from Intellij 8.x has an SQL parser that can recognize such things (it connects to a datasource that can read your database, and understands that standard JDBC calls inside Java Code have SQL inside their strings and does the SQL syntax highlighting.

There is at least one
such pluging for Eclipse (very alpha) but I don’t know of any that are even trying to do the highlighting inside the java file the way IDEA does.

In practice, though, unless you are doing direct JDBC interaction, the SQL inside java code has limited usage, as there is often some kind of class in-between, and then IDEA thinks its a plain String.

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 后端存储 » & Ldquo; Static verification & rdquo; For SQL calls in Java / Eclipse?

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录