// 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,
$startEvent->time
));
} return $return;
}