Resets this parse context with the given SQL character sequence.

@param sql a new SQL character sequence to replace the current one
485402
@Override
    void reset(String sql) {

        super.reset(sql);
        compileContext.reset();

        lastError = null;
    }
1165835
public static void closeResultSetStatement(ResultSet resultSet, String sql) {
		if (resultSet != null) {
			try {
				resultSet.getStatement().close();
			} catch (SQLException e) {
				log.log(Level.WARNING, "Failed to close SQL ResultSet: " + sql,
						e);
			}
		}
	}
1100187
private void setQuery(CharSequence query) {
        mQueryTextView.setText(query);
        // Move the cursor to the end
        mQueryTextView.setSelection(TextUtils.isEmpty(query) ? 0 : query.length());
    }
1106968
public static void sqlchar(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException {
    singleArgumentFunctionCall(buf, "chr(", "char", parsedArgs);
  }
621876
public int updateObjByCondition(String sql) {
		//JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder.getDbSource(dbName);
		JdbcTemplate jdbcTemplate =getMicroJdbcTemplate();
		logger.debug(sql);
		Integer retStatus=jdbcTemplate.update(sql);
		return retStatus;
	}
574960
public int update(String sql) {
        String msId = msUtils.update(sql);
        return sqlSession.update(msId);
    }
339843
protected void runSQL(String sql) {
		try {
			DataSource dataSource = commerceWarehousePersistence.getDataSource();

			DB db = DBManagerUtil.getDB();

			sql = db.buildSQL(sql);
			sql = PortalUtil.transformSQL(sql);

			SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
					sql);

			sqlUpdate.update();
		}
		catch (Exception e) {
			throw new SystemException(e);
		}
	}
650434
private void execute(String sql) throws SQLException {
        Statement statement = connection.createStatement();
        try {
            statement.executeUpdate(substitute(sql));
        } finally {
            DbUtils.closeQuietly(statement);
        }
    }
162023
private PreparedStatement prepareBatchStatement(String sql)
    {
        String sqlCmd = sql.substring(0, 7);

        if (sqlCmd.equals("UPDATE ") || sqlCmd.equals("DELETE ") || (_useBatchInserts && sqlCmd.equals("INSERT ")))
        {
            PreparedStatement stmt = (PreparedStatement) _statements.get(sql);
            if (stmt == null)
            {
                // [olegnitz] for JDK 1.2 we need to list both PreparedStatement and Statement
                // interfaces, otherwise proxy.jar works incorrectly
                stmt = (PreparedStatement) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{
                        PreparedStatement.class, Statement.class, BatchPreparedStatement.class},
                        new PreparedStatementInvocationHandler(this, sql, m_jcd));
                _statements.put(sql, stmt);
            }
            return stmt;
        }
        else
        {
            return null;
        }
    }
912486
@Override
    public void set(BindingSetStatementContext<JsonArray> ctx) throws SQLException {
        ctx.statement().setString(ctx.index(), Objects.toString(ctx.convert(converter()).value(), null));
    }
982072
public void reset() throws SQLException {

        try {
            this.sessionProxy.resetSession();
        } catch (HsqlException e) {
            throw Util.sqlException(ErrorCode.X_08006, e.getMessage(), e);
        }
    }
295794
public void setSqlStatementResults(java.util.Collection<SqlStatementResult> sqlStatementResults) {
        if (sqlStatementResults == null) {
            this.sqlStatementResults = null;
            return;
        }

        this.sqlStatementResults = new java.util.ArrayList<SqlStatementResult>(sqlStatementResults);
    }
250720
@SuppressWarnings("unchecked")
	@Override
	public T sqlId(final String sqlId) {
		context().setSqlId(sqlId);
		return (T) this;
	}
1172090
public static boolean restrictQueryExecution(String sql) {
		String[] restrictions = { "delete", "truncate", "update", "drop", "alter" };
		if (sql != null) {
			sql = sql.toLowerCase();
			for (String restriction : restrictions) {
				if (sql.startsWith(restriction)) {
					return true;
				}
				String regex = "\\s+" + restriction + "\\s+";
				Pattern pattern = Pattern.compile(regex);
				Matcher matcher = pattern.matcher(sql);
				if (matcher.find()) {
					return true;
				}
			}
		}
		return false;
	}
1142627
public void clear(SQLiteStatement compiledStatement) {
		clear();
		this.compiledStatement = compiledStatement;
		if (compiledStatement != null) {
			this.compiledStatement.clearBindings();
		}

	}
1008929
public function setSQL($sql)
    {
        $this->sql = $sql;
        $this->pos = 0;
        $this->len = strlen($sql);
    }
367061
@Override
  public void addBatch(String sql) throws SQLException {
    checkClosed();

    if (batchStatements == null) {
      batchStatements = new ArrayList<Query>();
      batchParameters = new ArrayList<ParameterList>();
    }

    // Simple statements should not replace ?, ? with $1, $2
    boolean shouldUseParameterized = false;
    CachedQuery cachedQuery = connection.createQuery(sql, replaceProcessingEnabled, shouldUseParameterized);
    batchStatements.add(cachedQuery.query);
    batchParameters.add(null);
  }