GroupedSelection
class GroupedSelection extends Selection
Representation of filtered table grouped by some column.
GroupedSelection is based on the great library NotORM http://www.notorm.com written by Jakub Vrana.
Properties
protected Selection | $refTable | ||
protected mixed | $refCacheCurrent | ||
protected string | $column | ||
protected int | $active |
Methods
Creates filtered and grouped table representation.
Sets active group.
No description
Counts number of rows.
No description
Returns Selection parent for caching.
Loads refCache references
No description
Updates all rows in result set.
Deletes all rows in result set.
Details
at line 39
__construct(Context $context, IConventions $conventions, string $tableName, string $column, Selection $refTable, IStorage $cacheStorage = null)
Creates filtered and grouped table representation.
at line 59
GroupedSelection
setActive(int|string $active)
internal |
Sets active group.
at line 69
Selection
select(string|string[] $columns, ...$params)
No description
at line 82
Selection
order(string $columns, ...$params)
No description
at line 99
mixed
aggregation(string $function)
No description
at line 126
int
count(string $column = null)
Counts number of rows.
at line 136
protected void
execute()
No description
at line 193
protected Selection
getRefTable($refPath)
Returns Selection parent for caching.
at line 206
protected void
loadRefCache()
Loads refCache references
at line 222
protected void
emptyResultSet(bool $saveCache = true, bool $deleteRererencedCache = true)
No description
at line 231
ActiveRow|int|bool
insert(iterable $data)
Inserts row in a table.
at line 249
int
update(iterable $data)
Updates all rows in result set.
Joins in UPDATE are supported only in MySQL
at line 262
int
delete()
Deletes all rows in result set.