Added check for connection autocommit status

This commit is contained in:
Randy Gelhausen 2016-11-24 17:57:05 -05:00
parent b7307d49de
commit 1cf1ce3ba7
2 changed files with 7 additions and 1 deletions

View file

@ -25,7 +25,11 @@ limitations under the License.
## Overview
JDBC interpreter lets you create a JDBC connection to any data sources seamlessly. By now, it has been tested with:
JDBC interpreter lets you create a JDBC connection to any data sources seamlessly.
Inserts, Updates, and Upserts are applied immediately after running each statement.
By now, it has been tested with:
<div class="row" style="margin: 30px auto;">
<div class="col-md-6">

View file

@ -462,6 +462,8 @@ public class JDBCInterpreter extends Interpreter {
msg.append(UPDATE_COUNT_HEADER).append(NEWLINE);
msg.append(updateCount).append(NEWLINE);
}
//In case user ran an insert/update/upsert statement
if (connection.getAutoCommit() != true) connection.commit();
} finally {
if (resultSet != null) {
try {