Class Core_QueryBuilder_Selection
Consist of WHERE, ORDER BY, and LIMIT
- Core_QueryBuilder_Statement
- Core_QueryBuilder_Selection
Direct known subclasses
Core_QueryBuilder_Delete
,
Core_QueryBuilder_Select
,
Core_QueryBuilder_Update
Indirect known subclasses
Package: HostCMS\Core\Querybuilder
Copyright: © 2005-2021 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru
Author: Hostmake LLC
Version: 6.x
Located at core/querybuilder/selection.php
Methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
indexHint( string $tableName, array $options )
Add Index Hints https://dev.mysql.com/doc/refman/5.7/en/index-hints.html |
protected
string
|
|
public
array
|
|
protected
array
|
|
protected
|
#
_join( string $type, string $table, string|null $column = NULL, string|null $expression = NULL, string|null $value = NULL, string|null $additionalConditions = NULL, $mode = NULL )
http://dev.mysql.com/doc/refman/5.7/en/join.html |
public
|
#
join( string $table, string $column, string|null $expression = NULL, string|null $value = NULL, string|null $additionalConditions = NULL )
INNER JOIN |
public
|
#
firstJoin( string $table, string $column, string|null $expression = NULL, string|null $value = NULL, string|null $additionalConditions = NULL )
Add INNER JOIN first |
public
|
#
leftJoin( string $table, string $column, string|null $expression = NULL, string|null $value = NULL, string|null $additionalConditions = NULL )
LEFT OUTER JOIN |
public
|
#
firstLeftJoin( string $table, string $column, string|null $expression = NULL, string|null $value = NULL, string|null $additionalConditions = NULL )
Add LEFT OUTER JOIN first |
public
|
#
rightJoin( string $table, string $column, string $expression = NULL, string $value = NULL, string $additionalConditions = NULL )
RIGHT OUTER JOIN |
public
|
#
rightJoinFirst( string $table, string $column, string $expression = NULL, string $value = NULL, string $additionalConditions = NULL )
Add RIGHT OUTER JOIN first |
public
|
#
crossJoin( string $table )
In MySQL, CROSS JOIN is a syntactic equivalent to INNER JOIN (they can replace each other). In standard SQL, they are not equivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used otherwise. |
public
|
|
protected
string
|
|
public
|
|
public
|
|
public
|
|
public
|
#
orWhere( string $column, string $expression = NULL, string $value = NULL )
Add OR and WHERE, e.g. WHERE ... OR $column $expression $value |
public
|
#
whereRaw( string $expr )
Add raw expression into WHERE. ATTENTION! Danger, you should escape the query yourself! |
public
|
|
public
|
#
orWhereColumn( string $column1, string $expression, string $column2 )
Set OR and verify two columns |
public
|
|
public
|
#
orWhereBetween( string $column, string $from, string $to )
Add OR and WHERE $column BETWEEN x AND y |
public
|
|
public
|
#
orWhereNotBetween( string $column, string $from, string $to )
Add OR and WHERE $column NOT BETWEEN x AND y |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
string
|
|
protected
string
|
#
_buildWhere( string $column, string $expression, string $value )
Build expression for one condition |
public
|
#
orderBy( string $column, string $direction = 'ASC', boolean $binary = FALSE )
Set order column and direction |
public
|
|
public
|
#
orderByRaw( string $expr )
Add raw expression into ORDER BY. ATTENTION! Danger, you should escape the query yourself! |
protected
string
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
array
|
|
public
|
|
public
|
|
public
array
|
|
public
|
|
public
|
Methods inherited from Core_QueryBuilder_Statement
__call()
,
__set()
,
_isObjectSelect()
,
_quoteColumns()
,
_quoteValues()
,
build()
,
clearLimit()
,
clearOffset()
,
execute()
,
setDataBase()
,
unbuffered()
Properties summary
protected
array
|
$_where
WHERE |
#
array()
|
protected
string
|
$_operator
Current operator |
#
''
|
protected
string
|
$_defaultOperator
Default operator between conditions |
#
'AND'
|
protected
array
|
$_partition
PARTITION |
#
array()
|
protected
array
|
$_indexHints
Index Hints |
#
array()
|
protected
array
|
$_join
JOIN |
#
array()
|
protected
array
|
$_orderBy
ORDER BY |
#
array()
|
protected
mixed
|
$_limit
LIMIT |
#
NULL
|
protected
mixed
|
$_offset
OFFSET |
#
NULL
|