Packages

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

Classes

  • NGroupedTableSelection
  • NTableRow
  • NTableSelection
  • Overview
  • Package
  • Class
  • Tree

Class NGroupedTableSelection

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

NObject
Extended by NTableSelection implements Iterator, ArrayAccess, Countable
Extended by NGroupedTableSelection
Package: Nette\Database\Table
Author: Jakub Vrana
Located at Database/Table/GroupedSelection.php
Methods summary
public
# __construct( string $name, NTableSelection $refTable, $column )

Parameters

$name
string
$refTable
$column
public NGroupedTableSelection
# through( string $column )

Specify referencing column.

Specify referencing column.

Parameters

$column
string

Returns

NGroupedTableSelection
provides a fluent interface
public NTableSelection
# 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

NTableSelection
provides a fluent interface
public NTableSelection
# 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

NTableSelection
provides a fluent interface
public string
# aggregation( string $function )

Executes aggregation function.

Executes aggregation function.

Parameters

$function
string

Returns

string
public integer
# count( string $column = '' )

Counts number of rows.

Counts number of rows.

Parameters

$column
string

Returns

integer

Implementation of

Countable::count
public NTableRow
# 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 TableSelection|string for INSERT ... SELECT

Returns

NTableRow
or FALSE in case of an error or number of affected rows for INSERT ... SELECT
public integer
# update( array $data )

Updates all rows in result set.

Updates all rows in result set.

Parameters

$data
array
($column => $value)

Returns

integer
number of affected rows or FALSE in case of an error
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
protected null
# execute( )

Executes built query.

Executes built query.

Returns

null
Methods inherited from NTableSelection
__destruct(), access(), createJoins(), current(), fetch(), fetchPairs(), find(), get(), getReferencedTable(), getReferencingTable(), getSql(), group(), key(), limit(), max(), min(), next(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), page(), query(), rewind(), sum(), topString(), tryDelimite(), valid(), where(), whereString()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
public $active
#
Properties inherited from NTableSelection
$accessed, $aggregation, $conditions, $connection, $data, $delimitedName, $delimitedPrimary, $group, $having, $keys, $limit, $name, $offset, $order, $parameters, $prevAccessed, $primary, $referenced, $referencing, $rows, $select, $where
Nette Framework 2.0beta1 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0