mini\Table\Wrappers\DistinctTable
class
Documentation
Table wrapper that removes duplicate rows
Deduplication is based on the visible columns at the time distinct() was called. Uses TreapIndex for O(1) duplicate detection during iteration.
// Unique roles
$table->columns('role')->distinct();
// Unique role+name combos, then project to role
$table->columns('role', 'name')->distinct()->columns('role');
Inheritance
Extends: mini\Table\Wrappers\AbstractTableWrapper
Implements:
mini\Table\Contracts\TableInterface
Traversable
Countable
IteratorAggregate
mini\Table\Contracts\SetInterface
Properties (4)
Closure $compareFn
int $limit
int $offset
Methods (37)
Documentation missing
Documentation missing
Documentation missing
Distinct of distinct is still distinct - return self
Documentation missing
Generate a unique key for a row based on visible columns
Documentation missing
public
getSource()
inherited from Table\Wrappers\AbstractTableWrapper
Get the source table this wrapper delegates to
public
getProperty()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
hasProperty()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
getColumns()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
getAllColumns()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
columns()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
load()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
protected
getCompareFn()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
eq()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
lt()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
lte()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
gt()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
gte()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
in()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
like()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
order()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
or()
inherited from Table\Wrappers\AbstractTableWrapper
Documentation missing
public
__clone()
inherited from Table\AbstractTable
Hook for subclasses to customize clone behavior
public
getRowKeyColumns()
inherited from Table\AbstractTable
Get column name(s) that the row key represents
public
getLimit()
inherited from Table\AbstractTable
Documentation missing
public
getOffset()
inherited from Table\AbstractTable
Documentation missing
public
withAlias()
inherited from Table\AbstractTable
Documentation missing
public
getTableAlias()
inherited from Table\AbstractTable
Get the current table alias (null if not set)
public
union()
inherited from Table\AbstractTable
Documentation missing
public
except()
inherited from Table\AbstractTable
Documentation missing
public
exists()
inherited from Table\AbstractTable
Documentation missing
public
has()
inherited from Table\AbstractTable
Check if value(s) exist in the table's projected columns
protected
getPrimaryKeyColumn()
inherited from Table\AbstractTable
Get the primary key column definition (cached)
public
final
getIterator()
inherited from Table\AbstractTable
Iterate over rows with visible columns only
public
withProperty()
inherited from Table\AbstractTable
Return table with property set