Livestatus\Connection: discover column headers...
...in case the query doesn't know about
This commit is contained in:
parent
8ec8c153dd
commit
e755b37af3
|
@ -248,6 +248,15 @@ class Connection
|
||||||
return $buffer;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function discoverColumnHeaders($query)
|
||||||
|
{
|
||||||
|
if ($query->hasColumns()) {
|
||||||
|
$this->headers = $query->getColumnAliases();
|
||||||
|
} else {
|
||||||
|
$this->headers = $this->splitLine($this->readLineFromSocket());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function readLineFromSocket()
|
protected function readLineFromSocket()
|
||||||
{
|
{
|
||||||
if ($this->bytesRead === $this->responseSize) {
|
if ($this->bytesRead === $this->responseSize) {
|
||||||
|
|
Loading…
Reference in New Issue