Livestatus\Query: some more filter-related stuff
This commit is contained in:
parent
46b047b013
commit
628597d6cb
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue