@deprecated

@param int $page
@param string|null $query
@param array $params

@return array|bool
343867
public function lists($page = 1, $query = null, array $params = [])
    {
        $this->listPage = $page;
        $this->listQuery = $query;
        $this->listParams = $params;

        return $this->getList();
    }
477656
private function PageRule(Page $page, array $params)
    {
        $lhs = $page->GetUrl();
        foreach ($params as $param)
        {
            $lhs = str_replace('{' . $param . '}', self::PARAM_PATTERN, $lhs);
        }
        
        $rhs = 'index.php';
        $idx = 1;
        
        foreach ($params as $param)
        {
            $rhs .= $idx > 1 ? '&' : '?';
            $rhs .= $param . '=$' . $idx;
            ++$idx;
        }
        $rhs .= '&' . self::PAGE_URL_PARAM . '=' . $page->GetUrl();
        $rule = new RewriteRule($lhs, $rhs);
        $rule->AddFlag(new CommandFlag(FlagType::Qsa()));
        $rule->AddFlag(new CommandFlag(FlagType::L()));
        return $rule;
    }
244109
public function result(string $query, array $params = [])
    {
        // Prepares the query, then stores it
        $PDOStatement = $this->pdo->prepare($query);

        // Executes the prepared query
        $PDOStatement->execute($params);

        // Fetchs the result, then returns it
        return $PDOStatement->fetch();
    }
1283596
public function query($query, $params = [])
    {
        return $this->client->query($this->name, $query, $params);
    }
324667
public function _browseFrom($query, $parameters = [], $cursor = null)
    {
        /** @var \AlgoliaSearch\Laravel\ModelHelper $modelHelper */
        $modelHelper = App::make('\AlgoliaSearch\Laravel\ModelHelper');

        $index = null;

        if (isset($parameters['index'])) {
            $index = $modelHelper->getIndices($this, $parameters['index'])[0];
            unset($parameters['index']);
        } else {
            $index = $modelHelper->getIndices($this)[0];
        }

        $result = $index->browseFrom($query, $parameters, $cursor);

        return $result;
    }
1046793
public function prepareQuery($query = null, array $params = [])
    {
        /** @var StmtInterface $stmt */
        $stmt = parent::prepare($query);
        
        if (count($params) > 0) {
            $stmt->bindParams($params);
        }
        
        return $stmt;
    }
635431
public function queryAndCount(string $query, array $params = []): int
	{
		$prepared = $this->prepare($query, $params);

		$this->execute($prepared);

		return $prepared['statement']->rowCount();
	}
892403
private function prepare($query, $parameters)
    {
        if (!$parameters) {
            $parameters = array();
        } elseif (!is_array($parameters)) {
            $parameters = array($parameters);
        }

        $this->paramNb = 0;
        $this->params = & $parameters;
        $query = preg_replace_callback('/\?/', array($this, 'replaceParam'), $query);

        return $query;
    }
692971
public function toRoute($route = null, $params = array(), $query = array())
    {
        if(!$route)
            return $this->refresh();

        $url = $this->urlFactory->create($route, $params, $query);

        return $this->to($url);
    }
1160023
public function query($query, array $params = [])
    {
        if (!$this->nextQueryIsolationLevel) {
            return $this->retryQuery($query, $params);
        }

        [$oldLevel] = $this->setIsolationLevel($this->nextQueryIsolationLevel);
        $result = $this->retryQuery($query, $params);
        $this->setIsolationLevel($oldLevel);

        return $result;
    }
477350
public function queryResultC($query, $params, $row, $col)
    {
        trigger_error('queryResultC() is deprecated in favour of method chaining, eg $sql->cache($query, $params)->result(0, 0)', E_USER_DEPRECATED);
        return $this->cache($query, $params)->result($row, $col);
    }
716933
protected function prepare($query, $param)
    {
        /**
         * @var \PdoStatement $stmt
         */
        $stmt = $this->db->prepare($query);

        foreach ($param as $set) {
            if (isset($set['value']) || isset($set['name'])) {
                $value = &$set['value'];
                $key   = $set['name'];
            } else {
                $value = &$set[1];
                $key   = $set[0];
            }

            if (!$key) {
                continue;
            }
            $stmt->bindParam($key, $value);
        }

        return $stmt;
    }
63719
public function search($query, $page = 1)
    {
        return $this->get(sprintf(
            'files/search/%s/page/%d',
            rawurlencode(trim($query)),
            $page
        ));
    }
612525
public function query($query, $params = []) {
		
		if(false === is_string($query)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($query)), E_USER_ERROR);
		}

		if(null !== $params && false === is_array($params)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		if(null === $this -> connection) {
			$this -> connect();
		}

		$bind = $this -> parse($params, $query);

		//Write time for debugging
		if(null === $this -> trace) {
			$this -> trace = microtime(true);	
		}
		
		//Prepare statement
		$stmt = $this -> connection -> prepare($query);

		if(false === $stmt) {
			return trigger_error($this -> connection  -> error, E_USER_ERROR);
		}

		if(count($bind) > 0) {

			if(false === ($stmt -> param_count == count($bind) - 1)) {
				return trigger_error('Number of variable elements query string does not match number of bind variables');
			}

			call_user_func_array([$stmt, 'bind_param'], $bind);
		}

		$this -> stmt[] = $stmt;
		$this -> shadow = $this -> stmt;

		return $this;
	}
144406
private function logParamQuery($query, $result, $params) {
		
		$params = (array)$params;

		// indexed is binding with "?" 
		$indexed = $params==array_values($params);

		foreach ($params as $k=>$v) {
			
			if (is_string($v)) $v="'$v'";
			
			$query = $indexed ? preg_replace('/\?/', $v, $query, 1) : str_replace(":$k", $v, $query);
		
		}
		
		$this->logQuery($query, $result);
		
	}
590965
public function executeFetchOne(
        $query = null,
        $params = []
    ) {

        $this->execute($query, $params);
        return $this->fetchOne();
    }
1008844
public function exec($query, array $params = [])
    {
        $this->lastStatement = $this->getPDO()->prepare($query);
        $res                 = $this->lastStatement->execute($this->prepareParams($params));
        $errors              = $this->lastStatement->errorInfo();
        return $res;
    }