Executes the given statement
@param stmt The statement to be executed
@throws JdbcServerException In case that the execution was not successful
2205
@Override
    public DataSet executeStatement(String stmt) throws JdbcServerException {
        log.info("Received execute statement request: " + stmt);
        Message response = handleMessageAndCheckResponse(JdbcMessage.execute(stmt));
        return dataSetCreator.createDataSet(response, getMessageType(response));
    }
9361
public void bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws java.sql.SQLException
    {
        if (cld.getUpdateProcedure() != null)
        {
            this.bindProcedure(stmt, cld, obj, cld.getUpdateProcedure());
        }
        else
        {
            int index = 1;
            ValueContainer[] values, valuesSnapshot;
            // first take a snapshot of current locking values
            valuesSnapshot = cld.getCurrentLockingValues(obj);
            cld.updateLockingValues(obj); // BRJ
            values = getNonKeyValues(m_broker, cld, obj);

            // parameters for SET-clause
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause pk
            values = getKeyValues(m_broker, cld, obj);
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause locking
            // take old locking values
            values = valuesSnapshot;
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
        }
    }
264704
public final void execute()
  {
    _log.debug( _sqlString );

    PreparedStatement lPreparedStatement = null;

    try
    {
      lPreparedStatement = _callableStatementProvider.createPreparedStatement( _sqlString );

      usePreparedStatement( lPreparedStatement );
    }
    catch( SQLException e )
    {
      if( !handleSQLException( e ) )
      {
        throw ExceptionManager.createException( e, _sqlString );
      }
    }
    finally
    {
      if( lPreparedStatement != null )
      {
        try
        {
          lPreparedStatement.close();
        }
        catch( SQLException eSQLException )
        {
          throw ExceptionManager.createException( eSQLException, _sqlString );
        }
      }
    }
  }
1132959
public static int update(PreparedStatement stmt) throws SQLException {
		int rows = stmt.executeUpdate();
		stmt.close();
		return rows;
	}
1267206
VoltTable executePrecompiledSQL(Statement catStmt, Object[] params, boolean replicated)
            throws VoltAbortException {
        // Create a SQLStmt instance on the fly
        // This is unusual to do, as they are typically required to be final instance variables.
        // This only works because the SQL text and plan is identical from the borrowed procedure.
        SQLStmt stmt = new SQLStmt(catStmt.getSqltext());
        if (replicated) {
            stmt.setInCatalog(false);
        }
        m_runner.initSQLStmt(stmt, catStmt);

        voltQueueSQL(stmt, params);
        return voltExecuteSQL()[0];
    }
1147111
protected function _process( $stmt )
	{
		$msg = 'Changing code from "product" to "default" in "mshop_product_type"';
		$this->_msg($msg, 0);

		if ($this->_schema->tableExists('mshop_product_type') )
		{
			$result = $this->_conn->create( $stmt )->execute();
			$cntRows = $result->affectedRows();
			$result->finish();

			if ( $cntRows ) {
				$this->_status( sprintf( 'migrated (%1$d)', $cntRows ) );
			} else {
				$this->_status( 'OK' );
			}
		}
		else
		{
			$this->_status('OK');
		}
	}
788745
@SuppressWarnings("unchecked")
	public static List<String> firstStringRow(PreparedStatement stmt) throws SQLException {
		return (List<String>) firstRow(stmt, String.class);
	}
1311435
protected boolean executeOneCompleteStmt(final String _complStmt)
        throws EFapsException
    {
        final boolean ret = false;
        ConnectionResource con = null;
        try {
            con = Context.getThreadContext().getConnectionResource();
            if (AbstractObjectQuery.LOG.isDebugEnabled()) {
                AbstractObjectQuery.LOG.debug(_complStmt.toString());
            }

            final Statement stmt = con.createStatement();

            final ResultSet rs = stmt.executeQuery(_complStmt.toString());
            new ArrayList<Instance>();
            while (rs.next()) {
                getValues().add(rs.getObject(1));
            }
            rs.close();
            stmt.close();
        } catch (final SQLException e) {
            throw new EFapsException(AttributeQuery.class, "executeOneCompleteStmt", e);
        }
        return ret;
    }
212659
public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld) throws PersistenceBrokerException
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("executeQuery: " + query);
        }
        /*
		 * MBAIRD: we should create a scrollable resultset if the start at
		 * index or end at index is set
		 */
        boolean scrollable = ((query.getStartAtIndex() > Query.NO_START_AT_INDEX) || (query.getEndAtIndex() > Query.NO_END_AT_INDEX));
        /*
		 * OR if the prefetching of relationships is being used.
		 */
        if (query != null && query.getPrefetchedRelationships() != null && !query.getPrefetchedRelationships().isEmpty())
        {
            scrollable = true;
        }
        final StatementManagerIF sm = broker.serviceStatementManager();
        final SelectStatement sql = broker.serviceSqlGenerator().getPreparedSelectStatement(query, cld);
        PreparedStatement stmt = null;
        ResultSet rs = null;
        try
        {
            final int queryFetchSize = query.getFetchSize();
            final boolean isStoredProcedure = isStoredProcedure(sql.getStatement());
            stmt = sm.getPreparedStatement(cld, sql.getStatement() ,
                    scrollable, queryFetchSize, isStoredProcedure);
            if (isStoredProcedure)
            {
                // Query implemented as a stored procedure, which must return a result set.
                // Query sytax is: { ?= call PROCEDURE_NAME(?,...,?)}
                getPlatform().registerOutResultSet((CallableStatement) stmt, 1);
                sm.bindStatement(stmt, query, cld, 2);

                if (logger.isDebugEnabled())
                    logger.debug("executeQuery: " + stmt);

                stmt.execute();
                rs = (ResultSet) ((CallableStatement) stmt).getObject(1);
            }
            else
            {
                sm.bindStatement(stmt, query, cld, 1);

                if (logger.isDebugEnabled())
                    logger.debug("executeQuery: " + stmt);

                rs = stmt.executeQuery();
            }

            return new ResultSetAndStatement(sm, stmt, rs, sql);
        }
        catch (PersistenceBrokerException e)
        {
            // release resources on exception
            sm.closeResources(stmt, rs);
            logger.error("PersistenceBrokerException during the execution of the query: " + e.getMessage(), e);
            throw e;
        }
        catch (SQLException e)
        {
            // release resources on exception
            sm.closeResources(stmt, rs);
            throw ExceptionHelper.generateException(e, sql.getStatement(), null, logger, null);
        }
    }
1040419
public static boolean queryHasResult(Statement stmt, String sql) {
    try {
      ResultSet rs = stmt.executeQuery(sql);
      try {
        return rs.next();
      } finally {
        rs.close();
      }
    } catch (SQLException e) {
      throw new DukeException(e);
    }
  }
447584
void executeStatement(String statement) {

		try (Connection conn = getFastConnection(); Statement stm = conn.createStatement()) {
			stm.execute(statement);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

	}
925988
public static void addStmt(BlockStmt block, Statement stmt) {
        List<Statement> stmts = block.getStmts();
        if (stmts == null) {
            stmts = new ArrayList<Statement>();
            block.setStmts(stmts);
        }
        stmts.add(stmt);
    }
152946
@Override
    public void execute() throws BuildException {
        try {
            ProvisioningFeatureDefinition feature = new SubsystemFeatureDefinitionImpl(null, this.featureManifestFile);
            setProperty(this.appliesToProperty, feature.getHeader("IBM-AppliesTo"));
            setProperty(this.descriptionProperty, feature.getHeader("Subsystem-Description", Locale.ENGLISH));
            String displayName = feature.getHeader("Subsystem-Name", Locale.ENGLISH);
            setProperty(this.displayNameProperty, displayName);
            setProperty(this.strippedDisplayNameProperty, getStrippedAssetName(displayName));
        } catch (IOException e) {
            throw new BuildException(e);
        }
    }
120443
@Override
	public final boolean execute() throws SQLException {
		Split split = prepare();
		try {
			return stmt.execute();
		} finally {
			finish(split);
		}
	}
232532
def _rpc_action_stmt(self, stmt: Statement, sctx: SchemaContext) -> None:
        """"""
        self._handle_child(RpcActionNode(), stmt, sctx)
749097
@SuppressWarnings("unchecked")
	public static List<String> allStrings(PreparedStatement stmt) throws SQLException {
		return (List<String>) all(stmt, String.class);
	}
1182658
def exec_sp(stmt)
      klass = self.class.name
      if klass == 'ActiveRecord::ConnectionAdapters::SQLServerAdapter'
        rex = /^exec(?:ute)?\s+[\["]?(?<PROC>[a-z][a-z0-9_]*)[\]"]?(?<ARGS>\s.*)?$/i
        match = rex.match(stmt)
        if match
          exec_query("DECLARE @RET INTEGER; EXECUTE @RET=[#{match['PROC']}]#{match['ARGS']}; SELECT @RET AS [RET]").first['RET']
        else
          execute stmt
        end
      else
        execute stmt
      end
    end