PHP Class NilPortugues\Sql\QueryBuilder\Manipulation\Select

Inheritance: extends NilPortugues\Sql\QueryBuilder\Manipulation\AbstractBaseQuery
Afficher le fichier Open project: nilportugues/sql-query-builder Class Usage Examples

Protected Properties

Свойство Type Description
$camelCaseTableName string
$columnQuery NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$groupBy array
$having NilPortugues\Sql\QueryBuilder\Syntax\Where
$havingOperator string
$isDistinct boolean
$joinQuery JoinQuery
$parentQuery ParentQuery
$table NilPortugues\Sql\QueryBuilder\Syntax\Table
$where NilPortugues\Sql\QueryBuilder\Syntax\Where

Méthodes publiques

Méthode Description
__clone ( ) : Select This __clone method will create an exact clone but without the object references due to the fact these are lost in the process of serialization and un-serialization.
__construct ( string $table = null, array $columns = null )
addJoin ( Select $select, string $selfColumn, string $refColumn ) : Select
count ( string $columnName = '*', string $alias = '' ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
crossJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
distinct ( )
getAllColumns ( ) : array
getAllHavings ( ) : array
getAllJoins ( ) : array
getAllOrderBy ( ) : array
getAllWheres ( ) : array Returns all the Where conditions to the BuilderInterface class in order to write the SQL WHERE statement.
getColumnFuncs ( ) : array
getColumnSelects ( ) : array
getColumnValues ( ) : array
getColumns ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Column
getGroupBy ( ) : array
getHavingOperator ( ) : string
getJoinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
getJoinType ( ) : string
getParentQuery ( ) : ParentQuery
groupBy ( array $columns )
having ( $havingOperator = 'AND' ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
innerJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
isCount ( ) : boolean
isDistinct ( ) : boolean
isJoin ( boolean $isJoin = true ) : JoinQuery Transforms Select in a joint.
isJoinSelect ( ) : boolean
join ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [], string $joinType = null ) : Select
joinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where WHERE constrains used for the ON clause of a (LEFT/RIGHT/INNER/CROSS) JOIN.
leftJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
limit ( integer $start, $count )
on ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where Alias to joinCondition.
orderBy ( string $column, string $direction = OrderBy::ASC, null $table = null )
partName ( ) : string
rightJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
setColumns ( array $columns ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery Sets the column names used to write the SELECT statement.
setFunctionAsColumn ( string $funcName, array $arguments, string $alias ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery Allows calculation on columns using predefined SQL functions.
setJoinType ( string | null $joinType )
setParentQuery ( Select $parentQuery )
setSelectAsColumn ( array $column ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery Allows setting a Select query as a column value.
setValueAsColumn ( string $value, string $alias ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery Allows setting a value to the select statement.

Méthodes protégées

Méthode Description
getAllOperation ( null | NilPortugues\Sql\QueryBuilder\Syntax\Where $data, string $operation ) : array

Method Details

__clone() public méthode

This __clone method will create an exact clone but without the object references due to the fact these are lost in the process of serialization and un-serialization.
public __clone ( ) : Select
Résultat Select

__construct() public méthode

public __construct ( string $table = null, array $columns = null )
$table string
$columns array

addJoin() public méthode

public addJoin ( Select $select, string $selfColumn, string $refColumn ) : Select
$select Select
$selfColumn string
$refColumn string
Résultat Select

count() public méthode

public count ( string $columnName = '*', string $alias = '' ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$columnName string
$alias string
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

crossJoin() public méthode

public crossJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
$table string
$selfColumn string
$refColumn string
$columns string[]
Résultat Select

distinct() public méthode

public distinct ( )

getAllColumns() public méthode

public getAllColumns ( ) : array
Résultat array

getAllHavings() public méthode

public getAllHavings ( ) : array
Résultat array

getAllJoins() public méthode

public getAllJoins ( ) : array
Résultat array

getAllOperation() protected méthode

protected getAllOperation ( null | NilPortugues\Sql\QueryBuilder\Syntax\Where $data, string $operation ) : array
$data null | NilPortugues\Sql\QueryBuilder\Syntax\Where
$operation string
Résultat array

getAllOrderBy() public méthode

public getAllOrderBy ( ) : array
Résultat array

getAllWheres() public méthode

Returns all the Where conditions to the BuilderInterface class in order to write the SQL WHERE statement.
public getAllWheres ( ) : array
Résultat array

getColumnFuncs() public méthode

public getColumnFuncs ( ) : array
Résultat array

getColumnSelects() public méthode

public getColumnSelects ( ) : array
Résultat array

getColumnValues() public méthode

public getColumnValues ( ) : array
Résultat array

getColumns() public méthode

public getColumns ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Column
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Column

getGroupBy() public méthode

public getGroupBy ( ) : array
Résultat array

getHavingOperator() public méthode

public getHavingOperator ( ) : string
Résultat string

getJoinCondition() public méthode

public getJoinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where

getJoinType() public méthode

public getJoinType ( ) : string
Résultat string

getParentQuery() public méthode

public getParentQuery ( ) : ParentQuery
Résultat ParentQuery

groupBy() public méthode

public groupBy ( array $columns )
$columns array

having() public méthode

public having ( $havingOperator = 'AND' ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
$havingOperator
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where

innerJoin() public méthode

public innerJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
$table string
$selfColumn string
$refColumn string
$columns string[]
Résultat Select

isCount() public méthode

public isCount ( ) : boolean
Résultat boolean

isDistinct() public méthode

public isDistinct ( ) : boolean
Résultat boolean

isJoin() public méthode

Transforms Select in a joint.
public isJoin ( boolean $isJoin = true ) : JoinQuery
$isJoin boolean
Résultat JoinQuery

isJoinSelect() public méthode

public isJoinSelect ( ) : boolean
Résultat boolean

join() public méthode

public join ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [], string $joinType = null ) : Select
$table string
$selfColumn string
$refColumn string
$columns string[]
$joinType string
Résultat Select

joinCondition() public méthode

WHERE constrains used for the ON clause of a (LEFT/RIGHT/INNER/CROSS) JOIN.
public joinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where

leftJoin() public méthode

public leftJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
$table string
$selfColumn string
$refColumn string
$columns string[]
Résultat Select

limit() public méthode

public limit ( integer $start, $count )
$start integer
$count

on() public méthode

Alias to joinCondition.
public on ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where

orderBy() public méthode

public orderBy ( string $column, string $direction = OrderBy::ASC, null $table = null )
$column string
$direction string
$table null

partName() public méthode

public partName ( ) : string
Résultat string

rightJoin() public méthode

public rightJoin ( string $table, string $selfColumn = null, string $refColumn = null, string[] $columns = [] ) : Select
$table string
$selfColumn string
$refColumn string
$columns string[]
Résultat Select

setColumns() public méthode

If key is set, key is the column's alias. Value is always the column names.
public setColumns ( array $columns ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$columns array
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

setFunctionAsColumn() public méthode

Allows calculation on columns using predefined SQL functions.
public setFunctionAsColumn ( string $funcName, array $arguments, string $alias ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$funcName string
$arguments array
$alias string
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

setJoinType() public méthode

public setJoinType ( string | null $joinType )
$joinType string | null

setParentQuery() public méthode

public setParentQuery ( Select $parentQuery )
$parentQuery Select

setSelectAsColumn() public méthode

Allows setting a Select query as a column value.
public setSelectAsColumn ( array $column ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$column array
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

setValueAsColumn() public méthode

Allows setting a value to the select statement.
public setValueAsColumn ( string $value, string $alias ) : NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery
$value string
$alias string
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

Property Details

$camelCaseTableName protected_oe property

protected string $camelCaseTableName
Résultat string

$columnQuery protected_oe property

protected ColumnQuery,NilPortugues\Sql\QueryBuilder\Manipulation $columnQuery
Résultat NilPortugues\Sql\QueryBuilder\Manipulation\ColumnQuery

$groupBy protected_oe property

protected array $groupBy
Résultat array

$having protected_oe property

protected Where,NilPortugues\Sql\QueryBuilder\Syntax $having
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where

$havingOperator protected_oe property

protected string $havingOperator
Résultat string

$isDistinct protected_oe property

protected bool $isDistinct
Résultat boolean

$joinQuery protected_oe property

protected JoinQuery,NilPortugues\Sql\QueryBuilder\Manipulation $joinQuery
Résultat JoinQuery

$parentQuery protected_oe property

protected ParentQuery $parentQuery
Résultat ParentQuery

$table protected_oe property

protected Table,NilPortugues\Sql\QueryBuilder\Syntax $table
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Table

$where protected_oe property

protected Where,NilPortugues\Sql\QueryBuilder\Syntax $where
Résultat NilPortugues\Sql\QueryBuilder\Syntax\Where