Issue #60 resolved

ExtendedCommand (e.g backup) not supported on stmt.execute(string)

James Arlow avatarJames Arlow created an issue

The backup command does not work with:

Statement#execute(String);

Looking at the code of Stmt.class, #execute(String) does not include the interpretted code from #executeUpdate(String).

While not a technical violation of the contract as defined in the core JDBC javadocs (which don't discuss interpreted extensions such as this). This seems to me to be a violation of the design principals, and user expectations, succinctly described here:

http://www.coderanch.com/t/301594/JDBC/databases/Difference-execute-executeQuery-executeUpdate

My primary argument for change would be that it inhibits the ability of such code to be included in interpreted responses to batch SQL operations. Normal SQL code can #execute() first, and then use the result to see if a direct call via #executeQuery() or #executeUpdate() would have been appropriate. This implementation requires foreknowledge of the statement type to be paired in advance.

If it's not to be changed, it should at least be flagged in the documentation/wiki.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.