Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • GroupedTableSelection
  • TableRow
  • TableSelection
  • Overview
  • Package
  • Class
  • Tree

Class GroupedTableSelection

Representation of filtered table grouped by some column. GroupedSelection is based on the great library NotORM http://www.notorm.com written by Jakub Vrana.

Object
Extended by TableSelection implements Iterator, ArrayAccess, Countable
Extended by GroupedTableSelection
Package: Nette\Database\Table
Author: Jakub Vrana
Author: Jan Skrasek
Located at Database/Table/GroupedSelection.php
Methods summary
public
# __construct( $name, TableSelection $refTable, $column )

Overrides

TableSelection::__construct
public TableSelection
# select( string $columns )

Adds select clause, more calls appends to the end.

Adds select clause, more calls appends to the end.

Parameters

$columns
string
for example "column, MD5(column) AS column_md5"

Returns

TableSelection
provides a fluent interface

Overrides

TableSelection::select
public TableSelection
# order( string $columns )

Adds order clause, more calls appends to the end.

Adds order clause, more calls appends to the end.

Parameters

$columns
string
for example 'column1, column2 DESC'

Returns

TableSelection
provides a fluent interface

Overrides

TableSelection::order
public string
# aggregation( string $function )

Executes aggregation function.

Executes aggregation function.

Parameters

$function
string

Returns

string

Overrides

TableSelection::aggregation
public integer
# count( string $column = '' )

Counts number of rows.

Counts number of rows.

Parameters

$column
string

Returns

integer

Overrides

TableSelection::count

Implementation of

Countable::count
public TableRow
# insert( mixed $data )

Inserts row in a table.

Inserts row in a table.

Parameters

$data
mixed
array($column => $value)|Traversable for single row insert or Selection|string for INSERT ... SELECT

Returns

TableRow
or FALSE in case of an error or number of affected rows for INSERT ... SELECT

Overrides

TableSelection::insert
public integer
# update( array|Traversable $data )

Updates all rows in result set.

Updates all rows in result set.

Parameters

$data
array|Traversable
($column => $value)

Returns

integer
number of affected rows or FALSE in case of an error

Overrides

TableSelection::update
public integer
# delete( )

Deletes all rows in result set.

Deletes all rows in result set.

Returns

integer
number of affected rows or FALSE in case of an error

Overrides

TableSelection::delete
protected null
# execute( )

Executes built query.

Executes built query.

Returns

null

Overrides

TableSelection::execute
Methods inherited from TableSelection
__destruct(), createJoins(), createRow(), current(), fetch(), fetchPairs(), find(), get(), getConnection(), getName(), getPrimary(), getReferencedTable(), getReferencingTable(), getSql(), group(), key(), limit(), max(), min(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), page(), query(), removeExtraTables(), rewind(), sum(), topString(), tryDelimite(), valid(), where(), whereString()
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
protected TableSelection $refTable
#

referenced table

referenced table

protected string $column
#

grouping column name

grouping column name

protected string $delimitedColumn
#
protected integer $active
#

primary key

primary key

protected array $referencing
#

of referencing cached results

of referencing cached results

protected array $aggregation array()
#

of [conditions => [key => ActiveRow]]

of [conditions => [key => ActiveRow]]

Properties inherited from TableSelection
$accessed, $checkReferenceNewKeys, $conditions, $connection, $data, $delimitedName, $delimitedPrimary, $group, $having, $keys, $limit, $name, $offset, $order, $parameters, $prevAccessed, $primary, $referenced, $rows, $select, $where
Nette Framework 2.0.3 (for PHP 5.2, un-prefixed) API API documentation generated by ApiGen 2.7.0