Override the execute method.

Before we run the query, we need to add pager-based range() instructions
to it.
12277
public function execute()
    {
        if (!$this->preExecute($this)) {
            return;
        }

        // Our custom pager starts with 1 but Drupal starts with 0, we need
        // to apply a delta over the page offset to restore this correctly.
        // But we also another problem, we need to know if the page was set
        // in the query, else the default 1 - 0 + 1 will become a positive
        // offset instead of going to page 0.
        // Note that this makes those datasources not compatible with a custom
        // user-forged request as input...
        $limit  = $this->datasourceQuery->getLimit();
        $offset = $this->datasourceQuery->getOffset();

        $this->totalCount = (int)$this->getCountQuery()->execute()->fetchField();
        $this->range($offset, $limit);

        // Count query has run, now run the query normally.
        return $this->query->execute();
    }
902651
@Override
    @Transactional
    public void run() {
        String storedProc = "purge_obsolete_batch_data";
        boolean result = entityManager.createStoredProcedureQuery(storedProc)
                                      .registerStoredProcedureParameter(0, Integer.class, ParameterMode.IN)
                                      .setParameter(0, 90)
                                      .execute();
        log.info("executed {} : resultset ? {}", storedProc, result);
    }
116363
def _execute_simple_query(self, query):
        
        self._logger.info(u'Execute simple query: [{}]'.format(query))

        # All of the statements in the query are sent here in a single message
        self.connection.write(messages.Query(query))

        # The first response could be a number of things:
        #   ErrorResponse: Something went wrong on the server.
        #   EmptyQueryResponse: The query being executed is empty.
        #   RowDescription: This is the "normal" case when executing a query.
        #                   It marks the start of the results.
        #   CommandComplete: This occurs when executing DDL/transactions.
        self._message = self.connection.read_message()
        if isinstance(self._message, messages.ErrorResponse):
            raise errors.QueryError.from_error_response(self._message, query)
        elif isinstance(self._message, messages.RowDescription):
            self.description = [Column(fd, self.unicode_error) for fd in self._message.fields]
            self._message = self.connection.read_message()
            if isinstance(self._message, messages.ErrorResponse):
                raise errors.QueryError.from_error_response(self._message, query)
642841
protected synchronized void execute() {
    ListParameterization config = new ListParameterization();
    parameterTable.appendParameters(config);
    runButton.setEnabled(false);
    try {
      configureStep(config);
      if(config.hasUnusedParameters()) {
        // List<Pair<OptionID, Object>> remainingParameters =
        // config.getRemainingParameters();
        LOG.warning("Unused parameters: " + "FIXME");
      }
      if(config.getErrors().size() > 0) {
        reportErrors(config);
      }
      else {
        executeStep();
      }
    }
    catch(Exception e) {
      LOG.exception(e);
    }
    updateStatus();
    firePanelUpdated();
  }
629842
protected void executeQueryPrologue(boolean isBatch) throws SQLException {
    executing = true;
    if (closed) {
      throw new SQLException("execute() is called on closed statement");
    }
    protocol.prolog(maxRows, protocol.getProxy() != null, connection, this);
    if (queryTimeout != 0 && (!canUseServerTimeout || isBatch)) {
      setTimerTask(isBatch);
    }
  }
1151008
public function execute()
    {
        $min = func_get_arg(0);
        $max = func_get_arg(1);
        
        $result = $this->value >= $min && $this->value <= $max;
        
        if (!$result) {
            $this->msg = [
                'validator.rule.numberrange',
                [
                    $min,
                    $max
                ]
            ];
        }
    }
55523
def execute(query, **args)
      args = args
             .merge(with_giraph_root(args))
             .merge(with_giraph_resolvers(args))

      super(query, **args)
    end
773975
public function executeQuery()
    {
        try{
            $request = $this->buildRequest();
            if (is_callable($this->eventsList["BeforeExecuteQuery"])) {
                call_user_func_array($this->eventsList["BeforeExecuteQuery"], array(
                    $request,
                    $this->getCurrentAction()
                ));
            }
            $responseInfo = array();
            $response = $this->executeQueryDirect($request, $responseInfo);
            if ($responseInfo['HttpCode'] >= 400) {
                $error = $this->extractError($response);
                throw new Exception($error['Message']);
            }

            if (!empty($response)) {
                $this->processResponse($response);
            }
            $this->requestStatus = ClientRequestStatus::CompletedSuccess;
        }
        catch(Exception $e){
            $this->requestStatus = ClientRequestStatus::CompletedException;
            throw $e;
        }
    }
122004
public PaginatedResult execute(final Query query) {
        final long count = getCount(query);
        decorate(query);
        return new PaginatedResult()
                .objects(query.execute())
                .total(count);
    }
623367
private Object executeExp(PageContext pc, SQL sql, Query qr, Expression exp, int row) throws PageException {
	// print.e("name:"+exp.getClass().getName());
	if (exp instanceof Value) return ((Value) exp).getValue();// executeConstant(sql,qr, (Value)exp, row);
	if (exp instanceof Column) return executeColumn(sql, qr, (Column) exp, row);
	if (exp instanceof Operation) return executeOperation(pc, sql, qr, (Operation) exp, row);
	if (exp instanceof BracketExpression) return executeBracked(pc, sql, qr, (BracketExpression) exp, row);
	throw new DatabaseException("unsupported sql statement [" + exp + "]", null, sql, null);
    }
1109051
@Override
    public boolean execute() throws SQLException
    {
        checkClosed();
        boolean result = this.execute(this.Query.getExecutableQuery(this.parameters));
        this.parameters = this.Query.getParameterArray();
        return result;
    }
56449
protected List<User> executePaginatedQuery(UserQuery query, Integer firstResult, Integer maxResults) {
    if (firstResult == null) {
      firstResult = 0;
    }
    if (maxResults == null) {
      maxResults = Integer.MAX_VALUE;
    }
    return query.listPage(firstResult, maxResults);
  }
967206
def _execute_query(self):
        ''''''
        pipe = self.pipe
        if not self.card:
            if self.meta.ordering:
                self.ismember = getattr(self.backend.client, 'zrank')
                self.card = getattr(pipe, 'zcard')
                self._check_member = self.zism
            else:
                self.ismember = getattr(self.backend.client, 'sismember')
                self.card = getattr(pipe, 'scard')
                self._check_member = self.sism
        else:
            self.ismember = None
        self.card(self.query_key)
        result = yield pipe.execute()
        yield result[-1]
507904
public Query execute(Vector statements, PageContext pc, SQL sql, int maxrows) throws PageException {
	// parse sql
	if (statements.size() != 1) throw new DatabaseException("only one SQL Statement allowed at time", null, null, null);
	ZQuery query = (ZQuery) statements.get(0);

	// single table
	if (query.getFrom().size() == 1) {
	    return testExecute(pc, sql, getSingleTable(pc, query), query, maxrows);

	}
	// multiple table
	throw new DatabaseException("can only work with single tables yet", null, null, null);

    }
991664
@Override
    public void execute() {
        try {
            String str = editor.readLine("Find:");
            editor.findNext(str);
            FindContext.setLastSearch(str);
        } catch (IOException e) {
            //noop
        }
    }
116034
@Override
  public Collection<Range<T>> rangesOverlapping(final Range<T> queryRange) {
    final ImmutableSet.Builder<Range<T>> ret = ImmutableSet.builder();
    for (final Range<T> range : ranges) {
      if (range.isConnected(queryRange) && !range.intersection(queryRange).isEmpty()) {
        ret.add(range);
      }
    }
    return ret.build();
  }
797674
def ExecuteQuery(self, query, args=None):
    """"""

    def Action(connection):
      connection.cursor.execute(query, args)
      rowcount = connection.cursor.rowcount
      results = connection.cursor.fetchall()
      return results, rowcount

    return self._RetryWrapper(Action)