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.
Executes aggregation function.
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 43
__construct(Context $context, IConventions $conventions, $tableName, $column, Selection $refTable, IStorage $cacheStorage = NULL)
Creates filtered and grouped table representation.
at line 57
GroupedSelection
setActive($active)
internal |
Sets active group.
at line 64
Selection
select($columns)
Adds select clause, more calls appends to the end.
at line 74
Selection
order($columns)
Adds order clause, more calls appends to the end.
at line 88
string
aggregation($function)
Executes aggregation function.
at line 114
int
count($column = NULL)
Counts number of rows.
at line 124
protected
execute()
No description
at line 176
protected Selection
getRefTable($refPath)
Returns Selection parent for caching.
at line 189
protected
loadRefCache()
Loads refCache references
at line 205
protected
emptyResultSet($saveCache = TRUE, $deleteRererencedCache = TRUE)
No description
at line 214
IRow|int|bool
insert($data)
Inserts row in a table.
at line 232
int
update($data)
Updates all rows in result set.
Joins in UPDATE are supported only in MySQL
at line 245
int
delete()
Deletes all rows in result set.