markResultsetIterable example


  protected function getResultsetCurrentRowIndex(): int {
    return $this->resultsetKey;
  }

  /** * Informs the iterator that no more rows can be fetched from the resultset. */
  protected function markResultsetFetchingComplete(): void {
    $this->markResultsetIterable(FALSE);
  }

  /** * Returns the current element. * * @see https://www.php.net/manual/en/iterator.current.php * * @internal This method should not be called directly. */
  public function current(): mixed {
    return $this->resultsetRow;
  }
spl_object_id($this),
        $this->connection->getKey(),
        $this->connection->getTarget(),
        $this->getQueryString(),
        $args ?? [],
        $this->connection->findCallerFromDebugBacktrace()
      );
      $this->connection->dispatchEvent($startEvent);
    }

    $return = $this->clientStatement->execute($args);
    $this->markResultsetIterable($return);

    if (isset($startEvent) && $this->connection->isEventEnabled(StatementExecutionEndEvent::class)) {
      $this->connection->dispatchEvent(new StatementExecutionEndEvent(
        $startEvent->statementObjectId,
        $startEvent->key,
        $startEvent->target,
        $startEvent->queryString,
        $startEvent->args,
        $startEvent->caller,
        $startEvent->time
      ));
    }
if (!$return) {
      $this->throwPDOException();
    }

    // Fetch all the data from the reply, in order to release any lock as soon     // as possible.     $this->data = $statement->fetchAll(\PDO::FETCH_ASSOC);
    $this->rowCount = $this->rowCountEnabled ? $statement->rowCount() : NULL;
    // Destroy the statement as soon as possible. See the documentation of     // \Drupal\sqlite\Driver\Database\sqlite\Statement for an explanation.     unset($statement);
    $this->markResultsetIterable($return);

    $this->columnNames = count($this->data) > 0 ? array_keys($this->data[0]) : [];

    if (isset($startEvent) && $this->connection->isEventEnabled(StatementExecutionEndEvent::class)) {
      $this->connection->dispatchEvent(new StatementExecutionEndEvent(
        $startEvent->statementObjectId,
        $startEvent->key,
        $startEvent->target,
        $startEvent->queryString,
        $startEvent->args,
        $startEvent->caller,
        
Home | Imprint | This part of the site doesn't use cookies.