PHP Class Pop\Db\Sql\Select

Author: Nick Sagona, III ([email protected])
Inheritance: extends AbstractSql
Exibir arquivo Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$allowedJoins boolean Allowed JOIN keywords
$distinct boolean Distinct keyword
$functions boolean SQL functions
$groupBy string GROUP BY value
$having Predicate HAVING predicate object
$joins array JOIN clauses
$where Predicate WHERE predicate object

Public Methods

Method Description
distinct ( ) : Select Set the DISTINCT keyword
groupBy ( mixed $by ) : Select Set the GROUP BY value
having ( ) : Predicate Set the HAVING clause
join ( mixed $tableToJoin, mixed $commonColumn, string $typeOfJoin = 'JOIN' ) : Select Set the JOIN clause
render ( ) : string Render the SELECT statement
where ( boolean $reset = false ) : Predicate Set the WHERE clause

Protected Methods

Method Description
getLimitAndOffset ( ) : array Method to get the limit and offset

Method Details

distinct() public method

Set the DISTINCT keyword
public distinct ( ) : Select
return Select

getLimitAndOffset() protected method

Method to get the limit and offset
protected getLimitAndOffset ( ) : array
return array

groupBy() public method

Set the GROUP BY value
public groupBy ( mixed $by ) : Select
$by mixed
return Select

having() public method

Set the HAVING clause
public having ( ) : Predicate
return Predicate

join() public method

Set the JOIN clause
public join ( mixed $tableToJoin, mixed $commonColumn, string $typeOfJoin = 'JOIN' ) : Select
$tableToJoin mixed
$commonColumn mixed
$typeOfJoin string
return Select

render() public method

Render the SELECT statement
public render ( ) : string
return string

where() public method

Set the WHERE clause
public where ( boolean $reset = false ) : Predicate
$reset boolean
return Predicate

Property Details

$allowedJoins protected_oe static_oe property

Allowed JOIN keywords
protected static bool $allowedJoins
return boolean

$distinct protected_oe property

Distinct keyword
protected bool $distinct
return boolean

$functions protected_oe static_oe property

SQL functions
protected static bool $functions
return boolean

$groupBy protected_oe property

GROUP BY value
protected string $groupBy
return string

$having protected_oe property

HAVING predicate object
protected Predicate,Pop\Db\Sql $having
return Predicate

$joins protected_oe property

JOIN clauses
protected array $joins
return array

$where protected_oe property

WHERE predicate object
protected Predicate,Pop\Db\Sql $where
return Predicate