Start a query monitor.

@param string $query The SQL to be executed.

@return  void

@since  3.5
551905
public function start(string $query): void
    {
        foreach ($this->monitors as $monitor) {
            $monitor->start($query);
        }
    }
1063799
public function querySafe($query) {
        if ($this->state === self::STATE_SHEDULED) {
            $this->state = self::STATE_STARTED;
            $this->begin();
        }
        return $this->query($query);
    }
903932
private function runQuery($query)
    {
        $resultSetMapping = (new ResultSetMapping())
                ->addScalarResult('id', 'id')
                ->addScalarResult('type', 'type')
                ->addScalarResult('date', 'date');
        
        return $this->em->createNativeQuery($query, $resultSetMapping)
                ->getArrayResult();
    }
974621
protected function setQuery($query)
    {
        if (is_array($query)) {
            $query = http_build_query($query);
        }
        
        if (!$this->isValidQuery($query)) {
            throw new \InvalidArgumentException("Invalid query '$query'");
        }
        
        $this->query = (string)$query;
    }
1298721
public function startQuery($sql, array $params = null, array $types = null)
    {
        $this->logger->addDebug($sql);
        $this->startTime = microtime(true);
    }
385206
public function buildQuery($query)
    {
        $q = $this->request->getQuery();

        foreach ($query as $key => $value)
        {
            $q[$key] = $value;
        }
    }
89063
protected function startQuery()
    {
        $sessionOK = $this->initialiseSession();
        if ($sessionOK) {
            $searchReplyString = $this->fetchURL($this->pazpar2SearchURL());
            $searchReply = GeneralUtility::xml2array($searchReplyString);

            if ($searchReply) {
                $status = $searchReply['status'];
                if ($status === 'OK') {
                    $this->queryIsRunning = true;
                } else {
                    GeneralUtility::devLog('pazpar2 search command status is not "OK" but "' . $status . '"', 'pazpar2', 3);
                }
            } else {
                GeneralUtility::devLog('could not parse pazpar2 search reply', 'pazpar2', 3);
            }
        }
    }
23144
protected function query_start($sql, array $params = null, $type, $extrainfo = null) {
        parent::query_start($sql, $params, $type, $extrainfo);
    }
334486
public function query($query, $params = []) {
		$statement = $this->get_statement($query, $params);
		$statement->execute();
	}
1344348
public function setQuery($query)
    {
        $this->query = $query;
        parse_str($this->query, $this->query_array);
        return $this;
    }
343706
public function start()
    {
        $command = $this->client->createCommand('MONITOR');
        $this->client->executeCommand($command, $this);
    }
195563
public function statements(string $query)
    {
        try {
            $this->pdo->exec($query);
        } catch (\Throwable $exception) {
            throw static::wrapException($exception, $query);
        }
    }
465071
public function executeNone(string $query): int
  {
    $this->realQuery($query);

    $n = $this->mysqli->affected_rows;

    if ($this->mysqli->more_results()) $this->mysqli->next_result();

    return $n;
  }
831101
public function query($query)
    {
        // Replace prefix placeholder with prefix
        $query = str_replace("{prefix}", $this->prefix, $query);

        // Log last query and query count
        $this->lastQuery = $query;
        $this->queryCount++;

        // Query database
        return $this->connection->query($query);
    }
459998
protected function executeDatabaseQuery($query)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $database->execute($query);
    }
1244120
private function setProperties($query)
    {
        foreach ($query as $property => $value) {
            if (property_exists(get_called_class(), $property)) {
                $this->$property = $value;
            }
        }
    }
561713
protected function log(string $query, array $params, float $start): void
	{
		$time = microtime(true) - $start;

		$query = $this->prepareQueryForLog($query, $params);

		$this->log[] = ['query' => $query, 'time' => $time];
	}