Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • ActiveRow
  • GroupedSelection
  • Selection
  • SqlBuilder

Interfaces

  • IRow
  • IRowContainer
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class SqlBuilder

Builds SQL query. SqlBuilder is based on great library NotORM http://www.notorm.com written by Jakub Vrana.

Nette\Object
Extended by Nette\Database\Table\SqlBuilder
Namespace: Nette\Database\Table
Located at Database/Table/SqlBuilder.php
Methods summary
public
# __construct( $tableName, Nette\Database\Context $context )
public string
# getTableName( )

Returns

string
string
public
# buildInsertQuery( )
public
# buildUpdateQuery( )
public
# buildDeleteQuery( )
public string
# buildSelectQuery( string $columns = NULL )

Returns SQL query.

Returns SQL query.

Parameters

$columns
of columns

Returns

string
string
public
# getParameters( )
public
# importConditions( Nette\Database\Table\SqlBuilder $builder )
public
# addSelect( $columns )
public
# getSelect( )
public
# addWhere( $condition, $parameters = array() )
public
# getConditions( )
public
# addOrder( $columns )
public
# setOrder( array $columns, array $parameters )
public
# getOrder( )
public
# setLimit( $limit, $offset )
public
# getLimit( )
public
# getOffset( )
public
# setGroup( $columns )
public
# getGroup( )
public
# setHaving( $having )
public
# getHaving( )
protected
# buildSelect( array $columns )
protected
# parseJoins( & $joins, & $query )
public
# parseJoinsCb( & $joins, $match )
protected
# buildQueryJoins( array $joins )
protected
# buildConditions( )
protected
# buildQueryEnd( )
protected
# tryDelimite( $s )
protected
# addWhereComposition( array $columns, array $parameters )
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
protected string $tableName
#
protected Nette\Database\IConventions $conventions
#
protected string $delimitedTable

delimited table name

delimited table name

#
protected array $select

of column to select

of column to select

#array()
protected array $where

of where conditions

of where conditions

#array()
protected array $conditions

of where conditions for caching

of where conditions for caching

#array()
protected array $parameters

of parameters passed to where conditions

of parameters passed to where conditions

#array( 'select' => array(), 'where' => array(), 'group' => array(), 'having' => array(), 'order' => array(), )
protected array $order

or columns to order by

or columns to order by

#array()
protected integer $limit

number of rows to fetch

number of rows to fetch

#NULL
protected integer $offset

first row to fetch

first row to fetch

#NULL
protected string $group

columns to grouping

columns to grouping

#''
protected string $having

grouping condition

grouping condition

#''
Magic properties inherited from Nette\Object
$reflection
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0