private function queryBoolean(string $function, ...$parameters) : bool
    {
        [$result] = $this->query($function, $parameters, false);

        if ($result === null || $result === -1) { // SQLite3 returns -1 when calling a boolean GIS function on a NULL result.
            throw GeometryEngineException::operationYieldedNoResult();
        }

        return (bool) $result;
    }