Capítulo de livro Revisado por pares

An Interactive Tool for Analyzing Embedded SQL Queries

2010; Springer Science+Business Media; Linguagem: Inglês

10.1007/978-3-642-17164-2_10

ISSN

1611-3349

Autores

Aivar Annamaa, Andrey Breslav, Jevgeni Kabanov, Varmo Vene,

Tópico(s)

Logic, programming, and type systems

Resumo

It is conventional for Java developers to access database engines through standard JDBC API which requires passing SQL queries in plain Java strings. This is referred to as embedding of SQL queries into Java. The strings are not checked at compile time, and errors in the queries (e.g. syntax errors or misspelled names) are usually detected only by testing. In this paper we describe a tool which statically analyzes SQL queries embedded into Java programs. It combines a sound syntactic analyzer with a testing facility which generates small tests to detect errors in individual queries and runs them on an actual database engine. The tool is implemented as a plug-in for Eclipse IDE and allows for interactive use in real-life projects.

Referência(s)