Property | Type | Description | |
---|---|---|---|
$accessedColumns | of touched columns | ||
$aggregation | of [conditions => [key => IRow]]; used by GroupedSelection | ||
$cache | |||
$context | |||
$conventions | Nette\Database\IConventions | ||
$data | modifiable data in [primary key => IRow] format | ||
$dataRefreshed | boolean | ||
$generalCacheKey | string | ||
$globalRefCache | cache array of Selection and GroupedSelection prototypes | ||
$keys | of primary key values | ||
$name | table name | ||
$observeCache | should instance observe accessed columns caching | ||
$previousAccessedColumns | of earlier touched columns | ||
$primary | primary key field name | ||
$primarySequence | primary column sequence name, FALSE for autodetection | ||
$refCache | mixed | ||
$rows | data read from database in [primary key => IRow] format | ||
$specificCacheKey | string | ||
$sqlBuilder |
Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( |
Creates filtered table representation. | |
__destruct ( ) | ||
accessColumn ( $key, $selectColumn = TRUE ) : boolean | ||
aggregation ( $function ) : string | Executes aggregation function. | |
alias ( $tableChain, $alias ) : self | Aliases table. Example ':book:book_tag.tag', 'tg' | |
count ( $column = NULL ) : integer | Counts number of rows. | |
createSelectionInstance ( $table = NULL ) | ||
current ( ) : Nette\Database\Table\IRow | ||
delete ( ) : integer | Deletes all rows in result set. | |
fetch ( ) | ||
fetchAll ( ) | ||
fetchAssoc ( $path ) | ||
fetchField ( $column = NULL ) : mixed | FALSE | Fetches single field. | |
fetchPairs ( $key = NULL, $value = NULL ) | ||
get ( $key ) : Nette\Database\Table\IRow | Returns row specified by primary key. | |
getDataRefreshed ( ) : boolean | Returns if selection requeried for more columns. | |
getName ( ) : string | ||
getPreviousAccessedColumns ( ) : array | false | Loads cache of previous accessed columns and returns it. | |
getPrimary ( $need = TRUE ) : string | array | null | ||
getPrimarySequence ( ) : string | ||
getReferencedTable ( |
Returns referenced row. | |
getReferencingTable ( $table, $column, $active = NULL ) : |
Returns referencing rows. | |
getSql ( ) : string | ||
getSqlBuilder ( ) : |
||
group ( $columns, $params ) : self | Sets group clause, more calls rewrite old value. | |
having ( $having, $params ) : self | Sets having clause, more calls rewrite old value. | |
insert ( $data ) : Nette\Database\Table\IRow | integer | boolean | Inserts row in a table. | |
joinWhere ( $tableChain, $condition, $params ) : self | Adds ON condition when joining specified table, more calls appends with AND. | |
key ( ) : string | ||
limit ( $limit, $offset = NULL ) : self | Sets limit clause, more calls rewrite old values. | |
max ( $column ) : integer | Returns maximum value from a column. | |
min ( $column ) : integer | Returns minimum value from a column. | |
next ( ) | ||
offsetExists ( $key ) : boolean | Tests if row exists. | |
offsetGet ( $key ) : Nette\Database\Table\IRow | Returns specified row. | |
offsetSet ( $key, $value ) : null | Mimic row. | |
offsetUnset ( $key ) : null | Removes row from result set. | |
order ( $columns, $params ) : self | Adds order clause, more calls appends to the end. | |
page ( $page, $itemsPerPage, &$numOfPages = NULL ) : self | Sets offset using page number, more calls rewrite old values. | |
removeAccessColumn ( $key ) | ||
rewind ( ) | ******************* interface Iterator ****************d*g* | |
select ( $columns, $params ) : self | Adds select clause, more calls appends to the end. | |
setPrimarySequence ( $sequence ) : self | ||
sum ( $column ) : integer | Returns sum of values in a column. | |
update ( $data ) : integer | Updates all rows in result set. | |
valid ( ) | ||
where ( $condition, $params ) : self | Adds where condition, more calls appends with AND. | |
whereOr ( array $parameters ) : self | Adds where condition using the OR operator between parameters. | |
wherePrimary ( $key ) : self | Adds condition for primary key. |
Method | Description | |
---|---|---|
condition ( $condition, array $params, $tableChain = NULL ) : void | Adds condition, more calls appends with AND. | |
createGroupedSelectionInstance ( $table, $column ) | ||
createRow ( array $row ) | ||
emptyResultSet ( $clearCache = TRUE, $deleteRererencedCache = TRUE ) | ||
execute ( ) | ******************* internal ****************d*g* | |
getGeneralCacheKey ( ) : string | Returns general cache key independent on query parameters or sql limit Used e.g. for previously accessed columns caching | |
getRefTable ( &$refPath ) : self | Returns Selection parent for caching. | |
getSpecificCacheKey ( ) : string | Returns object specific cache key dependent on query parameters Used e.g. for reference memory caching | |
loadRefCache ( ) | Loads refCache references | |
query ( $query ) | ||
saveCacheState ( ) |
public __construct ( |
||
$context | ||
$conventions | Nette\Database\IConventions | |
$cacheStorage | Nette\Caching\IStorage |
public accessColumn ( $key, $selectColumn = TRUE ) : boolean | ||
return | boolean | if selection requeried for more columns. |
public aggregation ( $function ) : string | ||
return | string |
public alias ( $tableChain, $alias ) : self | ||
return | self |
protected createGroupedSelectionInstance ( $table, $column ) |
public current ( ) : Nette\Database\Table\IRow | ||
return | Nette\Database\Table\IRow |
protected emptyResultSet ( $clearCache = TRUE, $deleteRererencedCache = TRUE ) |
public fetchField ( $column = NULL ) : mixed | FALSE | ||
return | mixed | FALSE |
public get ( $key ) : Nette\Database\Table\IRow | ||
return | Nette\Database\Table\IRow | or FALSE if there is no such row |
public getDataRefreshed ( ) : boolean | ||
return | boolean |
protected getGeneralCacheKey ( ) : string | ||
return | string |
public getPreviousAccessedColumns ( ) : array | false | ||
return | array | false |
protected getRefTable ( &$refPath ) : self | ||
return | self |
public getReferencedTable ( |
||
$row | ||
return | NULL if the row does not exist, FALSE if the relationship does not exist |
public getReferencingTable ( $table, $column, $active = NULL ) : |
||
return |
protected getSpecificCacheKey ( ) : string | ||
return | string |
public group ( $columns, $params ) : self | ||
return | self |
public having ( $having, $params ) : self | ||
return | self |
public joinWhere ( $tableChain, $condition, $params ) : self | ||
return | self |
public limit ( $limit, $offset = NULL ) : self | ||
return | self |
public offsetExists ( $key ) : boolean | ||
return | boolean |
public offsetGet ( $key ) : Nette\Database\Table\IRow | ||
return | Nette\Database\Table\IRow | or NULL if there is no such row |
public offsetUnset ( $key ) : null | ||
return | null |
public order ( $columns, $params ) : self | ||
return | self |
public page ( $page, $itemsPerPage, &$numOfPages = NULL ) : self | ||
return | self |
public rewind ( ) |
public select ( $columns, $params ) : self | ||
return | self |
public where ( $condition, $params ) : self | ||
return | self |
public wherePrimary ( $key ) : self | ||
return | self |
protected $aggregation |
protected Context,Nette\Database $context | ||
return |
protected IConventions,Nette\Database $conventions | ||
return | Nette\Database\IConventions |
protected $globalRefCache |
protected $observeCache |
protected $previousAccessedColumns |
protected $primarySequence |