com\setasign\SetaFramework\Database\Query

Union Class Union

File: /SetaFramework/src/Database/Query/Union.php

Class hierarchy

Implements

Summary

Properties

$limit

private ?int Union::$limit

$offset

private ?int Union::$offset

$orderBy

private array Union::$orderBy = array()

$selects

private array Union::$selects

Methods

__construct()

public Union::__construct (
Select $select
)
Parameters
$select : Select
 

except()

public Union::except (
Select $select
): static
Parameters
$select : Select
 

getSql()

getSqlLimit()

Parses the limit block to string

Parameters
$quoteInterface : \com\setasign\SetaFramework\Database\QuoteInterface
 

getSqlOrderBy()

Parses the orderBy block to string

Parameters
$quoteInterface : \com\setasign\SetaFramework\Database\QuoteInterface
 

getSqlUnion()

intersect()

public Union::intersect (
Select $select
): static
Parameters
$select : Select
 

limit()

public Union::limit (
int $limit,
?int $offset = null
): static

Sets a limit for query

Parameters
$limit : int
 
$offset : ?int
 

orderBy()

public Union::orderBy (
string|Select|\Closure $column,
string $direction = 'ASC'
): static

Adds an order-by-column to query

Parameters
$column : string|Select|\Closure

By default, quoted as an identifier.

$direction : string

'ASC' or 'DESC'

resetLimit()

public Union::resetLimit (
void
): static

resetOrderBy()

public Union::resetOrderBy (
void
): static

unionAll()

public Union::unionAll (
Select $select
): static
Parameters
$select : Select
 

unionDistinct()

public Union::unionDistinct (
Select $select
): static
Parameters
$select : Select