Livestatus\Query: some more filter-related stuff

This commit is contained in:
Thomas Gelf 2014-11-16 16:32:53 +01:00
parent 46b047b013
commit 628597d6cb
1 changed files with 19 additions and 0 deletions

View File

@ -18,6 +18,12 @@ class Query extends SimpleQuery
{
protected $customvars = array();
/**
* Columns in this array are always "combined" ones creating their value
* based on a filter expression. The result is always either "1" or "0"
*/
protected $filter_flags = array();
/**
* Columns that return arrays. Will be decoded.
*/
@ -25,6 +31,11 @@ class Query extends SimpleQuery
'members' => true,
);
/**
* Columns to be fetched for sorting / filtering, will not be returned
*/
protected $extraFiltercolumns = array();
/**
* All available columns. To be overridden by specific query implementations
*/
@ -47,6 +58,14 @@ class Query extends SimpleQuery
return $this->columns;
}
/**
* Whether the named columns value is generated by a filter expression
*/
public function isFilterFlag($column)
{
return array_key_exists($column, $this->filter_flags);
}
/**
* Parse the given encoded array
*