src/PDO/CommandPDOSqlite.php
/**
     * Performs the actual DB query of a SQL statement.
     *
     * @param string $method method of PDOStatement to be called
     * @param array|int|null $fetchMode the result fetch mode.
     * Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php) for valid fetch
     * modes. If this parameter is null, the value set in {@see fetchMode} will be used.
     *
     * @throws Exception|Throwable if the query causes any problem.
     *
     * @return mixed the method execution result.
     */
Performs the actual DB query of a SQL statement.
@param string $method method of PDOStatement to be called
@param array|int|null $fetchMode the result fetch mode.
Please refer to [PHP manual] for valid fetch
modes. If this parameter is null, the value set in  fetchMode will be used.

@throws Exception|Throwable if the query causes any problem.

@return mixed the method execution result.
Performs the actual DB query of a SQL statement . @param string $method method of PDOStatement to be called @param array|int|null $fetchMode the result fetch mode . Please refer to [ PHP manual ] for valid fetch modes . If this parameter is null the value set in fetchMode will be used . @throws Exception|Throwable if the query causes any problem . @return mixed the method execution result .
protected function queryInternal(string $method, array|int $fetchMode = null): mixed
    {
        $sql = $this->getSql() ?? '';
        $params = $this->params;
        $statements = $this->splitStatements($sql, $params);
        if ($statements === false || $statements === []) {
            return parent::queryInternal($method, $fetchMode);
        }
        [$lastStatementSql, $lastStatementParams] = array_pop($statements);
        foreach ($statements as $statement) {
            [$statementSql, $statementParams] = $statement;
            $this->setSql($statementSql)->bindValues($statementParams);
            parent::execute();
        }
        $this->setSql($lastStatementSql)->bindValues($lastStatementParams);
        $result = parent::queryInternal($method, $fetchMode);
        $this->setSql($sql)->bindValues($params);
        return $result;
    }
protected function queryInternal ( string $ method , array | int $ fetchMode = null ) : mixed { $ sql = $ this -> getSql ( ) ?? '' ; $ params = $ this -> params ; $ statements = $ this -> splitStatements ( $ sql , $ params ) ; if ( $ statements === false || $ statements === [ ] ) { return parent :: queryInternal ( $ method , $ fetchMode ) ; } [ $ lastStatementSql , $ lastStatementParams ] = array_pop ( $ statements ) ; foreach ( $ statements as $ statement ) { [ $ statementSql , $ statementParams ] = $ statement ; $ this -> setSql ( $ statementSql ) -> bindValues ( $ statementParams ) ; parent :: execute ( ) ; } $ this -> setSql ( $ lastStatementSql ) -> bindValues ( $ lastStatementParams ) ; $ result = parent :: queryInternal ( $ method , $ fetchMode ) ; $ this -> setSql ( $ sql ) -> bindValues ( $ params ) ; return $ result ; }
Performs the actual DB query of a SQL statement.
Performs the actual DB query of a SQL statement .
/** @var array<string, string> */ /**
         * @psalm-var array<array-key, array> $statements
         */ /**
             * @var string $statementSql
             * @var array $statementParams
             */ /** @var string */