Skip to content

Commit b26126e

Browse files
authored
Add option to remove single columns from wildcard (#533)
1 parent 3f64022 commit b26126e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

meta/Search.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ public function addSchema($table, $alias = '')
9797
public function addColumn($colname)
9898
{
9999
if ($this->processWildcard($colname)) return; // wildcard?
100+
if ($colname[0] == '-') { // remove column from previous wildcard lookup
101+
$colname = substr($colname, 1);
102+
foreach($this->columns as $key => $col){
103+
if ($col->getLabel() == $colname) unset($this->columns[$key]);
104+
}
105+
return;
106+
}
107+
100108
$col = $this->findColumn($colname);
101109
if (!$col) return; //FIXME do we really want to ignore missing columns?
102110
$this->columns[] = $col;

0 commit comments

Comments
 (0)