Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

add optional query string parameter to query #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/InfluxDB/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,9 @@ public function getQuery()
*/
public function getResultSet()
{
return $this->db->query($this->parseQuery());
return $this->db->query($this->parseQuery(),$this->params ?? []);
}


/**
* @return string
Expand Down Expand Up @@ -347,4 +348,15 @@ protected function parseQuery()

return $query;
}
/**
* Add query string parametr to query
*
* @param array $params
*
* @return $this
*/
public function setQueryStringParameter(array $params){
$this->params=$params;
return $this;
}
}