@Override
    public void end(SQLListenerContext context) {
        Connection connection = context.getConnection();
        if (connection != null && context.getData(AbstractSQLQuery.PARENT_CONTEXT) == null) {
            try {
                connection.close();
            } catch (SQLException e) {
                throw new QueryException(e);
            }
        }
    }
{@code SQLCloseListener} closes the JDBC connection at the end of the query or clause execution
querydsl-sql/src/main/java/com/querydsl/sql/SQLCloseListener.java