@Override public Map<String, Object> syncExecImpl(Map<String, Object> parameters) throws Exception { try (Connection connection = getDataSource().getConnection()) { try (PreparedStatement preparedStatement = connection.prepareStatement(getQuery())) { int i = 0; for (String parameterName : getParameterNames()) { Object value = parameters.get(parameterName); if (value instanceof VString) { preparedStatement.setString(i+1, ((VString) value).getValue()); } else if (value instanceof VNumber) { preparedStatement.setDouble(i+1, ((VNumber) value).getValue().doubleValue()); } else { throw new RuntimeException("JDBC mapping support for " + value.getClass().getSimpleName() + " not implemented"); } i++; } if (isResultQuery()) { ResultSet resultSet = preparedStatement.executeQuery(); VTable table = resultSetToVTable(resultSet); return Collections.<String, Object>singletonMap(getResults().get(0).getName(), table); } else { preparedStatement.execute(); return new HashMap<>(); } } } catch (Exception ex) { throw ex; } }