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
      • 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

Class SqlBuilder

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

Nette\Database\Table\SqlBuilder uses Nette\SmartObject
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
# getSelectQueryHash( $columns = NULL )

Returns select query hash for caching.

Returns select query hash for caching.

Returns

string
string
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, ... $params )
public
# getSelect( )
public
# addWhere( $condition, ... $params )
public
# addJoinCondition( $tableChain, $condition, ... $params )
protected
# addCondition( $condition, array $params, array & $conditions, array & $conditionsParameters )
public
# getConditions( )
public
# addAlias( $chain, $alias )

Adds alias.

Adds alias.

protected
# checkUniqueTableName( $tableName, $chain )
public
# addOrder( $columns, ... $params )
public
# setOrder( array $columns, array $parameters )
public
# getOrder( )
public
# setLimit( $limit, $offset )
public
# getLimit( )
public
# getOffset( )
public
# setGroup( $columns, ... $params )
public
# getGroup( )
public
# setHaving( $having, ... $params )
public
# getHaving( )
protected
# buildSelect( array $columns )
protected
# parseJoinConditions( & $joins, $joinConditions )
protected
# getSortedJoins( $table, & $leftJoinDependency, & $tableJoins, & $finalJoins )
protected
# parseJoins( & $joins, & $query )
public
# parseJoinsCb( & $joins, $match )
protected
# buildQueryJoins( array $joins, array $leftJoinConditions = [] )
protected
# buildJoinConditions( )
protected
# buildConditions( )
protected
# buildQueryEnd( )
protected
# tryDelimite( $s )
protected
# addConditionComposition( array $columns, array $parameters, array & $conditions, array & $conditionsParameters )
Methods used from Nette\SmartObject
__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

#[]
protected array $where

of where conditions

of where conditions

#[]
protected array $joinCondition

of array of join conditions

of array of join conditions

#[]
protected array $conditions

of where conditions for caching

of where conditions for caching

#[]
protected array $parameters

of parameters passed to where conditions

of parameters passed to where conditions

#[ 'select' => [], 'joinCondition' => [], 'where' => [], 'group' => [], 'having' => [], 'order' => [], ]
protected array $order

or columns to order by

or columns to order by

#[]
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

#''
protected array $reservedTableNames

of reserved table names associated with chain

of reserved table names associated with chain

#[]
protected array $aliases

of table aliases

of table aliases

#[]
protected string $currentAlias

currently parsing alias for joins

currently parsing alias for joins

#NULL
Nette 2.4-20170119 API API documentation generated by ApiGen 2.8.0